mirror of
https://blitiri.com.ar/repos/chasquid
synced 2026-10-28 15:02:28 +00:00
b09ef96eab
Operating on large RSA keys can be computationally expensive. Several implementations (e.g. crypto/tls, OpenSSL, rspamd) limit their size to prevent DoS via work amplification. This patch introduces that limit in our dkim library, set to 8192 bits. That's the same limit used by other implementations, like crypto/tls (which limits size of RSA keys in certificates) and rspamd (specifically for DKIM). It is also in line with the most recent DMARC.org report of key sizes in the wild (https://dmarc.org/stats/dkim/), where 8192 is already rare, and the largest one found.