Skip to content

Commit

Permalink
Refactor COSE serialization and deserialization
Browse files Browse the repository at this point in the history
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: trussed-dev/ctap-types#8
  • Loading branch information
robin-nitrokey committed May 2, 2024
1 parent 5871455 commit 68678ed
Show file tree
Hide file tree
Showing 3 changed files with 460 additions and 256 deletions.
10 changes: 9 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ categories = ["embedded", "encoding", "no-std"]
keywords = ["cose", "cbor", "rust", "no-std"]
repository = "https://github.com/ycrypto/cosey"
readme = "README.md"
edition = "2018"
edition = "2021"

[dependencies]
heapless-bytes = "0.3.0"
Expand All @@ -18,3 +18,11 @@ serde_repr = "0.1"
version = "1.0"
default-features = false
features = ["derive"]

[dev-dependencies]
cbor-smol = "0.4"
ciborium = "0.2.1"
hex = "0.4.3"
itertools = "0.12.0"
quickcheck = "1.0.3"
serde = "1"
Loading

0 comments on commit 68678ed

Please sign in to comment.