diff options
author | djm@openbsd.org <djm@openbsd.org> | 2019-06-21 04:21:04 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2019-06-21 14:24:35 +1000 |
commit | 4f7a56d5e02e3d04ab69eac1213817a7536d0562 (patch) | |
tree | b17da67f20831b53f9b00c6647c5eb1bdf88d626 /sshconnect.h | |
parent | 4cd6b12cc9c10bf59c8b425041f3ea5091285a0f (diff) |
upstream: 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@
OpenBSD-Commit-ID: 19767213c312e46f94b303a512ef8e9218a39bd4
Diffstat (limited to 'sshconnect.h')
-rw-r--r-- | sshconnect.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sshconnect.h b/sshconnect.h index 6e8989b27..b455d7c20 100644 --- a/sshconnect.h +++ b/sshconnect.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: sshconnect.h,v 1.37 2019/01/19 21:36:38 djm Exp $ */ | 1 | /* $OpenBSD: sshconnect.h,v 1.38 2019/06/21 04:21:05 djm Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Copyright (c) 2000 Markus Friedl. All rights reserved. | 4 | * Copyright (c) 2000 Markus Friedl. All rights reserved. |
@@ -52,4 +52,4 @@ void ssh_userauth2(struct ssh *ssh, const char *, const char *, | |||
52 | 52 | ||
53 | int ssh_local_cmd(const char *); | 53 | int ssh_local_cmd(const char *); |
54 | 54 | ||
55 | void maybe_add_key_to_agent(char *, const struct sshkey *, char *, char *); | 55 | void maybe_add_key_to_agent(char *, struct sshkey *, char *, char *); |