#cose #cbor #no-std #rust

no-std cosey

Data types and serde for public COSE_Keys

4 releases (2 breaking)

0.3.0 Jun 10, 2021
0.2.0 Feb 26, 2021
0.1.0 Jan 31, 2021
0.1.0-alpha.0 Feb 8, 2020

#599 in Encoding

Download history 46/week @ 2021-09-25 53/week @ 2021-10-02 139/week @ 2021-10-09 90/week @ 2021-10-16 53/week @ 2021-10-23 63/week @ 2021-10-30 57/week @ 2021-11-06 55/week @ 2021-11-13 129/week @ 2021-11-20 93/week @ 2021-11-27 117/week @ 2021-12-04 50/week @ 2021-12-11 96/week @ 2021-12-18 38/week @ 2021-12-25 39/week @ 2022-01-01 86/week @ 2022-01-08

264 downloads per month
Used in salty

Apache-2.0 OR MIT

16KB
312 lines

cosey

crates.io Documentation

Data types and serde for public COSE_Keys.

License

cosey is licensed under either of Apache License, Version 2.0 or MIT License at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.


lib.rs:

cosey

Data types and serde for public COSE_Keys

https://tools.ietf.org/html/rfc8152#section-7

A COSE Key structure is built on a CBOR map object. The set of common parameters that can appear in a COSE Key can be found in the IANA "COSE Key Common Parameters" registry (Section 16.5).

https://www.iana.org/assignments/cose/cose.xhtml#key-common-parameters

Additional parameters defined for specific key types can be found in the IANA "COSE Key Type Parameters" registry (Section 16.6).

https://www.iana.org/assignments/cose/cose.xhtml#key-type-parameters

Key Type 1 (OKP) -1: crv -2: x (x-coordinate) -4: d (private key)

Key Type 2 (EC2) -1: crv -2: x (x-coordinate) -3: y (y-coordinate) -4: d (private key)

Key Type 4 (Symmetric) -1: k (key value)

Dependencies

~1–1.6MB
~38K SLoC

}`