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

Allow missing algorithms #5

Merged
merged 1 commit into from
Jun 3, 2024
Merged

Conversation

robin-nitrokey
Copy link
Member

The algorithm field is optional, see RFC 8152 § 7:

   COSE_Key = {
       1 => tstr / int,          ; kty
       ? 2 => bstr,              ; kid
       ? 3 => tstr / int,        ; alg
       ? 4 => [+ (tstr / int) ], ; key_ops
       ? 5 => bstr,              ; Base IV
       * label => values
   }

   alg:  This parameter is used to restrict the algorithm that is used
      with the key.  If this parameter is present in the key structure,
      the application MUST verify that this algorithm matches the
      algorithm for which the key is being used.

Fixes: #3

Depends on:

Ported from:

@robin-nitrokey robin-nitrokey requested a review from daringer May 2, 2024 14:46
@robin-nitrokey robin-nitrokey marked this pull request as draft May 2, 2024 14:46
@robin-nitrokey robin-nitrokey marked this pull request as ready for review May 7, 2024 13:29
The algorithm field is optional, see RFC 8152 § 7:

   COSE_Key = {
       1 => tstr / int,          ; kty
       ? 2 => bstr,              ; kid
       ? 3 => tstr / int,        ; alg
       ? 4 => [+ (tstr / int) ], ; key_ops
       ? 5 => bstr,              ; Base IV
       * label => values
   }

   alg:  This parameter is used to restrict the algorithm that is used
      with the key.  If this parameter is present in the key structure,
      the application MUST verify that this algorithm matches the
      algorithm for which the key is being used.

Fixes: trussed-dev#3
@robin-nitrokey robin-nitrokey merged commit 48d73a5 into trussed-dev:main Jun 3, 2024
4 checks passed
@robin-nitrokey robin-nitrokey deleted the alg branch June 3, 2024 07:56
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.

Support missing algorithm
2 participants