pub enum RootRegistration {
Ctap(RootKey),
WebAuthn {
attestation_object: Vec<u8>,
client_data_json: Vec<u8>,
},
}Expand description
How a security key made a root’s credential, as a device’s
key API returns it: what Self::root reads the root from.
A registration is not a proof that the key is held, and is not sent
anywhere: a root proves itself by signing its identity’s genesis, or
its addition (root_add_message), with an assertion. Its attestation
statement is carried but never checked, whatever its fmt (none,
packed, apple, …), as the raw CTAP2 form’s never was: no
authenticator model is required of a root.
Variants§
Ctap(RootKey)
Raw CTAP2 authenticatorMakeCredential (libfido2): the credential
as the transport read it. Its client data hash is the identity’s
handle.
WebAuthn
A WebAuthn registration, as a platform API returns it (Apple’s
ASAuthorizationSecurityKeyPublicKeyCredentialRegistration): the
attestationObject (CBOR) and the exact clientDataJSON, whose
challenge is the identity’s handle, as the CTAP2 form’s client
data hash is.
Implementations§
Source§impl RootRegistration
impl RootRegistration
Sourcepub fn root(&self, handle: &[u8; 32]) -> Result<RootKey, WebAuthnError>
pub fn root(&self, handle: &[u8; 32]) -> Result<RootKey, WebAuthnError>
The root this registration made for the identity handle.
The raw CTAP2 form’s root as given: the caller checks it
(RootKey::is_valid), as it always has. The WebAuthn form, in
order: bounds (MAX_ATTESTATION_OBJECT, MAX_CLIENT_DATA_JSON);
clientDataJSON of type webauthn.create with challenge handle
(base64url, no padding), not cross-origin; the attestationObject
a CBOR map with text fmt, bytes authData and map attStmt;
authData under PORTABLE_RP, with UP, UV and attested
credential data (AT); a credential id of 1 to
MAX_CREDENTIAL_ID bytes; an ES256 P-256 COSE key on the curve.
That the credential is resident, with user.id = handle, is
asked of the key but cannot be read from a registration (a key does
not report it there), so it is not checked: a key that ignored it
is found out when recovery by handle finds nothing.