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

Make COSE deserialization more robust #2

Closed
wants to merge 1 commit into from

Conversation

robin-nitrokey
Copy link
Member

Previously, COSE keys could only be deserialized if the map entries were in the correct order. With this patch, the deserialization is made more robust (and also more concise) by introducing a helper struct, RawPublicKey, that is used as an intermediate step during the deserialization. Also, we make the algorithm field optional to conform with the spec.

This is a port from ctap-types:
trussed-dev/ctap-types#8

Previously, COSE keys could only be deserialized if the map entries were
in the correct order. With this patch, the deserialization is made more
robust (and also more concise) by introducing a helper struct,
RawPublicKey, that is used as an intermediate step during the
deserialization. Also, we make the algorithm field optional to conform
with the spec.

This is a port from ctap-types:
    trussed-dev/ctap-types#8
@nickray
Copy link
Member

nickray commented Apr 6, 2023

Same comment as trussed-dev/ctap-types#8, tendency against merging this. Should then probably point out this crate is for CTAP COSE, and list the differences for clarity.

@robin-nitrokey robin-nitrokey deleted the serde branch May 2, 2024 09:10
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.

2 participants