Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It's a real shame that SSH lacks a PSK hybrid cryptosystem-- sure, the pitfalls of managing keying material make PSK itself only moderately secure in practice, but requiring the attacker to have both stolen the PSK and have some novel asymmetric crypto attack is a powerful combination.

If nothing else it may save you against a rapid automated attack that hits you faster than you could even read the security announcement.

Of course, one can put ssh behind wireguard and probably should for attack surface reduction.

Longer term I think it's time to reconsider some of the "too much cryptography" principles and start moving to diverse hybrids for every asymmetric path that can afford the cost.

Perhaps TLS is stuck with X25519MLKEM768 but I don't see any reason why my SSH server couldn't be using "E-521 + RSA-8192-KEM + FrodoKEM-1344 + mceliece8192128" for its key agreement and then after authenticating mixing in a preshared component-- this can be done quite efficiently if you use a zero-knowledge approach for establishing the authentication key (which you should already do for privacy/targeting reasons) because the hash of the authenticating pubkey is a candidate preshared key.

(If that's not clear enough: I'm saying that if you take care to make the protocol not divulge the pubkey used to authenticate, it can be used as an additional symmetric key at no additional key management cost.)

The older arguments against using a hybrid with many distinct hard problems even when bandwidth and compute are irrelevant are less relevant than they've ever been before-- recent contests have resulted in well reviewed implementations of many different schemes, LLM powered review has made integration of these simple self contained codes cheaper and safer than ever before. ... and the prospect of significant mathematical advances eroding formerly trusted asymmetric schemes is particularly great.

 help



Many years ago, I used haproxy as a multiplexing proxy which forwarded an incoming SSH connection to their respective internal server based on SNI (I wrapped SSH client connections inside openssl s_client). Vanilla SSH connections were forwarded to a dedicated honeypot server, ssh-over-tls was forwarded to its target server based on SNI, so this setup was invisible to nosy people probing the server. It was only a proof-of-concept I used briefly because someone on SO had said something like this can't be done and I took the challenge, but it was surprisingly simple. In other words, you can always roll your own PSK-like solution on top of SSH, depending on which hoops you want to jump through (convenience).

I've tried to have them take patches to use TCPMD5 for PSK, but have failed.

Another "post-asymmetric cryptography" idea that may be useful for SSH, VPN, Chat, etc. sort of uses would be a chained symmetric secret:

For each communication partner, store a small set of additional 256-bit secrets. After establishing your authenticated session share hashes of the secrets you have in common and find the most recent in-common value. Then mix its secret into your current keys. After doing so generate a new random value for both sides to replace them.

The effect of this is that a passive store and decrypt attack must have successfully intercepted EVERY communication between these parties. As soon as one session goes across a link they failed to monitor, they've lost the trail at least until one of the sides loses their cache.

It's ineffective against an active attack that could tamper with the traffic to suppress the cache. But it should often kill the store-and-decrypt-later attack dead without any reliance on asymmetric crypto or dependency on user-facing symmetric key management. User practices of intentionally communicating across diverse channels could strengthen it further. (Are the attacker somehow gonna capture your wired internet, your cellular internet, and the device to device bluetooth link that one time you were talking in person?)


There are various methods for generating pre-shared secret keys to be used only one time, for the establishment of a secure connection, and then never again.

The only part that needs care is to use a protocol that would allow the resynchronization of the two parties when some connection attempts fail for various reasons, but after that, one party may believe that the connection has succeeded, while the other party thinks that it has failed, thus at the next connection attempt they may use other secret key values than expected by the other party.


Good point. Grandma can pair her bluetooth hearing aid. Jrandom-engineer should be able to pair their SSH connection to their jump server or home.

Some future version of OpenSSH will implement the recent RFC 10042, i.e. mlkem1024nistp384-sha384, which is stronger than the version of hybrid ML-KEM currently implemented in TLS 1.3 and OpenSSH, by using the minimum parameter sizes mandated by NSA in "Commercial National Security Algorithm Suite 2".

Okay? That's still not a pre-shared key, it still relies on combining elliptic curves and ML-KEM doesn't it?

That is indeed not pre-shared key, it was a response to "TLS is stuck with X25519MLKEM768", to show that OpenSSH is not stuck to that, but it is expected in a few months to support extra options.

Unlike SSH, IPsec has always supported pre-shared keys and in the past I have used many VPNs based on IPsec with pre-shared secret keys.

Early versions of TLS also supported pre-shared secret keys for connections where both the client and the server are authenticated. TLS 1.3 has retained only a small number of the options existing in earlier versions, and I do not remember seeing pre-shared keys among them, which is not too surprising, as the main use of TLS is for half-authenticated connections, where only the server is authenticated, while pre-shared secret keys are for connections between parties who already know each other.


I believe slipping a PSK into ssh would require a somewhat more extensive redesign of the protocol. The issue is the key agreement happens ahead of any authentication and any PSK would at least need to be user specific.

Would it be feasible/easier to add a layer with better encryption on top of SSH?

Like some sort of protocol that creates a virtual network perhaps.

kinda disappointing to just be at the minimum.

E-521 ECDH is also about two and a half times as fast as P384 (ed448 about 4x as fast?) and it isn't like the ssh use-case cares about 18 more bytes or some kind of installed base of hardware acceleration.

/me heads off to go invent E-1279 ECDH.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: