Please sign in to comment.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add protection for private keys at rest in RAM against speculation
and memory sidechannel attacks like Spectre, Meltdown, Rowhammer and Rambleed. This change encrypts private keys when they are not in use with a symmetic key that is derived from a relatively large "prekey" consisting of random data (currently 16KB). Attackers must recover the entire prekey with high accuracy before they can attempt to decrypt the shielded private key, but the current generation of attacks have bit error rates that, when applied cumulatively to the entire prekey, make this unlikely. Implementation-wise, keys are encrypted "shielded" when loaded and then automatically and transparently unshielded when used for signatures or when being saved/serialised. Hopefully we can remove this in a few years time when computer architecture has become less unsafe. been in snaps for a bit already; thanks deraadt@ ok dtucker@ deraadt@
- Loading branch information
Showing with 324 additions and 41 deletions.
- +2 −2 usr.bin/ssh/authfd.c
- +2 −2 usr.bin/ssh/authfd.h
- +2 −2 usr.bin/ssh/krl.c
- +2 −2 usr.bin/ssh/krl.h
- +5 −2 usr.bin/ssh/ssh-agent.c
- +2 −2 usr.bin/ssh/ssh-keygen.c
- +2 −2 usr.bin/ssh/sshconnect.c
- +2 −2 usr.bin/ssh/sshconnect.h
- +8 −2 usr.bin/ssh/sshd.c
- +282 −17 usr.bin/ssh/sshkey.c
- +15 −6 usr.bin/ssh/sshkey.h
There are no files selected for viewing
Oops, something went wrong.