| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
indentation on continuation lines. Prompted by GHPR#185
|
|
|
|
|
| |
between redundant fields in private key certificate and private key
body; ok markus@
|
|
|
|
|
|
| |
it to make it more generally usable and testable.
ok markus@
|
|
|
|
|
| |
compilers not smart enough to know the strftime calls won't ever fully
fill "to" and "from". ok djm@
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
FIDO2 supports a notion of "user verification" where the user is
required to demonstrate their identity to the token before particular
operations (e.g. signing). Typically this is done by authenticating
themselves using a PIN that has been set on the token.
This adds support for generating and using user verified keys where
the verification happens via PIN (other options might be added in the
future, but none are in common use now). Practically, this adds
another key generation option "verify-required" that yields a key that
requires a PIN before each authentication.
feedback markus@ and Pedro Martelletto; ok markus@
|
| |
|
|
|
|
|
|
| |
standard for using FIDO keys in web browsers. webauthn signatures are
a slightly different format to plain FIDO signatures - this support
allows verification of these. Feedback and ok markus@
|
|
|
|
|
|
|
| |
code and fixes oss-fuzz#20074 (NULL deref) caused by a missing
key type check in the ECDSA_CERT parsing path.
feedback and ok markus@
|
|
|
|
|
|
|
| |
Extracts a public key from the unencrypted envelope of a new-style
OpenSSH private key.
ok markus@
|
|
|
|
|
|
|
| |
Try new format parser for all key types first, fall back to PEM
parser only for invalid format errors.
ok markus@
|
|
|
|
| |
decoding; ok markus@
|
|
|
|
|
|
| |
(this public key is currently unusued)
ok markus@
|
|
|
|
|
|
|
|
|
| |
Split out the base64 decoding and private section decryption steps in
to separate functions. This will make the decryption step easier to fuzz
as well as making it easier to write a "load public key from new-format
private key" function.
ok markus@
|
| |
|
|
|
|
| |
ok djm
|
|
|
|
|
|
|
|
| |
While freezero() returns early if the pointer is NULL the tests for
NULL in callers are left to avoid warnings about passing an
uninitialised size argument across a function boundry.
ok deraadt@ djm@
|
|
|
|
| |
reported by jmc@
|
|
|
|
|
|
|
|
|
|
|
| |
Allow passing a PIN via the SK API (API major crank) and let the
ssh-sk-helper API follow.
Also enhance the ssh-sk-helper API to support passing back an error
code instead of a complete reply. Will be used to signal "wrong PIN",
etc.
feedback and ok markus@
|
|
|
|
|
|
|
|
|
| |
This extracts and refactors the client interface for ssh-sk-helper
from ssh-agent and generalises it for use by the other programs.
This means that most OpenSSH tools no longer need to link against
libfido2 or directly interact with /dev/uhid*
requested by, feedback and ok markus@
|
|
|
|
|
|
|
|
|
| |
This is populated during signature verification with additional fields
that are present in and covered by the signature. At the moment, it is
only used to record security key-specific options, especially the flags
field.
with and ok markus@
|
| |
|
| |
|
|
|
|
|
| |
We weren't following the rules re BN_CTX_start/BN_CTX_end and the places
we were using it didn't benefit from its use anyway. ok dtucker@
|
|
|
|
|
| |
a shielded key, we need to transfer the number of signatures left
from the private to the public key. ok djm@
|
|
|
|
|
|
|
|
| |
- in ssh-agent we need to delay the call to shield
until we have received key specific options.
- when serializing xmss keys for shield we need to deal with
all optional components (e.g. state might not be loaded).
ok djm@
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
U2F signatures.
Don't use sshsk_ecdsa_sign() directly, instead make it reachable via
sshkey_sign() like all other signature operations. This means that
we need to add a provider argument to sshkey_sign(), so most of this
change is mechanically adding that.
Suggested by / ok markus@
|
|
|
|
|
|
|
| |
Key library support: including allocation, marshalling public/private
keys and certificates, signature validation.
feedback & ok markus@
|
|
|
|
|
|
| |
other NULL dereferences found by fuzzing.
fix with and ok markus@
|
| |
|
| |
|
|
|
|
|
| |
functionality there (wrapping of base64-encoded data) to sshbuf
functions; feedback and ok markus@
|
|
|
|
|
|
|
|
|
|
|
|
| |
enabled via "ssh-keygen -m PKCS8" on operations that save private
keys to disk.
The OpenSSH native key format remains the default, but PKCS8 is a
superior format to PEM if interoperability with non-OpenSSH software
is required, as it may use a less terrible KDF (IIRC PEM uses a single
round of MD5 as a KDF).
adapted from patch by Jakub Jelen via bz3013; ok markus
|
| |
|
|
|
|
|
|
| |
spotted by Reynir Björnsson
ok deraadt@ markus@ tb@
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
|
|
|
|
|
|
| |
rsa-sha2-512 signature algorithm. Certificates signed by RSA keys
will therefore be incompatible with OpenSSH < 7.2 unless the default
is overridden.
Document the ability of the ssh-keygen -t flag to override the
signature algorithm when signing certificates, and the new default.
ok deraadt@
|
| |
|
|
|
|
|
|
| |
than make the caller do it. Saves a lot of boilerplate code.
from markus@ ok djm@
|
|
|
|
| |
spotted by Adam Eijdenberg; ok dtucker@
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
as "incorrect passphrase" instead of trying to choose between that and
"invalid format".
libcrypto can return ASN1 parsing errors rather than the expected
decrypt error in certain infrequent cases when trying to decrypt/parse
PEM private keys when supplied with an invalid passphrase.
Report and repro recipe from Thomas Deutschmann in bz#2901
ok markus@
|
| |
|
|
|
|
| |
feedback and ok tb@ jsing@ markus@
|
|
|
|
| |
against a supplied whitelist; ok markus
|
|
|
|
| |
signature wrt loading and certification operations; ok markus@
|