Skip to content
New issue

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

Pin hash space opt #52

Merged
merged 4 commits into from
Jul 26, 2024
Merged

Pin hash space opt #52

merged 4 commits into from
Jul 26, 2024

Conversation

sosthene-nitrokey
Copy link

@sosthene-nitrokey sosthene-nitrokey commented Jan 31, 2024

Reduce the storage space used by the hash of the PIN by using serde-byte-array. Fix #49

Needs trussed-dev/cbor-smol#7 to properly deserialize credentials that were serialize prior to this PR such as the one in the test.

Cargo.toml Outdated
@@ -72,6 +72,7 @@ x509-parser = "0.16.0"
features = ["dispatch"]

[patch.crates-io]
cbor-smol = { git = "https://github.com/sosthene-nitrokey/cbor-smol.git", rev = "94ee8c28edf9248b402aa4335c1dee157995197b"}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I fear that this is a change that could easily be missed when updating dependencies, breaking existing state. What do you think about introducing a dummy feature in the fork like bytes-from-array so that we get an error if we don’t have the correctly patched cbor-smol version?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually this change is already in nitrokey-3-firmware

@sosthene-nitrokey sosthene-nitrokey merged commit fd143b1 into main Jul 26, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

State: pin_hash is stored as a array of ints rather than a byte array
3 participants