How long is your DKIM key?
While we were at M3AAWG, Wired published an article talking about how simple it was to crack DKIM keys. I didn’t post about it at the time because it didn’t really seem like news. DKIM keys smaller than 1024 are vulnerable and not secure and the DKIM spec does not recommend using keys smaller than 1024. When I asked the DKIM-people-who-would-know they did tell me that the news was that the keys had been cracked and used in the wild to spoof email.
If you are signing with DKIM, use a key 1024 or longer. Anything shorter and your risk having the key cracked and your mail fraudulently signed.
This morning M3AAWG published recommendations on keeping DKIM keys secure.
- Updating to a minimum 1024-bit key length. Shorter keys can be cracked in 72 hours using inexpensive cloud services
- Rotating keys quarterly
- Setting signatures to expire after the current key rotation period and revoking old keys in the DNS
- Using the key test mode only for a short time period and revoking the test key after the ramp-up
- Implementing DMARC in monitoring mode and using DNS to monitor how frequently keys are queried. DMARC (Domain-based Message Authentication, Reporting and Conformance) is another standard often used in conjunction with DKIM
- Using DKIM rather than Domain Keys, which is a depreciated protocol
- Working with any third parties hired to send a company’s email to ensure they are adhering to these best practices
Google took a good step in encouraging folks to upgrade to more secure keys. According to Return Path Gmail is currently failing DKIM for any key 512 and shorter. Keys between 512 and 1024 are still validating, but Gmail will start failing any keys smaller than 1024 in the near future.