Skip to content

Commit

Permalink
Bump pin_auth length to 256 bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
robin-nitrokey committed Feb 29, 2024
1 parent b81c131 commit ae524b2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/ctap2/client_pin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ pub struct Request {
// First 16 bytes of HMAC-SHA-256 of encrypted contents
// using `sharedSecret`.
#[serde(skip_serializing_if = "Option::is_none")]
pub pin_auth: Option<Bytes<16>>,
pub pin_auth: Option<Bytes<256>>,

// 0x05
// Encrypted new PIN using `sharedSecret`.
Expand Down
3 changes: 1 addition & 2 deletions src/ctap2/credential_management.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ use crate::{
Bytes,
};

type Bytes16 = Bytes<16>;
type Bytes32 = Bytes<32>;

#[derive(Copy, Clone, Debug, Default, Eq, PartialEq, Serialize_repr, Deserialize_repr)]
Expand Down Expand Up @@ -61,7 +60,7 @@ pub struct Request {
pub pin_protocol: Option<u8>,
// 0x04
#[serde(skip_serializing_if = "Option::is_none")]
pub pin_auth: Option<Bytes16>,
pub pin_auth: Option<Bytes<256>>,
}

#[derive(Clone, Debug, Default, Eq, PartialEq, SerializeIndexed)]
Expand Down

0 comments on commit ae524b2

Please sign in to comment.