11 Commits
Author SHA1 Message Date
Robin Krahl ff122ad3a5 Release v0.3.2 v0.3.2 2025-02-25 22:17:09 +01:00
Alfie FrestaandRobin Krahl 2388e31288 Add Deserialize trait to PublicKey 2025-02-25 22:14:40 +01:00
Robin Krahl 0fd493a7b9 Release v0.3.1 v0.3.1 2024-06-03 09:57:22 +02:00
Robin Krahl 48d73a5ee0 Allow missing algorithms
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: https://github.com/trussed-dev/cosey/issues/3
2024-06-02 11:43:11 +02:00
Robin Krahl 4ef0257b07 Add CI workflow
Fixes: https://github.com/trussed-dev/cosey/issues/6
2024-06-02 11:39:42 +02:00
Robin Krahl 68678ed4e1 Refactor COSE serialization and deserialization
This patch introduces the RawPublicKey helper type that takes care of
serialization and deserialization of the key type.  The *PublicKey
structs now only need to check if all required fields are present and
have the correct value.  It also adds extensive tests to make sure that
serialization and deserialization work correctly.

This patch is ported from: https://github.com/trussed-dev/ctap-types/pull/8
2024-05-02 11:18:01 +02:00
Nicolas Stalder 5871455b8a Bump heapless, no more generic-array v0.3.0 2021-06-10 22:58:37 +02:00
Nicolas Stalder 1eae80fa15 Bump heapless, and hence generic-array v0.2.0 2021-02-26 23:52:48 +01:00
Nicolas Stalder 2992077e14 Prepare for release v0.1.0 2021-01-31 14:31:44 +01:00
Nicolas Stalder 2fda1a5d58 Use published heapless-bytes 2020-02-08 16:50:17 +01:00
Nicolas Stalder 49994cf1d9 Initial commit 2020-01-21 00:07:48 +01:00