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; a CTAP2 assertion
is {"authenticator_data": hex, "signature": hex}; a WebAuthn one is
{"authenticator_data": hex, "client_data_json": hex, "signature": hex}.
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.
Trait Implementations§
Source§impl Clone for RootSignature
impl Clone for RootSignature
Source§impl Debug for RootSignature
impl Debug for RootSignature
Source§impl<'de> Deserialize<'de> for RootSignature
impl<'de> Deserialize<'de> for RootSignature
Source§fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl Eq for RootSignature
Source§impl From<Signature> for RootSignature
impl From<Signature> for RootSignature
Source§impl PartialEq for RootSignature
impl PartialEq for RootSignature
Source§impl Serialize for RootSignature
impl Serialize for RootSignature
impl StructuralPartialEq for RootSignature
Auto Trait Implementations§
impl Freeze for RootSignature
impl RefUnwindSafe for RootSignature
impl Send for RootSignature
impl Sync for RootSignature
impl Unpin for RootSignature
impl UnsafeUnpin for RootSignature
impl UnwindSafe for RootSignature
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more