247 points · by rurban · 4y ago · 108 comments
NIST is conducting a competition for post-quantum key exchange and signature algorithms. NTRU Prime did not make the cut as a key exchange finalist.
It appears that NTRU Prime is going ahead in OpenSSH, without any formal endorsement from NIST.
In the notes listing NTRU Prime as an alternate (and rejection as a finalist), Daniel J. Bernstein filed a complaint with his experience at NIST:
https://csrc.nist.gov/Projects/post-quantum-cryptography/rou...
"Formal complaint regarding 8 June 2021 incident - 2021.06.15, Daniel J. Bernstein..."
"Executive summary. A week ago Dr. Daniel Apon from NIST publicly accused me of professional misconduct. Specifically, he accused me of initiating private contact with NIST so as to provide false information to NIST regarding the timing of an upcoming announcement relevant to NIST’s ongoing decisions..."
It is unfortunate that this disfunction has a practical impact upon OpenSSH.
[0] https://03283664099418252878.googlegroups.com/attach/6f5422d...
Well, goes to show how little I know. Been using this for years but apparently not!
https://superuser.com/questions/686394/scp-between-two-remot...
https://unix.stackexchange.com/questions/8707/whats-the-diff...
I don't know what you're trying to say here. Perhaps you misunderstood what's been added? Example:
$ sftp HOST
Connected to HOST.
sftp> cp filea fileb
Invalid command.Update: Thanks for the replies. I should've done a bit of extra research about scp first. Guess this is an example of Cunningham's Law.
It isn't suited for millions of files, but neither is scp.
To transfer a set of files from local device to a remote device is as easy as:
tar -c path/to/file1 path/to/file2 ... | ssh user@hostname tar -x
The flags can be memorized with a mnemonic: -c = create (archive file)
-x = extract (archive file)There is wild variation in tar implementations beyond what is required by POSIX.
https://www.linode.com/docs/guides/copying-a-disk-image-over...
It's not enabled by default in some distributions and many "how to secure your server" guides recommend disabling it/keeping it disabled due to the best practice of only enabling necessary services.
This will break `scp` for many corporate cases (where arguing that sftp is necessary is an impossible fight)
I've written a few custom ssh servers and you don't really need to do anything to them to support scp.
sftp uses the sftp subsystem. scp just uses regular ssh requests and transports data over the ssh channels.
TL;DR it's just the same command, mostly, for now.
As far as I remember, rsync does a few neat tricks like hashing files on both sides of a connection to determine whether it's worth transferring them over a potentially slow connection, which would not work with pure sftp.
Hint for the future : There's a search box on the bottom of HN. ;-)
(The current thread was posted earlier - you can tell from the item IDs.)
Thus, even if you allow some adversary to literally pick the arbitrary data, when you'll sign that data and so on, your signing it cannot possibly allow them to impersonate you to a SSH server.
This is easier to pull off than the rationale for key re-use in encryption because signing opaque blobs is a neutral action your SSH client already does, if adversaries could learn your keys or whatever from seeing you sign such a blob, then SSH authentication itself would be unsafe already. In contrast decrypting data an adversary sent to you might reveal something, especially if you can be persuaded (as happened for HTTPS with older TLS versions and most popular implementations) to tell the adversary what happened when you tried so this will usually be dangerous and a rationale for why it's safe must be thorough if we want non-experts to do it.
What exactly happened for HTTPS with older TLS versions? Sounds like you’re alluding to some sort of oracle attack.
It's fuzzy, perhaps somebody will remind me of the specifics.
Just wondering what kind of situation can this be where someone has only your ssh public key? Usually people know each other via say, github user names or irc handles but ssh public keys? (genuinely curious)
Yeah, I too find it a really bizarre comment to make, especially as it is not substantiated with any detail whatsoever.
OpenSSH comes from the house of OpenBSD and LibreSSL.
I am no security guru, but as I understand it, all three have a well deserved security reputation, and the core maintainers run a tight ship.
We've already covered in recent weeks on HN how OpenSSH has maintained its robustness in the face of an increasingly hostile cyber world.[1]
So, if you are going to imply that OpenSSH code is shit, back it up with hard facts.
I haven't even exhaustively looked through this code, only took a quick glance at clientloop.c [1] and was curious about how the channels were integrated into the poll loop.
This is a mess, and I'm pretty sure I already see a bug.
[0] https://github.com/openssh/openssh-portable/blob/master/chan...
[1] https://github.com/openssh/openssh-portable/blob/master/clie...
Edit: I'm not looking at a future CVE, but I've definitely found a bug. For those of you tossing up low-effort straw men, actually go grok the code. The way they've integrated the poll loop into all the actual handling of the returned events is a sprawling mess, and the bug I've found is a direct result of that.
Among us security gurus, OpenSSL has a really bad reputation. It's a giant pile of spaghetti code with a huge history of critical system vulnerabilities stemming from trying to be everything to everybody. Bitcoin is in the process of writing replacement functionality in order to remove OpenSSL entirely from its dependency tree because they got burned by major bugs multiple times in the past. A lot of modern alternatives like libsodium list "not OpenSSL" as a selling point. The situation is so bad that multiple organizations have forked OpenSSL to create stripped down alternatives (BoringSSL, LibreSSL) that are more likely to be secure.
I know less about the OpenSSH code base specifically, except that it came out of the same culture and the same developers. I wouldn't use it in new projects unless I had no other choice.
OpenBSD has some very peculiar preferences, some of which are in step with modern thinking (e.g. they like sandboxes, privilege dropping and defence in depth very much) but some very much are not (they like C despite its lack of Type Safety, Memory Safety, and generally just Safety)
SecSH (the SSH v2 standard) is a fairly clean modern encrypted protocol design. You do a key exchange, you bring up an encrypted link and then everything else happens inside this, alleviating many of your security concerns, the same way TLS 1.3 works (but TLS 1.3 is much more recent).
But the OpenSSH codebase dates back to even before SSHv2, it's basically the original SSH codebase, from back when encrypted remote shells was an entirely new idea, the mid-1990s, the SSH codebase went proprietary and OpenSSH is the fork. That's some crufty old code, and in C that's not an insignificant problem because problems in code you never read has potentially drastic consequences for unrelated code in the same binary.
I remember recurring complaints about the state of OpenSSL for years before e.g. mBed TLS and LibreSSL happened, but granted it's a decent example.
> it's basically the original SSH codebase
Would you be able to prove that by showing a bisection of the current sources and one of the releases from 22 years ago? I'd be surprised if not almost every single function in the code base hadn't seen significant changes.