I've always used the WireGuard pre-shared key option on my WireGuard servers. It's what gives me confidence that an open WireGuard port on the public internet is safe.
Whereas a public open SSH port has always seemed (and proved) dangerous, now more than ever.
It's impossible to detect an open wireguard port as no response is generated unless you have the correct key. SSH on the other hand is easily scanned for.
The phrase "security thru obscurity" is something that people parrot because they heard it somewhere and it makes them feel smart. In reality, all cybersecurity is security thru obscurity. There's nothing else but obscurity. The entire field of encryption is literally obscuring.
A thinking person understands that security, like obscurity, is just a matter of degree, and the only lever you have is increasing the cost for the attacker by increasing obscurity. Security isn't binary, it's a matter of degree in the form of cost.
Obscure as in "I'm using a port nobody can guess" and obscure as in "I multiplied two large primes together that nobody can guess" are very different. Crypto is definitely obscuring, but it is muddying the waters too much to conflate them.
Though there is a point to be made to also make obscurity a layer of your defence strat (albeit not effective for all threat models, and brittle).
After all, most organisations dont put out their whole network design, serverpark documentation and infra architecture out in the open. It usually goes by many names, like 'company secret', 'internal knowledge', 'NDA', but in the end its all just obscurity.
For me it just another layer of the onion. I don't really consider it security, though I do qualify it as some sort of defence.
> In reality, all cybersecurity is security thru obscurity.
No, that's not what that word means. "Obscurity" means low/no entropy. If you're leaning on a "secret" int between 0 and 65,536 then it's going to break. If your secret is a random int between 0 and 2^2048 then that's not "obscurity", that's an actual secret.
Yes, it is. And code is data.
"Security through obscurity" is all that exists.
Cryptography is, in good part, about the practice of using mathematics for the assurance of sufficiently sophisticated obscurity.
The trope of "security through obscurity bad" does not survive scrutiny, because it was never meant to. It's a "practical sense" shorthand, not something to actually deeply consider like this. It falls apart immediately when you do.
Most obscurity is not sophisticated. The things the users are doing aren't much different than a kid hiding behind a sofa and they think their dad doesn't know where they are any longer.
I really do wonder how the cookie will crumble with hardness assumptions in this regard.
The currently trending story may be that it is only a matter of time before the frontier AI labs crack all crypto and then we're hosed, but it's also possible they find hardness proofs and better constructions instead.
Though maybe their focus is not pointing that way right now / counterarguments may continue to be more discoverable.
Nothing wrong with security through obscurity, even in its most naive form of changing your port ranges and stuff like that. It's only a problem when some obscurity is the only method of securing.
Obscurity adds layers of security, and security is all about layering and increasing the difficulty, not about some perfect binary solution secure vs not secure.
Defense-in-depth does not use security-through-obscurity alone, but obscurity can still be a valuable part of a complete strategy. You should know better than "obscurity makes a system less secure"
There have been a variety of issues with different SSH daemon implementations and configurations. You can also just make a dangerous mistake with your own configuration, or a cloud provider can easily have a bad default cloud-init sshd config that overrides your safe config, etc.
One good example:
regreSSHion, CVE-2024-6387, is an unauthenticated remote code execution in OpenSSH’s server (sshd) that grants full root access. It affects the default configuration and does not require user interaction. It poses a significant exploit risk.https://www.qualys.com/regresshion-cve-2024-6387
With WireGuard, using a pre-shared key, attackers are interacting with virtually no code unless they have a valid encrypted packet, and then they still need the peer key to connnect.
With an SSH server, there's a lot of code being executed by any remote attacker pre-authentication. Any exploit in this code can grant access. This is just inherently more risky.
I'm weakly inclined to view wireguard as even safer than openssh, but that's not the same as saying that the latter is proven unsafe. As that link notes, that was "the first OpenSSH vulnerability in nearly two decades", and while it was bad, it doesn't appear that anyone demonstrated exploitation against a 64-bit host, and openssh's response ( https://lists.mindrot.org/pipermail/openssh-unix-announce/20... ) was to promptly separate components precisely to reduce the amount of code that an unauthenticated attacker can even possibly reach. Wireguard has less code and is deliberately harder to hold wrong, but what code it has is running in ring zero, which a person could also describe as "just inherently more risky".
Again, not wanting to act like wireguard is bad or openssh is perfect. I just think your comment is a bit far the other way.
The ideal management of pre-shared secret keys is with computers that would have an automatic pairing functionality, i.e. you would connect an USB cable between them and they would exchange automatically the secret keys that would be used in the future for establishing secure connections through the network.
Lacking that, you must use some secure random number generator to produce a secret key on one of the computers, which should preferably be stored in an encrypted file, like the SSH private keys.
It depends on the VPN program whether the pre-shared key consists of a single key or of a pair of keys. In the latter case, which is better, each key is used for one of the two communication directions. In any case, this does not matter for key distribution, because even when there are 2 keys, both must be known by each of the two communicating computers.
Then you must transport it to the correspondent computer, e.g. using an USB memory. If using an USB memory, the file stored on it should be encrypted, because you can never be sure that a file deleted on an USB memory is really deleted. Even if you overwrite the file, the memory controller might have remapped the file and the original content might survive somewhere else in the USB memory. The same is true for SSDs/HDDs, which is why such pre-shared secret keys should normally be stored only in encrypted files and they should exist in decrypted form only in the DRAM memory.
However, how the secret keys may be encrypted depends on the VPN program. With a dumb VPN program, which does not know to handle encrypted files with the secret keys, one can use a RAM disk in which to decrypt the secret key from a file stored on the SSD, then you can point the VPN program to the secret key in a file on the RAM disk.
A unique pre-shared secret key (or pair of keys) must be used for every pair of computers that must communicate.
In a big network, in order to avoid the need to have a number of secret keys proportional with the square of the number of computers, one can have one or more proxies for the establishment of secure connections (i.e. somewhat similarly to how Kerberos worked), in which case the number of secret keys is reduced to be proportional with the number of computers.
Even without proxies, in a network with N computers the number of PSKs is N(N-1)/2, but every computer stores only N-1 PSKs, which is not different from the case when public keys are used, when the same number of host keys is stored in each computer.
You generate a key pair on your client machine, and then you connect to your server from one of the other machines you already have connected to its WireGuard VPN, copy the public key of your new client to the WireGuard config on that server along with adding the usual AllowedIPs etc. Restart WireGuard on the server and there you go.
When a client machine is lost, stolen or broken you connect to the server from another device again and outcomment the lines in WireGuard config for the no-longer-trusted client. Restart WireGuard on the server.
The PreSharedKey is also uniquely generated by you per client. But it doesn’t matter if you generate it on the server or client side. It is after all as the name says, shared by both of them so they both know what it is. For simplicity and since we are already generating the key pair client side we might as well generate the preshared key there too at the same time.
What would you have guessed that the procedures would be?
Nah, it's not that risky with private keys, timely security updates , and a correct configuration. But you'd be much safer with WireGuard in front.
I've been around long enough to remember upgrading servers from telnet to ssh. Some of those servers were on the public internet with `root` / `rootroot` credentials, which wasn't all that dangerous back then either, which is very funny now.
I really wish they paid some attention to their mobile clients. WireGuard for iOS has a ton of issues and hasn't been updated in 3 years. They said they aren't being paid enough but to me it looks like some sort of control freak situation because there should and would be a (co)maintainer by now. And I assume this project is so good and so popular that even crowd sponsorship would yield plenty of cash.
re: "I believe some VPN
providers are already doing this." - dropping this here for review and feedback, it's work we have done a while ago and currently revising for improvements: https://www.ivpn.net/knowledgebase/general/quantum-resistant...
(i work at IVPN)
Glad in my designs and platforms I now solely use iroh with its post quantum key exchange algorithm, sure it was more efforts to develop initially compared to using a ready wiregaurd gateway but worth it for the coming years.
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.
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".
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.
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.
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.
It is also one of the reasons that makes WireGuard Client management a nightmare because of the pre-shared key.
OPNSense WireGuard plugin has involved a ton making this process less painful. I remember to install qrcode CLI tool to make it easier to add devices with camera without having to copy/paste things around haha
It is the only open door on my firewall. I have tried to exploit it to an extend but OPNSense blocked the attempt before WireGuard knew what was going on without warning while logging the action. I accepted the risk, but no VPN = No homelab access
> If you can actually pre-share a key over a secure offline means, the security of the WireGuard protocol comes down to breaking that 256-bit ChaCha20 key, which isn't going to happen, rather than any asymmetric primitive.
sneakernet is back baby! Love living in the cyberpunk future where crypto is cooked.
(note: not a criticism of wireguard)
it would also be nice to have some very limited cipher agility just for hardware support. if both peers support it AES-256 should be used instead of chacha20.
A bunch of insane over reactions. There's literally no indication anything is wrong, other than people reading between the lines, because they're desperate for something interesting to happen.
The largest single employer of mathematicians, tasked with protecting national secrets and information security, told the world to stop using non-PQ crypto. Which part are you struggling with?
More precisely, they mandate that after this New Year, no new devices or products shall sign root certificates with algorithms that are not quantum-resistant, i.e. using non-hybrid algorithms with RSA or elliptic curves.
Regarding the already existing devices or products, they may be used until the end of 2030, after which everything must support quantum-resistant algorithms.
Its more NSA scare tactics to get people to adopt standards they control. If you think the NSA is looking out for the general public, I have a bridge in Brooklyn to sell you. These people have literal data centers dedicated to storing your pi, and have been caught defying every law in the books when it comes to spying on US citizens (and foreign citizens).
I personally think every NSA employee deserves an early retirement in a 10x10 room with a concrete bed.
> The largest single employer of mathematicians, tasked with national secrets and information security.
What are you writing a movie trailer script????
This is what I mean, Americans just want to be in their own little movie where things are happening around them.
Anyways, I know people in the know and literally nothing is in the pipe, I knew early on Saturday too!. You will be using your ed25519 key to push your code to your github this time next year for your vibe coded fake SaaS app with 3 MAU.
I'm not in a hurry to run in the direction the NSA is pointing at and telling everyone to run too, they're no friend of encryption, and actively try to undermine it however possible.
I've always used the WireGuard pre-shared key option on my WireGuard servers. It's what gives me confidence that an open WireGuard port on the public internet is safe.
Whereas a public open SSH port has always seemed (and proved) dangerous, now more than ever.
Thanks Jason!
> Whereas a public open SSH port has always seemed (and proved) dangerous, now more than ever.
Wait, did I miss something? When has opensshd proven dangerous to expose?
It's impossible to detect an open wireguard port as no response is generated unless you have the correct key. SSH on the other hand is easily scanned for.
> easily scanned for.
unless you use IP whitelisting
Which is great if you're always behind a particular IP. As for the rest of the world...
This is an argument for security-through-obscurity.
The phrase "security thru obscurity" is something that people parrot because they heard it somewhere and it makes them feel smart. In reality, all cybersecurity is security thru obscurity. There's nothing else but obscurity. The entire field of encryption is literally obscuring.
A thinking person understands that security, like obscurity, is just a matter of degree, and the only lever you have is increasing the cost for the attacker by increasing obscurity. Security isn't binary, it's a matter of degree in the form of cost.
Obscure as in "I'm using a port nobody can guess" and obscure as in "I multiplied two large primes together that nobody can guess" are very different. Crypto is definitely obscuring, but it is muddying the waters too much to conflate them.
Though there is a point to be made to also make obscurity a layer of your defence strat (albeit not effective for all threat models, and brittle).
After all, most organisations dont put out their whole network design, serverpark documentation and infra architecture out in the open. It usually goes by many names, like 'company secret', 'internal knowledge', 'NDA', but in the end its all just obscurity.
For me it just another layer of the onion. I don't really consider it security, though I do qualify it as some sort of defence.
> In reality, all cybersecurity is security thru obscurity.
No, that's not what that word means. "Obscurity" means low/no entropy. If you're leaning on a "secret" int between 0 and 65,536 then it's going to break. If your secret is a random int between 0 and 2^2048 then that's not "obscurity", that's an actual secret.
unless its 4, of course
RSA actually is security through obscurity, where the obscurity is that nobody will figure out practical factoring.
The NSA itself has a secret suite of cryptographic primitives for this exact reason.
https://en.wikipedia.org/wiki/NSA_Suite_A_Cryptography
Explain how one time pad is security by obscurity.
Because the pad is not visible to those you want to keep the communication secure from. The pad is 'obscured'.
We just call those secrets in the biz.
Right, just like the logic here.
It's just dark turtles all the way down
Is a password security through obscurity, since it’s just some not-well-known (known by one) string?
Security through obscurity mostly refers to the attacker not knowing how the system works, not hiding information.
Yes, it is. And code is data. "Security through obscurity" is all that exists.
Cryptography is, in good part, about the practice of using mathematics for the assurance of sufficiently sophisticated obscurity.
The trope of "security through obscurity bad" does not survive scrutiny, because it was never meant to. It's a "practical sense" shorthand, not something to actually deeply consider like this. It falls apart immediately when you do.
Sophisticated obscurity is the key.
Most obscurity is not sophisticated. The things the users are doing aren't much different than a kid hiding behind a sofa and they think their dad doesn't know where they are any longer.
I really do wonder how the cookie will crumble with hardness assumptions in this regard.
The currently trending story may be that it is only a matter of time before the frontier AI labs crack all crypto and then we're hosed, but it's also possible they find hardness proofs and better constructions instead.
Though maybe their focus is not pointing that way right now / counterarguments may continue to be more discoverable.
Nothing wrong with security through obscurity, even in its most naive form of changing your port ranges and stuff like that. It's only a problem when some obscurity is the only method of securing.
Obscurity adds layers of security, and security is all about layering and increasing the difficulty, not about some perfect binary solution secure vs not secure.
Layered security*
Defense-in-depth does not use security-through-obscurity alone, but obscurity can still be a valuable part of a complete strategy. You should know better than "obscurity makes a system less secure"
Security-through-obscurity is another slice of Swiss cheese, albeit one with a big hole.
I would hardly consider that "dangerous."
There have been a variety of issues with different SSH daemon implementations and configurations. You can also just make a dangerous mistake with your own configuration, or a cloud provider can easily have a bad default cloud-init sshd config that overrides your safe config, etc.
One good example:
regreSSHion, CVE-2024-6387, is an unauthenticated remote code execution in OpenSSH’s server (sshd) that grants full root access. It affects the default configuration and does not require user interaction. It poses a significant exploit risk. https://www.qualys.com/regresshion-cve-2024-6387
With WireGuard, using a pre-shared key, attackers are interacting with virtually no code unless they have a valid encrypted packet, and then they still need the peer key to connnect.
With an SSH server, there's a lot of code being executed by any remote attacker pre-authentication. Any exploit in this code can grant access. This is just inherently more risky.
I'm weakly inclined to view wireguard as even safer than openssh, but that's not the same as saying that the latter is proven unsafe. As that link notes, that was "the first OpenSSH vulnerability in nearly two decades", and while it was bad, it doesn't appear that anyone demonstrated exploitation against a 64-bit host, and openssh's response ( https://lists.mindrot.org/pipermail/openssh-unix-announce/20... ) was to promptly separate components precisely to reduce the amount of code that an unauthenticated attacker can even possibly reach. Wireguard has less code and is deliberately harder to hold wrong, but what code it has is running in ring zero, which a person could also describe as "just inherently more risky".
Again, not wanting to act like wireguard is bad or openssh is perfect. I just think your comment is a bit far the other way.
Eh, many crypto stacks are full of holes and exploits
It’s been awhile, but there have been exploits. Also constant attempts.
Hm how do you manage the keys? I have guesses but figured I'd just ask.
The ideal management of pre-shared secret keys is with computers that would have an automatic pairing functionality, i.e. you would connect an USB cable between them and they would exchange automatically the secret keys that would be used in the future for establishing secure connections through the network.
Lacking that, you must use some secure random number generator to produce a secret key on one of the computers, which should preferably be stored in an encrypted file, like the SSH private keys.
It depends on the VPN program whether the pre-shared key consists of a single key or of a pair of keys. In the latter case, which is better, each key is used for one of the two communication directions. In any case, this does not matter for key distribution, because even when there are 2 keys, both must be known by each of the two communicating computers.
Then you must transport it to the correspondent computer, e.g. using an USB memory. If using an USB memory, the file stored on it should be encrypted, because you can never be sure that a file deleted on an USB memory is really deleted. Even if you overwrite the file, the memory controller might have remapped the file and the original content might survive somewhere else in the USB memory. The same is true for SSDs/HDDs, which is why such pre-shared secret keys should normally be stored only in encrypted files and they should exist in decrypted form only in the DRAM memory.
However, how the secret keys may be encrypted depends on the VPN program. With a dumb VPN program, which does not know to handle encrypted files with the secret keys, one can use a RAM disk in which to decrypt the secret key from a file stored on the SSD, then you can point the VPN program to the secret key in a file on the RAM disk.
A unique pre-shared secret key (or pair of keys) must be used for every pair of computers that must communicate.
In a big network, in order to avoid the need to have a number of secret keys proportional with the square of the number of computers, one can have one or more proxies for the establishment of secure connections (i.e. somewhat similarly to how Kerberos worked), in which case the number of secret keys is reduced to be proportional with the number of computers.
Even without proxies, in a network with N computers the number of PSKs is N(N-1)/2, but every computer stores only N-1 PSKs, which is not different from the case when public keys are used, when the same number of host keys is stored in each computer.
You generate a key pair on your client machine, and then you connect to your server from one of the other machines you already have connected to its WireGuard VPN, copy the public key of your new client to the WireGuard config on that server along with adding the usual AllowedIPs etc. Restart WireGuard on the server and there you go.
When a client machine is lost, stolen or broken you connect to the server from another device again and outcomment the lines in WireGuard config for the no-longer-trusted client. Restart WireGuard on the server.
The PreSharedKey is also uniquely generated by you per client. But it doesn’t matter if you generate it on the server or client side. It is after all as the name says, shared by both of them so they both know what it is. For simplicity and since we are already generating the key pair client side we might as well generate the preshared key there too at the same time.
What would you have guessed that the procedures would be?
Are pre shared keys the peer keys? Or something separate?
No, because in a config you have two keys:
You must think I'm crazy having run many servers with public SSH ports since 1996. I remember the telnet days...
Nah, it's not that risky with private keys, timely security updates , and a correct configuration. But you'd be much safer with WireGuard in front.
I've been around long enough to remember upgrading servers from telnet to ssh. Some of those servers were on the public internet with `root` / `rootroot` credentials, which wasn't all that dangerous back then either, which is very funny now.
Really lovely even-keeled statement that makes me feel like Wireguard continues to be in good hands.
Thank you, Jason, for your continued work on this!
I really wish they paid some attention to their mobile clients. WireGuard for iOS has a ton of issues and hasn't been updated in 3 years. They said they aren't being paid enough but to me it looks like some sort of control freak situation because there should and would be a (co)maintainer by now. And I assume this project is so good and so popular that even crowd sponsorship would yield plenty of cash.
This, or I am misreading it.
re: "I believe some VPN providers are already doing this." - dropping this here for review and feedback, it's work we have done a while ago and currently revising for improvements: https://www.ivpn.net/knowledgebase/general/quantum-resistant... (i work at IVPN)
tailscale has to get onboard
That's like saying git can't be improved unless GitHub gets on board?
Glad in my designs and platforms I now solely use iroh with its post quantum key exchange algorithm, sure it was more efforts to develop initially compared to using a ready wiregaurd gateway but worth it for the coming years.
https://www.iroh.computer/blog/iroh-post-quantum-handshakes
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.
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.
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.
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.
>pre-shared key option
I didn't know there was an option without it lmao
It is also one of the reasons that makes WireGuard Client management a nightmare because of the pre-shared key.
OPNSense WireGuard plugin has involved a ton making this process less painful. I remember to install qrcode CLI tool to make it easier to add devices with camera without having to copy/paste things around haha
It is the only open door on my firewall. I have tried to exploit it to an extend but OPNSense blocked the attempt before WireGuard knew what was going on without warning while logging the action. I accepted the risk, but no VPN = No homelab access
Thanks Jason
> If you can actually pre-share a key over a secure offline means, the security of the WireGuard protocol comes down to breaking that 256-bit ChaCha20 key, which isn't going to happen, rather than any asymmetric primitive.
sneakernet is back baby! Love living in the cyberpunk future where crypto is cooked. (note: not a criticism of wireguard)
Or use two devices, a speaker and a microphone, no network.
https://chirp.hex.dance/
You jest, but: https://drewdevault.com/blog/Introducing-sneakernet/
What a lovely update from a real human. Why does a simple message stand out so much these days.
It's so cute that they call it SI in this article, took me a while to figure out what that meant :')
Just rot13 everything, twice for good measure. Foolproof.
> ECC was really in an ergonomic sweet spot, which we'll have to move on from. But so it goes.
Yes. LWE is hard to love. But so it goes.
it would also be nice to have some very limited cipher agility just for hardware support. if both peers support it AES-256 should be used instead of chacha20.
And this is how you should write technical updates. Simple, concise, to the point, and reassuring.
Thanks for the great work! PSK WG FTW.
A bunch of insane over reactions. There's literally no indication anything is wrong, other than people reading between the lines, because they're desperate for something interesting to happen.
The largest single employer of mathematicians, tasked with protecting national secrets and information security, told the world to stop using non-PQ crypto. Which part are you struggling with?
More precisely, they mandate that after this New Year, no new devices or products shall sign root certificates with algorithms that are not quantum-resistant, i.e. using non-hybrid algorithms with RSA or elliptic curves.
Regarding the already existing devices or products, they may be used until the end of 2030, after which everything must support quantum-resistant algorithms.
Its more NSA scare tactics to get people to adopt standards they control. If you think the NSA is looking out for the general public, I have a bridge in Brooklyn to sell you. These people have literal data centers dedicated to storing your pi, and have been caught defying every law in the books when it comes to spying on US citizens (and foreign citizens).
I personally think every NSA employee deserves an early retirement in a 10x10 room with a concrete bed.
> The largest single employer of mathematicians, tasked with national secrets and information security.
What are you writing a movie trailer script????
This is what I mean, Americans just want to be in their own little movie where things are happening around them.
Anyways, I know people in the know and literally nothing is in the pipe, I knew early on Saturday too!. You will be using your ed25519 key to push your code to your github this time next year for your vibe coded fake SaaS app with 3 MAU.
Maybe it’s because they finally have a class of exploits against PQ crypto?
They’ve been known to do far dirtier tricks
I don't think the NSA has 2^200 universes worth of quantum computers quite yet
I'm not in a hurry to run in the direction the NSA is pointing at and telling everyone to run too, they're no friend of encryption, and actively try to undermine it however possible.