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

[EDITORIAL] Fix KDF Context in text and scripts #60

Merged
merged 2 commits into from
Jul 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
14 changes: 7 additions & 7 deletions draft-ietf-suit-firmware-encryption.md
Original file line number Diff line number Diff line change
Expand Up @@ -750,8 +750,8 @@ This example uses the following parameters:
- Algorithm ID: 1 (A128GCM)
- SuppPubInfo
- keyDataLength: 128
- protected = << { / alg / 1: -29 / ECDH-ES+A128KW / } >>
- other = 'SUIT Payload Encryption'
- protected: { / alg / 1: -29 / ECDH-ES+A128KW / }
- other: 'SUIT Payload Encryption'

The COSE_Encrypt structure, in hex format, is (with a line break inserted):

Expand Down Expand Up @@ -860,11 +860,11 @@ This example uses the following parameters:
- d: h'60FE6DD6D85D5740A5349B6F91267EEAC5BA81B8CB53EE249E4B4EB102C476B3'
- kid: 'kid-2'
- KDF Context
- ALgorithm ID: -3 (A128KW)
- Algorithm ID: -65534 (A128CTR)
- SuppPubInfo
- keyDataLength: 128
- protected = << { / alg / 1: -3 / A128KW / } >>
- other = 'SUIT Payload Encryption'
- protected: { / alg / 1: -29 / ECDH-ES+A128KW / }
- other: 'SUIT Payload Encryption'

The COSE_Encrypt structure, in hex format, is (with a line break inserted):

Expand Down Expand Up @@ -983,8 +983,8 @@ This example uses the following parameters:
- Algorithm ID: -65531 (A128CBC)
- SuppPubInfo
- keyDataLength: 128
- protected = h''
- other = 'SUIT Payload Encryption'
- protected: { / alg / 1: -29 / ECDH-ES+A128KW / }
- other: 'SUIT Payload Encryption'

The COSE_Encrypt structure, in hex format, is (with a line break inserted):

Expand Down
10 changes: 4 additions & 6 deletions examples/generate_suit_encryption_info_aescbc_aesctr.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,14 @@
"alg": "A128CBC",
"supp_pub": {
"key_data_length": 128,
"protected": {},
"protected": {"alg": "ECDH-ES+A128KW"},
"other": "SUIT Payload Encryption",
}
}

# The sender side:
r = Recipient.new(
protected={},
unprotected={"alg": "ECDH-ES+A128KW"},
protected={"alg": "ECDH-ES+A128KW"},
sender_key=COSEKey.from_jwk(sender_private_key_jwk),
recipient_key=COSEKey.from_jwk(receiver_public_key_jwk),
context=kdf_context_a128cbc
Expand Down Expand Up @@ -216,15 +215,14 @@
"alg": "A128CTR",
"supp_pub": {
"key_data_length": 128,
"protected": {},
"protected": {"alg": "ECDH-ES+A128KW"},
"other": "SUIT Payload Encryption",
}
}

# The sender side:
r = Recipient.new(
protected={},
unprotected={"alg": "ECDH-ES+A128KW"},
protected={"alg": "ECDH-ES+A128KW"},
sender_key=COSEKey.from_jwk(sender_private_key_jwk),
recipient_key=COSEKey.from_jwk(receiver_public_key_jwk),
context=kdf_context_a128ctr
Expand Down
2 changes: 1 addition & 1 deletion examples/validate_esdh_non_aead_suit_encryption_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"alg": kdf_algorithm,
"supp_pub": {
"key_data_length": 128,
"protected": {},
"protected": {"alg": "ECDH-ES+A128KW"},
"other": "SUIT Payload Encryption",
},
}
Expand Down
Loading