Skip to content

Commit

Permalink
Add Dilithium COSE algorithm IDs
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleKotowick committed Sep 30, 2024
1 parent 699539a commit d1f2f24
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/webauthn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<PublicKeyCredentialParameters> for KnownPublicKeyCredentialParameters {
type Error = UnknownPKCredentialParam;
Expand Down

0 comments on commit d1f2f24

Please sign in to comment.