From d1f2f24bfe60d15b11c459c83d7de35098d797d9 Mon Sep 17 00:00:00 2001 From: Kyle Kotowick Date: Mon, 30 Sep 2024 17:05:02 +0000 Subject: [PATCH] Add Dilithium COSE algorithm IDs --- src/webauthn.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/webauthn.rs b/src/webauthn.rs index 48d4dc6..37c3f94 100644 --- a/src/webauthn.rs +++ b/src/webauthn.rs @@ -158,9 +158,13 @@ pub enum UnknownPKCredentialParam { pub const ES256: i32 = -7; /// EdDSA pub const ED_DSA: i32 = -8; +/// Dilithium2 +pub const DILITHIUM2: i32 = -87; +pub const DILITHIUM3: i32 = -88; +pub const DILITHIUM5: i32 = -89; -pub const COUNT_KNOWN_ALGS: usize = 2; -pub const KNOWN_ALGS: [i32; COUNT_KNOWN_ALGS] = [ES256, ED_DSA]; +pub const COUNT_KNOWN_ALGS: usize = 5; +pub const KNOWN_ALGS: [i32; COUNT_KNOWN_ALGS] = [ES256, ED_DSA, DILITHIUM2, DILITHIUM3, DILITHIUM5]; impl TryFrom for KnownPublicKeyCredentialParameters { type Error = UnknownPKCredentialParam;