logoalt Hacker News

adrian_b • today at 10:11 PM • 0 replies • view on HN

There are 2 separate algorithms, the key encapsulation mechanism, which transfers secret keys between parties when a connection is established, and which is important against adversaries who would record now the communications, for decrypting them later, and the digital signature algorithm, which is important against adversaries who would try to impersonate you in the future, if they break it.

Your recommendations, like RFC 9941 sntrup761x25519-sha512 and those based on ML-KEM are for the key encapsulation mechanism.

I am among those who believe that the arguments that ML-KEM is significantly weaker than NTRU Prime are correct, and that the recent attack by Anthropic has confirmed the predictions made about ML-KEM long ago, even if for now the attack is completely impractical (but it might be improved in the future).

The only reason why NIST has preferred ML-KEM is that when implemented in dedicated hardware, not in software, the cost of ML-KEM can be lower than for NTRU Prime. The reason is exactly the same for which the weaker polynomial hash of GCM has been preferred by NIST instead of the stronger Poly1305. Both ML-KEM and the GCM hash can be cheaper than NTRU Prime and Poly1305 in dedicated hardware, because they can replace some integer multipliers with other simpler circuits (due to making computations in powers-of-two fields instead of prime fields).

So I recommend to use in SSH sntrup761x25519-sha512.

The algorithm mentioned by you, RFC 10042 mlkem1024nistp384-sha384, is designed for a higher security level than the algorithms currently available in TLS 1.3 and in SSH. I believe that it will be available only in a future version of OpenSSH.

The current version has only mlkem768x25519-sha256, which is equivalent with what TLS 1.3 has.

For digital signatures, OpenSSH for now offers ssh-mldsa44-ed25519, which should be chosen when generating host keys.

So one needs to both generate new host keys with ssh-mldsa44-ed25519, and edit the client and server configuration files, to prefer sntrup761x25519-sha512 and mlkem768x25519-sha256, in what order you like.