6 ms·
> "don't block, because blocking is always worse than an guessable value being returned through getrandom(0)". It seems that this fight has continued for so lo
by pjc50 7y ago
> "don't block, because blocking is always worse than an guessable value being returned through getrandom(0)".
It seems that this fight has continued for so long because both possible answers are valid here, depending on the exact use case of the system as a whole(+)? Have we got an interface which lets you properly specify the paranoia vs. best-effort choice yet?
(+) e.g. the SSH server running on your lightbulb may accept that it's not exposed to the internet and therefore not subject to targeted attack, but it's really inconvenient to sit in the dark, so the security-availability tradeoff is worth it.
> most folks are comfortable that attacking the CRNG is no longer the simplest way to crack system security.
Was it ever? It seems that phishing the admins has always been the easiest way.
- justincormack 7y agoIf your lightbulb is running ssh not telnet it is assuming some source of entropy, or it may as well be running telnet. There has been some work on hardening handshakes on protocols where randomness might not be available that it could look at.
- derefr 7y agoDoes that really need to be true? Protocols with fixed keys can skip Diffie-Hellman, right? As such, is there an option to configure OpenSSH such that it has a fixed authorized_keys, and does the authentication handshake in the opposite order: first establishing that it can talk to the client by decrypting the messages the client is sending; and then parsing the client’s auth commands from said decrypted stream, where one SSH AUTH message might be “auth me using the very key we’re conversing over.” If there is, I’m surprised IoT devices don’t go for it. If there isn’t... why not?
- shandor 7y ago> As such, is there an option to configure OpenSSH such that it has a fixed authorized_keys At least you can override the default functionality with your own by utilizing the "authorized keys command". It basically allows you to create your own authorization scheme instead of the default "key in file means access granted"
- tialaramex 7y agoNo, you can't do this in SSH, it would be a radical re-design. I'm not completely certain that it's impossible to make this secure, but it's definitely very easy for it to get done in a way that's insecure.
- tialaramex 7y agoNow I'm in front of an actual PC let's explain a bit more It's absolutely critical in SSH that we end up with a unique session ID which will be the output of a cryptographic hash function (these days maybe SHA-256) but obviously the input to that function must be secret. Everything in the higher level parts of SSH assumes that there is a secret unique session ID. The session ID stays the same for the lifetime of a connection, although you can run key agreement itself again if the connection is long-lived or moves a lot of data so that it's unwise to keep using the same symmetric keys. If you do any variant of DH obviously this session ID is the end result of the first DH key agreement process and so it'll be different every time because you're using random numbers. But if you want to add a "fixed asymetric keys" mode you're going to need to agree a secret session ID for each new connection... somehow. At some cost you could pick at random and send it from one party to the other, but then we're exactly back where we started about how we're assuming we have a good source of entropy. If we just pick any fixed value it might as well be 0000 0000 0000 0000 and so on then obviously a bad guy can break everything and we should have just used telnet.
- deleted 7y ago[deleted]
- magicalhippo 7y agoIf the lightbulb is running SSH it's most likely running on a microcontroller which almost certainly has a built-in analog-to-digital converter, and thus can get entropy from thermal noise. Either sample a floating pin or an internal band-gap voltage reference should produce some bits of entropy.
- tytso 7y agoI proposed a solution where you could specify this via a boot-command line option, and/or a default specified why a compile-time kernel config option. That got rejected because most users wouldn't be able to find the tuning knob, and most distros wouldn't want the reputational/liability risk of "insecure by default", and from Linus's perspective, confused users seeing their system block on boot and and then e-mailing Linus == BAD. As far as whether it might be simpler to attack the CRNG, please see https://factorable.net/ https://factorable.net/ where a researcher found that at one point 10% of all publically reachable internet sites had insecure SSH keys due to a weaknesses in Linux's random number generator. Granted, these were mostly end user's home routers (many of which had open ssh ports in the day), and most servers on x86 wouldn't have been nearly as vulnerable. But the "Mining your p's and q's" paper is one of the key reasons why I remain very conservative about Linus's random driver to this day. I got the pre-publication notification on July 3rd, and I spent all day on July 4th on top of the Boston Science Museum's parking garage with a laptop, frantically trying to come up with a good fix to the problem while my very patient and accomodating girlfriend and I were waiting for the Boston Pops Fireworks show in the evening.... This is not the kind of thing one wants to do again!
- MoOmer 7y agoI’d definitely prefer a build-level option. Some of us are working with some internal systems that haven’t (yet) been embraced by the loving arms of automation.