Skip to content

Commit

Permalink
Reduce ID length for new credentials
Browse files Browse the repository at this point in the history
This patch implements the following changes to reduce the ID length for
new credentials:
- Rename the old Credential type to FullCredential and introduce a
  StrippedCredential type and a Credential enum to differentiate between
  full and reduced credential data.
- Flatten the credential data to reduce encoding overhead.
- Remove the RP id from the credential data to reduce the total length.
- Add a marker field use_short_id to FullCredential so that we don’t
  change the credential ID for existing RKs.

To do:
- Add tests for EncryptedSerializedCredential serialized length (should
  be less than 255).
- Add tests for FullCredential serialized length (should fit into one
  littlefs block).
- Investigate if we can remove more fields from StrippedCredential.

Fixes: #29
  • Loading branch information
robin-nitrokey committed Jul 10, 2023
1 parent 7cb4edc commit 5e46fe0
Show file tree
Hide file tree
Showing 6 changed files with 266 additions and 112 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Reject `rk` option in getAssertion ([#31][])
- Ignore user data with empty ID in getAssertion ([#32][])
- Allow three instead of two PIN retries per boot ([#35][])
- Reduce ID length for new credentials ([#37][])

[#26]: https://github.com/solokeys/fido-authenticator/issues/26
[#28]: https://github.com/solokeys/fido-authenticator/issues/28
[#31]: https://github.com/solokeys/fido-authenticator/issues/31
[#32]: https://github.com/solokeys/fido-authenticator/issues/32
[#35]: https://github.com/solokeys/fido-authenticator/issues/35
[#37]: https://github.com/solokeys/fido-authenticator/issues/37

## [0.1.1] - 2022-08-22
- Fix bug that treated U2F payloads as APDU over APDU in NFC transport @conorpp
Expand Down
Loading

0 comments on commit 5e46fe0

Please sign in to comment.