We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@sosthene-nitrokey in #62 (comment):
Minor issue of spec compliance: Minimum PIN Length: 4 code points. In decrypt_pin_check_length we check 4 bytes, not 4 code points. The max is still 63 bytes, so the check should be: let pin_length = pin.iter().position(|&b| b == b'\0').unwrap_or(pin.len()); let pin_data = &pin[..pin_length]; let pin_utf8 = core::str::from_utf8(pin_data)?; let pin_len_codepoints = pin_utf8.chars().count(); if pin_len_codepoints < 4 || pin_length > 63{ return Err(Error::PinPolicyViolation); }
Minor issue of spec compliance:
Minimum PIN Length: 4 code points.
In decrypt_pin_check_length we check 4 bytes, not 4 code points. The max is still 63 bytes, so the check should be:
decrypt_pin_check_length
let pin_length = pin.iter().position(|&b| b == b'\0').unwrap_or(pin.len()); let pin_data = &pin[..pin_length]; let pin_utf8 = core::str::from_utf8(pin_data)?; let pin_len_codepoints = pin_utf8.chars().count(); if pin_len_codepoints < 4 || pin_length > 63{ return Err(Error::PinPolicyViolation); }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
@sosthene-nitrokey in #62 (comment):
The text was updated successfully, but these errors were encountered: