forked from trussed-dev/fido-authenticator
-
Notifications
You must be signed in to change notification settings - Fork 2
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
CredentialData: (de)serialize rp
and user
with serde_indexed
#57
Comments
sosthene-nitrokey
added a commit
to sosthene-nitrokey/cbor-smol
that referenced
this issue
Feb 12, 2024
The default serde deserialize derive accepts 3 types for identifiers: - The name of the field as `str` - The name of the field as ascii bytes - The index of the field as u64 This PR changes deserialize_identifier to have compatibility with all of these This is necessary for Nitrokey/fido-authenticator#57, which needs compatibility with both the str variant and the index variant
sosthene-nitrokey
added a commit
to sosthene-nitrokey/cbor-smol
that referenced
this issue
Feb 12, 2024
The default serde deserialize derive accepts 3 types for identifiers: - The name of the field as `str` - The name of the field as ascii bytes - The index of the field as u64 This PR changes deserialize_identifier to have compatibility with all of these This is necessary for Nitrokey/fido-authenticator#57, which needs compatibility with both the str variant and the index variant
sosthene-nitrokey
added a commit
to sosthene-nitrokey/cbor-smol
that referenced
this issue
Mar 27, 2024
The default serde deserialize derive accepts 3 types for identifiers: - The name of the field as `str` - The name of the field as ascii bytes - The index of the field as u64 This PR changes deserialize_identifier to have compatibility with all of these This is necessary for Nitrokey/fido-authenticator#57, which needs compatibility with both the str variant and the index variant
sosthene-nitrokey
added a commit
to sosthene-nitrokey/cbor-smol
that referenced
this issue
Sep 13, 2024
The default serde deserialize derive accepts 3 types for identifiers: - The name of the field as `str` - The name of the field as ascii bytes - The index of the field as u64 This PR changes deserialize_identifier to have compatibility with all of these This is necessary for Nitrokey/fido-authenticator#57, which needs compatibility with both the str variant and the index variant
sosthene-nitrokey
added a commit
to sosthene-nitrokey/cbor-smol
that referenced
this issue
Sep 13, 2024
The default serde deserialize derive accepts 3 types for identifiers: - The name of the field as `str` - The name of the field as ascii bytes - The index of the field as u64 This PR changes deserialize_identifier to have compatibility with all of these This is necessary for Nitrokey/fido-authenticator#57, which needs compatibility with both the str variant and the index variant
sosthene-nitrokey
added a commit
to sosthene-nitrokey/cbor-smol
that referenced
this issue
Sep 13, 2024
The default serde deserialize derive accepts 3 types for identifiers: - The name of the field as `str` - The name of the field as ascii bytes - The index of the field as u64 This PR changes deserialize_identifier to have compatibility with all of these This is necessary for Nitrokey/fido-authenticator#57, which needs compatibility with both the str variant and the index variant
sosthene-nitrokey
added a commit
to sosthene-nitrokey/cbor-smol
that referenced
this issue
Oct 2, 2024
The default serde deserialize derive accepts 3 types for identifiers: - The name of the field as `str` - The name of the field as ascii bytes - The index of the field as u64 This PR changes deserialize_identifier to have compatibility with all of these This is necessary for Nitrokey/fido-authenticator#57, which needs compatibility with both the str variant and the index variant
sosthene-nitrokey
added a commit
to trussed-dev/cbor-smol
that referenced
this issue
Oct 2, 2024
The default serde deserialize derive accepts 3 types for identifiers: - The name of the field as `str` - The name of the field as ascii bytes - The index of the field as u64 This PR changes deserialize_identifier to have compatibility with all of these This is necessary for Nitrokey/fido-authenticator#57, which needs compatibility with both the str variant and the index variant
sosthene-nitrokey
added a commit
to trussed-dev/cbor-smol
that referenced
this issue
Oct 7, 2024
The default serde deserialize derive accepts 3 types for identifiers: - The name of the field as `str` - The name of the field as ascii bytes - The index of the field as u64 This PR changes deserialize_identifier to have compatibility with all of these This is necessary for Nitrokey/fido-authenticator#57, which needs compatibility with both the str variant and the index variant
sosthene-nitrokey
added a commit
to trussed-dev/cbor-smol
that referenced
this issue
Oct 7, 2024
The default serde deserialize derive accepts 3 types for identifiers: - The name of the field as `str` - The name of the field as ascii bytes - The index of the field as u64 This PR changes deserialize_identifier to have compatibility with all of these This is necessary for Nitrokey/fido-authenticator#57, which needs compatibility with both the str variant and the index variant
In #59, we instead implemented serialization using a single character. This has two advantages: We can keep compatibility with the existing data and the field order in the code does not affect the serialized format. The effect should be similar to the serde-indexed solution, so I’m closing this issue. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
These are currently (de)serialized with the normal
serde
derive implementation, they could instead be made more compact by using aserde_indexed
approach.There would be the challenge of needing to either migrate, or to support deserialisation of both approaches.
For many credentials, this should save around 22 bytes of data, or more than a 10% gain.
The text was updated successfully, but these errors were encountered: