Many tutorials about how to mitigate the Logjam recommend regenerating Diffie-Hellman moduli. This is a resource intensive operation, especially for high-bit groups.
This made me think if it made sense to build a small service offering moduli files for download, regenerated weekly or so. OpenSSH offers a way to check the safety of the generated primes with the -T
option of the ssh-keygen
util, so a user should be able to verify that the primes are safe. This takes significantly less time than generating a lot of candidates and and checking for safe primes in those.
Now my question is: is this procedure actually sufficient to verify that a foreign moduli file has not been "backdoored" somehow? Could an attacker put specially crafted values in there, enabling them to break the key exchange, without a user noticing?