Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verify key triples #341

Merged
merged 36 commits into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
0cab88d
Added sections for key verification triples
nedmsmith Oct 26, 2024
3320cfe
Update attest-key-triple-record.cddl
nedmsmith Oct 26, 2024
3be066f
Update identity-triple-record.cddl
nedmsmith Oct 26, 2024
8c3a576
Update draft-ietf-rats-corim.md
nedmsmith Nov 1, 2024
6ca3495
Update draft-ietf-rats-corim.md
nedmsmith Nov 1, 2024
6ebbf81
Update draft-ietf-rats-corim.md
nedmsmith Nov 1, 2024
9e4f81f
Update draft-ietf-rats-corim.md
nedmsmith Nov 1, 2024
e280620
change the order of fields in the record
nedmsmith Nov 2, 2024
52f1c37
Update draft-ietf-rats-corim.md
nedmsmith Nov 6, 2024
8d664b0
Update draft-ietf-rats-corim.md
nedmsmith Nov 13, 2024
d66a0a0
Apply suggestions from code review
yogeshbdeshpande Nov 13, 2024
37500fb
Update cddl/attest-key-triple-record.cddl
deeglaze Nov 13, 2024
5e46509
Added conditions map
nedmsmith Nov 13, 2024
a16e861
Update comid-5.diag
nedmsmith Nov 13, 2024
dbb6ef3
Update spec to reflect cddl changes
nedmsmith Nov 13, 2024
6e6d88d
Update comid-5.diag
nedmsmith Nov 13, 2024
001ae31
Apply suggestions from code review
yogeshbdeshpande Nov 20, 2024
92f013e
Create intrep-key.cddl
nedmsmith Dec 3, 2024
2194185
Create intrep-start.cddl
nedmsmith Dec 3, 2024
128a950
Update corim-frags.mk
nedmsmith Dec 3, 2024
f73c973
Update corim-frags.mk
nedmsmith Dec 3, 2024
56a742e
Update intrep-ect.cddl
nedmsmith Dec 3, 2024
3686274
Update intrep-key.cddl
nedmsmith Dec 3, 2024
8cc7612
Update intrep-start.cddl
nedmsmith Dec 3, 2024
f469cc1
ECT examples created
nedmsmith Dec 3, 2024
7a2a7b9
Update Makefile
nedmsmith Dec 4, 2024
a3dc0dd
Update intrep-3.diag
nedmsmith Dec 4, 2024
d400737
Update intrep-key.cddl
nedmsmith Dec 4, 2024
3dfcbea
Updated key verification sections
nedmsmith Dec 4, 2024
fb16f16
Update Makefile
nedmsmith Dec 4, 2024
1163a3d
Update Gemfile
nedmsmith Dec 4, 2024
7cea4fc
Update draft-ietf-rats-corim.md
nedmsmith Dec 4, 2024
fc94ac5
Update draft-ietf-rats-corim.md
nedmsmith Dec 4, 2024
4759649
Update draft-ietf-rats-corim.md
nedmsmith Dec 5, 2024
e3e5bb2
revert intrep-ect.cddl
thomas-fossati Dec 5, 2024
984e952
intrep-key changes to follow convention
nedmsmith Dec 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
source 'https://rubygems.org'

gem 'json_pure'
gem 'cddl', '>=0.12.5'
gem 'cddl', '>=0.12.6'
gem 'cbor-diag', '>=0.8.7'
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ include cddl/corim-frags.mk

define cddl_targets

$(drafts_xml):: cddl/$(1)-autogen.cddl
$(drafts_xml): cddl/$(1)-autogen.cddl

cddl/$(1)-autogen.cddl: $(addprefix cddl/,$(2))
$(MAKE) -C cddl check-$(1)
Expand All @@ -24,6 +24,7 @@ endef # cddl_targets

$(eval $(call cddl_targets,corim,$(CORIM_FRAGS)))
$(eval $(call cddl_targets,comid,$(COMID_FRAGS)))
$(eval $(call cddl_targets,intrep,$(INTREP_FRAGS)))

cddl/concise-swid-tag.cddl: ; $(MAKE) -C cddl $(notdir $@)

Expand Down
8 changes: 6 additions & 2 deletions cddl/attest-key-triple-record.cddl
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
attest-key-triple-record = [
environment-map
[ + $crypto-key-type-choice ]
environment: environment-map
key-list: [ + $crypto-key-type-choice ]
? conditions: non-empty< {
? &(mkey: 0) => $measured-element-type-choice,
? &(authorized-by: 1) => [ + $crypto-key-type-choice ]
}>
]
10 changes: 9 additions & 1 deletion cddl/corim-frags.mk
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ CORIM_FRAGS += $(COMID_FRAGS)

CORIM_EXAMPLES := $(wildcard examples/corim-*.diag)

INTREP_FRAGS := intrep-acs.cddl
INTREP_FRAGS := intrep-start.cddl
INTREP_FRAGS += intrep-acs.cddl
INTREP_FRAGS += intrep-ae.cddl
INTREP_FRAGS += intrep-ar.cddl
INTREP_FRAGS += intrep-ars.cddl
Expand All @@ -86,6 +87,7 @@ INTREP_FRAGS += intrep-ev.cddl
INTREP_FRAGS += intrep-policy.cddl
INTREP_FRAGS += intrep-rv.cddl
INTREP_FRAGS += intrep-claims-map.cddl
INTREP_FRAGS += intrep-key.cddl
# deps
INTREP_FRAGS += non-empty.cddl
INTREP_FRAGS += environment-map.cddl
Expand All @@ -102,5 +104,11 @@ INTREP_FRAGS += ip-addr-type-choice.cddl
INTREP_FRAGS += ueid.cddl
INTREP_FRAGS += uuid.cddl
INTREP_FRAGS += integrity-registers.cddl
INTREP_FRAGS += crypto-key-type-choice.cddl
INTREP_FRAGS += profile-type-choice.cddl
INTREP_FRAGS += cose-key.cddl
INTREP_FRAGS += cose-label-and-value.cddl
INTREP_FRAGS += class-id-type-choice.cddl
INTREP_FRAGS += oid.cddl

INTREP_EXAMPLES := $(wildcard examples/intrep-*.diag)
151 changes: 148 additions & 3 deletions cddl/examples/comid-5.diag
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,27 @@
/ comid.tag-id / 0 : h'3f06af63a93c11e4979700505690773f'
},
/ comid.triples / 4 : {
/ reference-triples / 0 : [
[
/ environment-map / {
/ class / 0 : {
/ class-id / 0 :
/ tagged-uuid-type / 37( h'67b28b6c34cc40a19117ab5b05911e39' )
}
},
[
/ measurement-map / {
/ mkey / 0 : "thing 2",
/ mval / 1 : {
/ cryptokeys / 13 : [
/ tagged-pkix-base64-cert-path-type / 556("base64_cert_path_X"),
/ tagged-pkix-base64-cert-path-type / 556("base64_cert_path_Y")
]
}
}
]
]
],
/ identity-triples / 2 : [
[
/ environment-map / {
Expand All @@ -16,10 +37,10 @@
/ layer / 3 : 1
}
},
[
/ key-list / [
/ tagged-pkix-base64-key-type / 554("base64_key_X"),
/ tagged-pkix-base64-cert-type / 555("base64_cert"),
/ tagged-pkix-base64-cert-path-type / 556("base64_cert_path"),
/ tagged-pkix-base64-cert-type / 555("base64_cert_Y"),
/ tagged-pkix-base64-cert-path-type / 556("base64_cert_path_Z"),
/ tagged-thumbprint-type / 557([
/ alg / 1, / sha256 /
/ value / h'44aa336af4cb14a879432e53dd6571c7fa9bccafb75f488259262d6ea3a4d91b'
Expand All @@ -38,6 +59,130 @@
/ value / h'66aa336af4cb14a879432e53dd6571c7fa9bccafb75f488259262d6ea3a4d91b'
])
]
],
[
/ environment-map / {
/ class / 0 : {
/ class-id / 0 :
/ tagged-uuid-type / 37( h'67b28b6c34cc40a19117ab5b05911e38' )
}
},
/ key-list / [
/ tagged-pkix-base64-cert-path-type / 556("base64_cert_path_X"),
/ tagged-pkix-base64-cert-path-type / 556("base64_cert_path_Y")
],
/ conditions / {
/ mkey / 0 : "thing 1"
}
],
[
/ environment-map / {
/ class / 0 : {
/ class-id / 0 :
/ tagged-uuid-type / 37( h'67b28b6c34cc40a19117ab5b05911e39' )
}
},
/ key-list / [
/ tagged-pkix-base64-cert-path-type / 556("base64_cert_path_X"),
/ tagged-pkix-base64-cert-path-type / 556("base64_cert_path_Y")
],
/ conditions / {
/ mkey / 0 : "thing 2",
/ authorized-by / 1: [
/ tagged-pkix-base64-cert-path-type / 556("base64_cert_path_A"),
/ tagged-pkix-base64-cert-path-type / 556("base64_cert_path_B")
]
}
],
[
/ environment-map / {
/ class / 0 : {
/ class-id / 0 :
/ tagged-uuid-type / 37( h'67b28b6c34cc40a19117ab5b05911e40' )
}
},
/ key-list / [
/ tagged-pkix-base64-cert-path-type / 556("base64_cert_path_X"),
/ tagged-pkix-base64-cert-path-type / 556("base64_cert_path_Y")
],
/ conditions / {
/ authorized-by / 1: [
/ tagged-pkix-base64-cert-path-type / 556("base64_cert_path_A"),
/ tagged-pkix-base64-cert-path-type / 556("base64_cert_path_B")
]
}
]
],
/ attest-key-triples / 3 : [
[
/ environment-map / {
/ class / 0 : {
/ class-id / 0 :
/ tagged-uuid-type / 37(
h'67b28b6c34cc40a19117ab5b05911e37'
),
/ vendor / 1 : "ACME Inc.",
/ model / 2 : "ACME RoadRunner",
/ layer / 3 : 1
}
},
/ key-list / [
/ tagged-pkix-base64-key-type / 554("base64_key_X"),
/ tagged-pkix-base64-cert-type / 555("base64_cert_Y"),
/ tagged-pkix-base64-cert-path-type / 556("base64_cert_path_Z")
]
],
[
/ environment-map / {
/ class / 0 : {
/ class-id / 0 :
/ tagged-uuid-type / 37( h'67b28b6c34cc40a19117ab5b05911e30' )
}
},
/ key-list / [
/ tagged-pkix-base64-cert-path-type / 556("base64_cert_path_X"),
/ tagged-pkix-base64-cert-path-type / 556("base64_cert_path_Y")
],
/ conditions / {
/ mkey / 0 : "thing 1"
}
],
[
/ environment-map / {
/ class / 0 : {
/ class-id / 0 :
/ tagged-uuid-type / 37( h'67b28b6c34cc40a19117ab5b05911e31' )
}
},
/ key-list / [
/ tagged-pkix-base64-cert-path-type / 556("base64_cert_path_X"),
/ tagged-pkix-base64-cert-path-type / 556("base64_cert_path_Y")
],
/ conditions / {
/ mkey / 0 : "thing 2",
/ authorized-by / 1: [
/ tagged-pkix-base64-cert-path-type / 556("base64_cert_path_A"),
/ tagged-pkix-base64-cert-path-type / 556("base64_cert_path_B")
]
}
],
[
/ environment-map / {
/ class / 0 : {
/ class-id / 0 :
/ tagged-uuid-type / 37( h'67b28b6c34cc40a19117ab5b05911e32' )
}
},
/ key-list / [
/ tagged-pkix-base64-cert-path-type / 556("base64_cert_path_X"),
/ tagged-pkix-base64-cert-path-type / 556("base64_cert_path_Y")
],
/ conditions / {
/ authorized-by / 1: [
/ tagged-pkix-base64-cert-path-type / 556("base64_cert_path_A"),
/ tagged-pkix-base64-cert-path-type / 556("base64_cert_path_B")
]
}
]
]
}
Expand Down
4 changes: 4 additions & 0 deletions cddl/examples/intrep-1.diag
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/ ECT / {
"cmtype" : 2
}

9 changes: 9 additions & 0 deletions cddl/examples/intrep-2.diag
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/ ECT / {
"environment" : {
/ class / 0 : {
/ class-id / 0 :
/ tagged-uuid-type / 37( h'67b28b6c34cc40a19117ab5b05911e37' )
}
},
"cmtype" : 1
}
32 changes: 32 additions & 0 deletions cddl/examples/intrep-3.diag
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/ ECT / {
"environment" : {
/ class / 0 : {
/ class-id / 0 :
/ tagged-uuid-type / 37( h'67b28b6c34cc40a19117ab5b05911e37' )
}
},
"element-list" : [
/ element-map / {
"element-claims" : {
/ ver / 0 : {
/ version / 0 : "1.0.0"
},
/ digests / 2 : [ [
/ hash-alg-id / 1, / sha256 /
/ hash-value / h'44aa336af4cb14a879432e53dd6571c7fa9bccafb75f488259262d6ea3a4d91b'
] ],
/ intrep-key / 65534 : [
/ typed-crypto-key / {
"key": 556("base64_cert_path_X"),
"key-type": 1
},
/ typed-crypto-key / {
"key": 554("base64_key_Y"),
"key-type": 2
}
]
}
}
],
"cmtype" : 2
}
10 changes: 7 additions & 3 deletions cddl/identity-triple-record.cddl
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
identity-triple-record = [
environment-map
[ + $crypto-key-type-choice ]
]
environment: environment-map
key-list: [ + $crypto-key-type-choice ]
? conditions: non-empty<{
? &(mkey: 0) => $measured-element-type-choice,
? &(authorized-by: 1) => [ + $crypto-key-type-choice ]
}>
]
14 changes: 14 additions & 0 deletions cddl/intrep-key.cddl
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
$$measurement-values-map-extension //= (
&(intrep-keys: 65534) => [ + typed-crypto-key ]
)

typed-crypto-key = {
key: $crypto-key-type-choice
? key-type: uint .bits key-type
}

key-type = &(
attest-key: 0
identity-key: 1
)

1 change: 1 addition & 0 deletions cddl/intrep-start.cddl
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
start = ECT
Loading
Loading