pub enum CoseKey {
EC2 {
alg: i64,
crv: i64,
x: Vec<u8>,
y: Vec<u8>,
},
OKP {
alg: i64,
x: Vec<u8>,
},
RSA {
alg: i64,
n: Vec<u8>,
e: Vec<u8>,
},
}Expand description
A decoded COSE_Key from the credential’s authenticator data.
Three key types are supported:
EC2: elliptic-curve (kty = 2). Carriescrv,x, andy.OKP: octet key pair (kty = 1). Carries the raw 32-byte Ed25519 key inx.RSA: RSA public key (kty = 3). Carriesnande.
The alg field in each variant holds the COSE algorithm identifier;
the registration ceremony validates it against the expected value.
Variants§
EC2
EC2 key — P-256 with ES256 (alg = -7) or P-384 with ES384 (alg = -35).
Fields
OKP
OKP key — EdDSA with Ed25519 (alg = -8, crv = 6).
Fields
RSA
RSA key — RS256 (alg = -257).
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CoseKey
impl RefUnwindSafe for CoseKey
impl Send for CoseKey
impl Sync for CoseKey
impl Unpin for CoseKey
impl UnsafeUnpin for CoseKey
impl UnwindSafe for CoseKey
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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