pub enum IdentityError {
Unsigned,
UnknownKey(String),
BadSignature,
BadKey,
Verifier(String),
UnsupportedScheme(u16),
ChallengeMismatch,
}Expand description
Failure modes of signing and verification.
Variants§
Unsigned
Entry has no author_sig.
UnknownKey(String)
Signing key id is not in the registry.
BadSignature
Signature bytes are malformed or do not verify.
BadKey
Public key bytes are not a valid ed25519 key.
Verifier(String)
The external verifier could not be run at all, with the reason.
Kept apart from IdentityError::BadSignature for the same reason
IdentityError::UnknownKey is: the repairs are opposite. A
signature that does not verify is evidence about the request; a
verifier that will not start is evidence about the host, and
answering the second with the first would report an operational
fault as an attack.
UnsupportedScheme(u16)
The signature names a scheme this verifier cannot check, carrying
the tag it named (choir_oplog::scheme).
Separate from IdentityError::BadSignature because the two are
different events: a bad signature is a claim that failed, while
this is a claim never examined. Collapsing them would let a
future scheme look like an attack, and — worse in the other
direction — would let a caller believe an unexamined signature
had been rejected on its merits.
ChallengeMismatch
A WebAuthn assertion verified cryptographically but attests to a different challenge than the one asked about, so it is a valid signature over something nobody in this request agreed to.
D39 treats this as forgery-class rather than as a mismatch: the
whole point of binding the challenge to
choir_oplog::OpEntry::signing_hash is that a signature cannot
be moved from the operation it approved to another one.
Trait Implementations§
Source§impl Debug for IdentityError
impl Debug for IdentityError
Source§impl PartialEq for IdentityError
impl PartialEq for IdentityError
Source§fn eq(&self, other: &IdentityError) -> bool
fn eq(&self, other: &IdentityError) -> bool
self and other values to be equal, and is used by ==.