Live data from Hacker News

SSH gets protection against side-channel attacks

undeadly.org

141–150 of 166 posts

Re: SSH gets protection against side-channel attacks

#141
post #123
post #122

Earlier quoted context omitted.

> Closed source Ah, so we'll just have to trust you that it's doing anything at all, then.

" Please respond to the strongest plausible interpretation of what someone says, not a weaker one that's easier to criticize. Assume good faith. " https://news.ycombinator.com/newsguidelines.html

Isn’t his reply valid and an exception to the rule given the context?

Re: SSH gets protection against side-channel attacks

#142

Could password managers like 1Password (AgileBits Inc.) employ similar techniques? They seem to make very little effort in this regards. E.g. on 1Password, https://discussions.agilebits.com/discussion/101551/article-... .

No. I just tested KeePass.

1. I created a new test-entry with a long and random password.

2. Opened the process's memory in the HxD hexeditor.

3. Ctrl+f

4. Found this password 4 times.

Even after i locked KeePass i still found the password 2 times.

This is bad!

Re: SSH gets protection against side-channel attacks

#143
post #136
post #123

Earlier quoted context omitted.

" Please respond to the strongest plausible interpretation of what someone says, not a weaker one that's easier to criticize. Assume good faith. " https://news.ycombinator.com/newsguidelines.html

> "Please respond to the strongest plausible interpretation of what someone says, not a weaker one that's easier to criticize. Assume good faith." > https://news.ycombinator.com/newsguidelines.html Forgive me but can we not be skeptical of claims made about a commercial product?

Of course you can, and there are plenty of ways to do so that don't break the site guidelines. Cheap, snarky one-liners are not the way. If someone's posting about their own work, there's no need to be disrespectful.

It's also not helpful to post such a clichéd dismissal of what someone else says or their work. That's in the site guidelines too.

https://news.ycombinator.com/newsguidelines.html

Re: SSH gets protection against side-channel attacks

#144

RAM encryption for sensitive data is overlooked in so many applications, even "highly secure" applications like veracrypt [0] only recently started adding it. In my opinion server-applications of all sorts should encrypt their private keys by default; this makes cold-boot attacks and other memory-escape attacks so much harder, since now two totally unrelated memory chunks have to be combined in order to retrieve the…

Ideally private keys should never touch the main CPU at all. You should use something like a secure enclave or a a key-dongle like Yubikey.

Re: SSH gets protection against side-channel attacks

#145

Could password managers like 1Password (AgileBits Inc.) employ similar techniques? They seem to make very little effort in this regards. E.g. on 1Password, https://discussions.agilebits.com/discussion/101551/article-... .

Here is a study on how well various password managers try to scrub their memory to avoid RAM dumps: https://www.securityevaluators.com/casestudies/password-mana...

Re: SSH gets protection against side-channel attacks

#146
post #72

Earlier quoted context omitted.

Could this be implemented at the OS level, i.e. whenever a proces launches, the OS generates a key that it will keep to itself and use to transparently encrypt all memory allocated by that process?

Possibly, but memory is accessed using plain CPU instructions, so it would be hard to transparently encrypt all memory for an application at the kernel level. You do have virtual memory, but I dont think that could be leveraged for this. But who knows whats possible there, maybe if you align and address each memory value at the page boundaries and always force a page fault you could have a really poor implementation…

Modern Intel chips can encrypt memory on the fly without performance loss (SGX does this). However I think it's not exposed for non-enclave use. Perhaps it should be.

Note: inside the enclave there is a performance loss but that's due to MAC checks. If you just want encryption without integrity against tampering you don't need that.

Re: SSH gets protection against side-channel attacks

#147

Earlier quoted context omitted.

The prekey is hashed into the symmetric key. Both the hash function and the symmetric cipher have avalanche effects that mean that N bit errors require the attacker to bruteforce 2^N combinations. unprotected RSA keys on the other hand have structure and are dense in memory. That means fewer bit-errors and and the ability to guess the missing bits faster than O(2^N).

Yeah but my concern was about direct leakage not brute force. That's what Spectre is about.

I think the assumption is the symmetric key can be stored in AES-NI registers that aren't susceptible to RAM based side channel attacks?

Re: SSH gets protection against side-channel attacks

#149

RAM encryption for sensitive data is overlooked in so many applications, even "highly secure" applications like veracrypt [0] only recently started adding it. In my opinion server-applications of all sorts should encrypt their private keys by default; this makes cold-boot attacks and other memory-escape attacks so much harder, since now two totally unrelated memory chunks have to be combined in order to retrieve the…

No. The CPU cache can easily be read out with sidechannel attacks via hyperthreading. It's the similar problem as unencrypted keys at the absolute location, which doesn't get cleared with explicit_bzero, which e.g. libsodium refused to fix. Hopefully crypto maintainers will get to their senses eventually.

https://github.com/jedisct1/libsodium/issues/802

Post reply on HN