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

CredentialData: (de)serialize rp and user with serde_indexed #57

Open
sosthene-nitrokey opened this issue Feb 12, 2024 · 0 comments
Open

Comments

@sosthene-nitrokey
Copy link

These are currently (de)serialized with the normal serde derive implementation, they could instead be made more compact by using a serde_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.

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
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

No branches or pull requests

1 participant