pub enum RootSignature {
Ed25519(Signature),
Ctap {
authenticator_data: Vec<u8>,
signature: Vec<u8>,
},
WebAuthn {
authenticator_data: Vec<u8>,
client_data_json: Vec<u8>,
signature: Vec<u8>,
},
}Expand description
A root’s signature: a phrase root’s Ed25519 one, or a security key’s
assertion: raw CTAP2 (its authenticatorData and DER ECDSA
signature), or WebAuthn (the same, and the clientDataJSON the
platform wrote and the key signed the hash of).
In serde, an Ed25519 signature is 128 hex digits, as P7-02 wrote it,
so a phrase root’s credential and state read as they always did; a
CTAP2 assertion is {"authenticator_data": hex, "signature": hex}; a
WebAuthn one is {"authenticator_data": hex, "client_data_json": hex, "signature": hex} (wire revision 14, additive: no struct grows).
Variants§
Ed25519(Signature)
Ctap
WebAuthn
A WebAuthn assertion, as a platform API returns it (Apple’s
ASAuthorizationSecurityKeyPublicKeyCredentialAssertion): the
challenge in client_data_json is SHA-256 of the message, the
bytes the CTAP2 form’s clientDataHash is. The credential id is
the root’s.
Implementations§
Source§impl RootSignature
impl RootSignature
Sourcepub fn as_ed25519(&self) -> Option<&Signature>
pub fn as_ed25519(&self) -> Option<&Signature>
The Ed25519 signature, for a phrase root’s.