Commit Graph
6 Commits
Author SHA1 Message Date
Wez Furlong fa1dec61a2 dkim: remove usage of rsa crate
We keep getting asked about
https://rustsec.org/advisories/RUSTSEC-2023-0071.html and how it impacts
kumomta.

The answer to that question is: in the default build configuration, we
use openssl's RSA signing implementation rather than that of the rsa
crate.  The reason for this is that OpenSSL's RSA implementation is due
to the performance gap between the two implementations
(https://github.com/RustCrypto/RSA/issues/339). The result of this is
that the problematic code and attack vector described in the security
advisory does not apply to KumoMTA, because it is not used to compute
any signatures.

In the interest of not raising any false alarms as more and more people
perform security analyses on kumomta, this commit removes the `rsa`
crate from the build graph. In order to do so, we need to port
verification over to the openssl RSA implementation which is what this
commit does.

I look forward to a future version of the `rsa` crate being published
that has this issue resolved, and that closes the performance gap!

refs: https://github.com/RustCrypto/RSA/issues/390
2024-04-10 13:26:49 -07:00
Wez Furlong 452bede2e1 dkim: switch to our own mailparsing implementation 2023-08-25 08:55:28 -07:00
Wez Furlong a42d8967cd dkim: remove Arc requirement from verification interface
It seems like this was working around an issue that does
not appear to be an issue any more.
2023-08-25 08:55:28 -07:00
Wez Furlong 6fead2d6b2 rename our forked dkim crate
We're diverging a decent amount, so let's use our own name
2023-08-25 08:55:28 -07:00
Wez Furlong ffe2fd08e1 dkim: add option to use openssl for RSA signing
This is not on by default, and is not currently enabled
for KumoMTA.

Using openssl is currently about 3x faster than the pure rust
RSA crate, and inline with the perf of the ring crate, which
we could use here instead, but which doesn't support keys of
size 1024 which are currently widely deployed by the industry,
and for which larger sizes do not fit in DNS records.
2023-06-16 07:49:15 -07:00
Wez Furlong 86d4d22519 dkim: tweaks to make it easier to run a benchmark under perf 2023-06-16 07:49:15 -07:00