Dangerous SHA-1 crypto function is about to die in SSH
arstechnica.com
arstechnica.com
Except for the great many security contexts where chosen-prefix collisions are not problematic. NIST for example has suggested SHA-1 is acceptable for such applications ("Hash (B)") for "2019 - 2030 & beyond".
>From a security-technical perspective, however, there is, according to present knowledge,no reason speaking against using it in constructions which do not require collision resistance...
Just don't use SHA1 unless you absolutely are forced to do so, not when you make something new from scratch that can use SHA256.
https://projectbullrun.org/dual-ec/vulnerability.html
It seems from many sources that NIST were pushing a backdoored RNG source for a while.
The main source for the ssh-keys arch wiki even says not to trust NIST.
https://wiki.archlinux.org/index.php/SSH_keys https://stribika.github.io/2015/01/04/secure-secure-shell.ht...
For reference RHEL 5 was released in 2007 and is supported to the end of this year for some customers.
[1] http://libguestfs.org/virt-v2v-input-xen.1.html#ssh-authenti...
In this case there is a workaround (on the RHEL 8 / ssh client end) which is to enable legacy crypto policies. However you have to do this globally at least for all ssh connections (and our recommended command does it globally for the whole machine), and I guess there are reasons why the legacy policies are disabled by default, probably to do with possible MITM attacks against weak cyphers. So the situation isn't exactly ideal.
Having said all that it would be up to me to actually fix this and I haven't looked into it in great detail since I don't believe any customers have asked about it. We only found out about it in our internal product QA.
Old large organization are compliance and process oriented. They run security audits that scan machines, finding X version of software that's end of life and Y cipher that's insecure, then raise control breaks to the systems owners to resolve.
Of course there are extended extended extended support programs for companies who are willing to pay.
RHEL 5 is unusable at this point in time. It can't even run a HTTPS request to other systems because it's doesn't support TLS. It can't compile any software because it's stuck on gcc from more than 10 years ago.
My company is upgrading the last machines from RHEL 6 and they're causing quite a bit of issues due to all the packages and operating systems being obsolete. It's reaching a point where it's less trouble to upgrade than to keep running. I can't imagine people still running on RHEL 5 willingly, they must be stuck running old software whom source code was lost.
I agree on your other points though, but for some customers they still want to run RHEL 5 and it may not be a priority for them to do TLS requests or run GCC on new software - if they haven't been doing that on RHEL 5 up til now, why would they start? They often have some old database or bit of software that keep chugging along and would cost money to replicate or replace.
We even offer a way to virtualize RHEL 5 servers so you can keep them running on "new" (virtual) hardware. (http://libguestfs.org/virt-p2v.1.html)
Should clarify that the end-of-life schedule is coinciding for many platforms: RHEL 5 and RHEL 6, java 7 + 8, windows server 2008 + 2012, python 2.
I don't think it's possible for RHEL 5 upgrade to not be an emergency priority at this stage. It's not able to run or to communicate with much of anything else (all platforms dropping SSL is one issue for example). What is the company gonna do when they can't curl and ssh between systems anymore?
From the modernity point of view, Xen is far more modern, with proper seperation. But even Amazon is going away from Xen. Maybe to make it easier to break out of the hypervisor?
If I as a non-cryptographer understood it correctly the keys can remain, but different fingerprints are needed. Is it so that you have fingerprints in known_hosts, but not in authorized_keys?
ssh-rsa as a key format will stay (it isn't specific to sha1 or sha2), just the client and server need to upgrade to sign/verify session-specific signatures using sha256 instead of sha1. rsasign(sha1(sessiondata)) becomes rsasign(sha256(sessiondata)).
OpenSSH CA certificates are more urgent to upgrade since those are/were long lived sha1 signatures - sha1 there got disabled a couple of releases ago I think.
The article seems bit sensational and lacking understanding.
Given that the digests are shorter than the messages they are meant to identify, this is not at all a "theoretical" possibility (you can prove this with a "pigeonhole" proof).
Or since it's not RSA being taken out, is this just a matter of updating .authorized_keys with new SHA256 hashes for the same keys?
The Authorized Keys list is of actual public keys, not hashes, so that doesn't change. That's why the line length is much longer for a larger key (e.g. 4096-bit RSA) and shorter for small key like ECDSA.
So in what sense is "ssh-rsa" going to be removed? Just as a protocol enum, with no user-visible impact for these purposes?
The ssh-rsa algorithm is one of two authentication algorithms described in the first SecSH (IETF standardised SSH version 2) documents in 2006. The other (ssh-dsa) was never very popular and has been untrustworthy for a long time. So up until this point even a very old client or server could expect to interoperate with the latest software using ssh-rsa. Of course an individual setup might forbid this, but in general it could work. The announced change in OpenSSH means it will be necessary to give up on very old systems because they're incompatible, or else use a shim to restore compatibility if that's essential for you.
This previously happened with SSH version 1 - once upon a time OpenSSH could interoperate with SSHv1, then it required a config override to allow that, and then they removed the compatibility from their source code entirely, but SSHv1 pre-dates the widespread modern popularity of SSH, so it probably had less impact than this will.
I propose shac = sha1sum(sha512sum(data)) - for sha concatenated.
Thoughts?
That being said, most people are probably willing to live with the 8 additional bytes required by SHA-2/224 (which, IIRC, is itself a truncated special case of SHA-2/256).
I use it in my projects when I need to serialize hashes, as it has nice go and javascript libraries.
None of them do it with "sha1://" though...
There's nothing really wrong with SHA-2 for existing applications (well, other than the length extension thing), but if you don't need to be compatible with hashes/applications that already exist, consider BLAKE2 as the current "default" hash.
That is: for key derivation from an user-entered password (which might have poor entropy), use algorithms specialized for that like PBKDF2 or Argon2. For everything else, you can use a modern fast cryptographic hash algorithm like BLAKE2 or BLAKE3.
If you are hashing passwords (or doing equivalent operations - specifically, the inputs are much lower entropy than the bit length of the hash output, and attackers have basically unlimited guesses), then you want a password-hashing algorithm, and not a general-purpose cryptographic hash, and you want it to be much, much slower than any general-purpose cryptographic hash - i.e., each attempt should take a good fraction of a second. Argon2 and scrypt are good password-hashing algorithms. None of MDx nor SHA-x nor BLAKEx are suitable here, at least not directly. (You can use them as a primitive in a password-hashing algorithm - for instance, Argon2 happens to use BLAKE2 internally - but then it doesn't matter if the primitive is "too fast," the password-hashing algorithm will just run it multiple times to slow things down.)
For all other purposes, including signing and verifying files (documents, executables, etc.), signing and verifying cryptographic certificates, signing and verifying chats, etc., - i.e., cases where the input is higher entropy than the hash length and you're using the hash to allow you to sign/verify a smaller item than the original message - you want a fast, secure cryptographic hash, because that's how you build a fast, reliable system that people will use and not decide they want to use plaintext instead. Also, as it happens, most cryptographic hashes (not password-hashing algorithms) that are slow are also weaker than the cryptographic hashes that are fast.
These are two different use cases that demand two different tools, and it's dangerous to lump them in under the terms "security context," because you'll end up with less secure and less usable systems. Password hashing needs a password hashing algorithm to be even slightly secure, and everything else needs a good hash, not just a slow one.
If you were able to generalize the SHA1 algorithm, to 256 bits, would it still be in the realm of exploitability?