pub enum SignatureCounterEnforcement {
Fail,
Update,
Ignore,
}Expand description
Controls how signature counter is enforced.
Note that if the previous signature counter is positive and the new counter is not strictly greater, then the authenticator is likely a clone (i.e., there are at least two copies of the private key).
Variants§
Fail
Fail the authentication ceremony if the counter is less than or equal to the previous value when the previous value is positive.
Update
When the counter is less than the previous value, don’t fail and update the value.
Note in the special case that the new signature counter is 0, DynamicState::sign_count won’t
be updated since that would allow an attacker to permanently disable the counter.
Ignore
When the counter is less than the previous value, don’t fail but don’t update the value.
Trait Implementations§
Source§impl Clone for SignatureCounterEnforcement
impl Clone for SignatureCounterEnforcement
impl Copy for SignatureCounterEnforcement
Source§impl Debug for SignatureCounterEnforcement
impl Debug for SignatureCounterEnforcement
impl Eq for SignatureCounterEnforcement
impl StructuralPartialEq for SignatureCounterEnforcement
Auto Trait Implementations§
impl Freeze for SignatureCounterEnforcement
impl RefUnwindSafe for SignatureCounterEnforcement
impl Send for SignatureCounterEnforcement
impl Sync for SignatureCounterEnforcement
impl Unpin for SignatureCounterEnforcement
impl UnsafeUnpin for SignatureCounterEnforcement
impl UnwindSafe for SignatureCounterEnforcement
Blanket Implementations§
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