DKIM RSA key size, does it matter?

If you already have used Scan my Email to test your email configurations, you may already have faced that message.

dkim 1024 bits

Back in 2012, many major email actors such as Google, Yahoo, have deprecated 512 or 768-bit RSA DKIM keys, following several security researchers warnings. At that time, it became possible to break 512-bit keys, and to spoof any domain using a 512-bit key to send a perfectly DKIM signed message. 512-bit RSA keys were breakable in less than 72h with low effort using cloud computing power. The solution to prevent such bad thing from happening, is basically to increase the size of the keys, and so, to increase dramatically the amount of time required to break the keys.

In 2012-2013, a new standard has been defined, the minimal key length has been fixed to 1024-bit RSA keys, at this time it was not even thinkable to be able to break a 1024-bit key with existing machines. The point is, more progress we are doing to get more powerful computers, less time is needed to break a cryptographic key, so, the same question starts to be asked.

is a 1024-bit RSA key still safe?

The answer for now is yes, for most of the usages. We are having more and more computing power on Earth, and we are approaching the time when it will become possible to break a 1024-bit key in a reasonable delay (days/weeks/months). This time mostly depend on the ressources an attacker could have access, as an example, the last RSA key size that has been officially broken on a "RSA security challenge", were a 829 bits back in 2020, and it required roughly 2700 core-years (meaning it would have required 2700 CPU physical cores at 2.1GHz during an entire year to break that key)

So, if a 1024-bit key is not yet easily breakable, it is only matter of time, it will become vulnerable in the next few years. So, the most critical and sensitive company such as banks, insurances, worldwide companies, health related, should already consider moving to a 2048-bit RSA key side if technically possible on their side, and if already offered on the ESP side.

For most of company on Earth, keeping a 1024-bit key is for now completely safe and nobody will be able for now to break your DKIM key :-)

How to see what is your key length ? => test your emails on Scan my Email