Skip to content

Commit 2ab196a

Browse files
committed
feat: add cose-key and cose-key-set codecs
Register the CBOR-native counterparts to pkix-pub/pkcs8-priv so the table has one-codec-per-role containers for both the DER (ASN.1) and CBOR (COSE) ecosystems, covering the same "algorithm identifier travels in the payload" model on both sides. - cose-key (0x42): COSE_Key map per IETF RFC 9052 section 7; media type application/cose-key - cose-key-set (0x43): COSE_KeySet array per IETF RFC 9052 section 7; media type application/cose-key-set - split mirrors IETF's own registration of two media types and two CoAP Content-Format IDs (101 and 102), and keeps the "prefix tells you the shape" invariant - both remain in the single-byte varint range (0x42 and 0x43 in the unclustered 0x39-0x4f block) for identifier cost parity with libp2p-key Refs: - https://www.rfc-editor.org/rfc/rfc9052 - https://www.iana.org/assignments/media-types/application/cose-key - https://www.iana.org/assignments/media-types/application/cose-key-set
1 parent b300a7d commit 2ab196a

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

table.csv

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ dns6, multiaddr, 0x37, permanent,
3838
dnsaddr, multiaddr, 0x38, permanent,
3939
pkix-pub, key, 0x40, draft, DER-encoded ASN.1 type SubjectPublicKeyInfo (SPKI) according to IETF RFC 5280 section 4.1.2.7; public key algorithm identified by the embedded AlgorithmIdentifier OID
4040
pkcs8-priv, key, 0x41, draft, DER-encoded ASN.1 type OneAsymmetricKey (PKCS #8) according to IETF RFC 5958 section 2; private key algorithm identified by the embedded AlgorithmIdentifier OID
41+
cose-key, key, 0x42, draft, CBOR-encoded COSE_Key (CBOR map) according to IETF RFC 9052 section 7; media type application/cose-key; kty/alg/crv parameters identify the key algorithm; may carry public/private/symmetric key material depending on which parameters are present
42+
cose-key-set, key, 0x43, draft, CBOR-encoded COSE_KeySet (CBOR array of COSE_Key) according to IETF RFC 9052 section 7; media type application/cose-key-set; each element processed independently
4143
protobuf, serialization, 0x50, draft, Protocol Buffers
4244
cbor, ipld, 0x51, permanent, CBOR
4345
raw, ipld, 0x55, permanent, raw binary

0 commit comments

Comments
 (0)