pub enum SignatureAlgorithm {
Es256,
Rs256,
EdDsa,
}Expand description
The algorithms this package will verify.
Variants§
Es256
COSE -7. ECDSA on P-256 with SHA-256, and what essentially every passkey in the world uses: Apple, Google, Yubico, the password managers.
Rs256
COSE -257. RSASSA-PKCS1-v1_5 with SHA-256. Not what a modern passkey uses, and not optional either: TPM-backed Windows Hello credentials and a number of older security keys sign with nothing else, and a relying party that does not offer it turns those authenticators away at registration.
EdDsa
COSE -8. Ed25519, which some security keys prefer.
Implementations§
Source§impl SignatureAlgorithm
impl SignatureAlgorithm
pub fn from_cose_id(id: i64) -> Option<SignatureAlgorithm>
Sourcepub fn offered() -> [SignatureAlgorithm; 3]
pub fn offered() -> [SignatureAlgorithm; 3]
What a relying party offers during registration, best first.
ES256 leads because essentially every passkey in the world uses it.
RS256 is second because browsers warn when it is missing and because
the authenticators that need it can do nothing else. Everything listed
here can be verified by CoseKey::verify; offering an algorithm this
package cannot check would mean a ceremony that succeeds in the browser
and fails on the way back.