Skip to content

Commit e7a55df

Browse files
authored
Support OCP Endorsed CSR as EAT CWT, and remove support for conveying all available CSRs at once (#39)
Signed-off-by: Fabrizio Damato <[email protected]>
1 parent ed72f6b commit e7a55df

File tree

5 files changed

+67
-38
lines changed

5 files changed

+67
-38
lines changed

specifications/device-identity-provisioning/cddl/ocp-endorsed-csr.cddl

Lines changed: 0 additions & 18 deletions
This file was deleted.
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
cwt-enveloped-csr-eat = {
2+
; The EAT Profile for Endorsed CSR OCP will register
3+
&(eat-profile : 265 ) => ~oid ; "2.16.840.1.113741.1.16.1" - note: `~` strips CBOR tag #6.111(oid) from `oid`
4+
5+
; Issuer claim is StringOrURI (tstr)
6+
&(iss : 1) => tstr
7+
8+
; Nonce claim is nonce-type = bstr .size (8..64)
9+
? &(nonce : 10) => bstr
10+
11+
; Private Claims (they have to be < -65536 for rfc8392)
12+
13+
; KeyPair Id
14+
&(id: -70001) => uint
15+
16+
; CSR bytestring
17+
&(csr: -70002) => bstr
18+
19+
; Attribute List of OIDs
20+
&(attrib: -70003) => [+ $key-attributes-type]
21+
}
22+
23+
$key-attributes-type = tagged-oid-type
24+
25+
signed-cwt = #6.18(COSE-Sign1-concise-evidence)
26+
27+
COSE-Sign1-concise-evidence = [
28+
protected: bstr .cbor protected-ce-header-map
29+
unprotected: unprotected-ce-header-map
30+
payload: bstr .cbor cwt-enveloped-csr-eat
31+
signature: bstr
32+
]
33+
34+
protected-ce-header-map = {
35+
; Well-defined header fields
36+
&(alg-id: 1) => int
37+
&(content-type: 3) => tstr / int
38+
&(issuer-key-id: 4) => bstr
39+
; User-defined fields
40+
* cose-label => cose-value
41+
}
42+
43+
unprotected-ce-header-map = {
44+
? &(x5-chain: 33) => bstr / [ 2*certs: bstr ]
45+
* cose-label => cose-value
46+
}
47+

specifications/device-identity-provisioning/diag/endorsed-csr-unsigned-all.diag

Lines changed: 0 additions & 18 deletions
This file was deleted.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
signed-cwt / 18([
2+
/ protected / <<{
3+
/ alg-id / 1 : 7,
4+
/ content-type / 3 : "application/eat+cbor",
5+
/ kid / 4 : 'Example OCP Enveloped-Signed CSR CWT'
6+
}>>,
7+
/ unprotected / {/ x5-chain / 33 : h'59025630820252308201d9a003020102021431a4ef62e5244e4d952ea485976098090d5f242f300a06082a8648ce3d040303307b310b30090603550406130255533113301106035504080c0a43616c69666f726e69613116301406035504070c0d53616e204672616e636973636f311d301b060355040a0c144578616d706c65204f7267616e697a6174696f6e3120301e06035504030c174578616d706c652043575420456e646f7273656d656e74301e170d3235303231333139303230345a170d3236303231343139303230345a307b310b30090603550406130255533113301106035504080c0a43616c69666f726e69613116301406035504070c0d53616e204672616e636973636f311d301b060355040a0c144578616d706c65204f7267616e697a6174696f6e3120301e06035504030c174578616d706c652043575420456e646f7273656d656e743076301006072a8648ce3d020106052b8104002203620004fcd3fad48575addceee9638583aa7054f71a402f35993901923cc0ee9763b85b1e729c740331f4e91079559bce17d5c3b706748333faeb192120e32d815f88f7310ae05df55060f96fbdb2d0acb19e710d25ec27cfa8945fe5dda73332813feda31e301c301a0603551d1104133011820f7777772e6578616d706c652e636f6d300a06082a8648ce3d040303036700306402306e1166a8a3132d4a20e0200a26d1eba0937fec54fdb7547eb7c5ccca0370170853294cdd6b3a1eb0fe649f12446d8b17023071219daf2b7c1aa6f7727d053e1027309594fd8cab9f820fa89d8f88fc7e551c0d30781b12aea48b53fde200e6cf082b' },
8+
/ payload / <<{
9+
/ eat-profile / 265 : h'88378952',
10+
/ iss / 1 : "RT Alias Key",
11+
/ nonce / 10: h'AAAABBBBAAAABBBBAAAABBBB',
12+
/ id / -70001 : 0,
13+
/ csr / -70002 : h'59025630820252308201d9a003020102021431a4e0',
14+
/ attrib / -70003: [
15+
/ tagged-oid-type / 111(h'6086480186F84D010F046301')
16+
]
17+
}>>,
18+
/ signature / h'FA45AAB345AB4988'
19+
])

specifications/device-identity-provisioning/spec.ocp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,7 @@ Table: GET_ENDORSED_CSR VendorDefinedReqPayload {#tbl:ecsr-req}
216216
| 6 | Param1 | 1 | KeyPairID. The value of this field |
217217
| | | | shall be the keypair ID identifying |
218218
| | | | the desired asymmetric key pair for |
219-
| | | | which the CSR should be issued. if 0xFF |
220-
| | | | returns a list of all availabe CSRs |
219+
| | | | which the CSR should be issued. |
221220
+---------------------+---------------------+---------------------+----------------------------------------------+
222221
| 7 | Param2 | 1 | Request Attributes. Shall adhere to |
223222
| | | | Table 91 of SPDM 1.3. |

0 commit comments

Comments
 (0)