]>
Traces of EDHOC
Ericsson
SE164 40 Stockholm
Sweden
goran.selander@ericsson.com
Ericsson
SE164 40 Stockholm
Sweden
john.mattsson@ericsson.com
ASSA ABLOY
32080 Zabierzów
Poland
marek.serafin@assaabloy.com
RISE
SE164 40 Stockholm
Sweden
marco.tiloca@ri.se
Security
LAKE Working Group
InternetDraft
This document contains some example traces of Ephemeral DiffieHellman Over COSE (EDHOC).
Introduction
EDHOC is a lightweight authenticated key exchange protocol designed for highly constrained settings. This document contains annotated traces of EDHOC protocol runs, with input, output, and intermediate processing results to simplify testing of implementations.
The document contains two traces:

 Authentication with signature keys identified by the hash value of the X.509 certificates (provided in ). The endpoints use EdDSA for authentication and X25519 for ephemeralephemeral DiffieHellman key exchange.

 Authentication with static DiffieHellman keys identified by short key identifiers labelling CWT Claim Sets (CCSs) . The endpoints use NIST P256 (FIPS PUB 1864) for both ephemeralephemeral and staticephemeral DiffieHellman key exchange. This trace also illustrates the cipher suite negotiation, and provides an example of low protocol overhead, with messages sizes of (39, 45, 19) bytes.
The traces in this draft are valid for version 19 of .
Setup
EDHOC is run between an Initiator (I) and a Responder (R). The private/public key pairs and credentials of I and R required to produce the protocol messages are shown in the traces when needed for the calculations.
EDHOC messages and intermediate results are encoded in CBOR and can therefore be displayed in CBOR diagnostic notation using, e.g., the CBOR playground , which makes them easy to parse for humans.
NOTE 1. The same name is used for hexadecimal byte strings and their CBOR encodings. The traces contain both the raw byte strings and the corresponding CBOR encoded data items.
NOTE 2. If not clear from the context, remember that CBOR sequences and CBOR arrays assume CBOR encoded data items as elements.
NOTE 3. When the protocol transporting EDHOC messages does not inherently provide correlation across all messages, like CoAP, then some messages typically are prepended with connection identifiers and potentially a message_1 indicator (see Sections and of ). Those bytes are not included in the traces in this document.
Authentication with signatures, X.509 certificates identified by 'x5t'
In this example the Initiator (I) and Responder (R) are authenticated with digital signatures (METHOD = 0). Both I and R support cipher suite 0, which determines the algorithms:
 EDHOC AEAD algorithm = AESCCM1664128
 EDHOC hash algorithm = SHA256
 EDHOC MAC length in bytes (Static DH) = 8
 EDHOC key exchange algorithm (ECDH curve) = X25519
 EDHOC signature algorithm = EdDSA
 Application AEAD algorithm = AESCCM1664128
 Application hash algorithm = SHA256
The public keys are represented with X.509 certificates identified by the COSE header parameter 'x5t'.
message_1
Both endpoints are authenticated with signatures, i.e., METHOD = 0:
I selects cipher suite 0. A single cipher suite is encoded as an int:
I creates an ephemeral key pair for use with the EDHOC key exchange algorithm:
I selects its connection identifier C_I to be the byte string 0x2d, which since it is represented by the 1byte CBOR int 14 is encoded as 0x2d:
No external authorization data:
I constructs message_1:
message_2
R supports the most preferred and selected cipher suite 0, so SUITES_I is acceptable.
R creates an ephemeral key pair for use with the EDHOC key exchange algorithm:
R selects its connection identifier C_R to be the byte string 0x18, which since it is not represented as a 1byte CBOR int is encoded as h'18' = 0x4118:
The transcript hash TH_2 is calculated using the EDHOC hash algorithm:
TH_2 = H( G_Y, C_R, H(message_1) )
The input to calculate TH_2 is the CBOR sequence:
G_Y, C_R, H(message_1)
PRK_2e is specified in .
First, the ECDH shared secret G_XY is computed from G_X and Y, or G_Y and X:
Then, PRK_2e is calculated using EDHOC_Extract() determined by the EDHOC hash algorithm:
where salt is TH_2:
Since METHOD = 0, R authenticates using signatures. Since the selected cipher suite is 0, the EDHOC signature algorithm is EdDSA.
R's signature key pair using EdDSA:
PRK_3e2m is specified in .
Since R authenticates with signatures PRK_3e2m = PRK_2e.
R constructs the remaining input needed to calculate MAC_2:
MAC_2 = EDHOC_KDF( PRK_3e2m, 2, context_2, mac_length_2 )
context_2 = << ID_CRED_R, TH_2, CRED_R, ? EAD_2 >>
CRED_R is identified by a 64bit hash:
where the COSE header value 34 ('x5t') indicates a hash of an X.509 certficate,
and the COSE algorithm 15 indicates the hash algorithm SHA256 truncated to 64 bits.
ID_CRED_R (CBOR Data Item) (14 bytes)
a1 18 22 82 2e 48 79 f2 a4 1b 51 0c 1f 9b
CRED_R is a CBOR byte string of the DER encoding of the X.509 certificate in :
No external authorization data:
context_2 = << ID_CRED_R, TH_2, CRED_R, ? EAD_2 >>
MAC_2 is computed through EDHOC_Expand() using the EDHOC hash algorithm, see :
MAC_2 = HKDFExpand(PRK_3e2m, info, mac_length_2), where
info = ( 2, context_2, mac_length_2 )
Since METHOD = 0, mac_length_2 is given by the EDHOC hash algorithm.
info for MAC_2 is:
where the last value is the output size of the EDHOC hash algorithm.
Since METHOD = 0, Signature_or_MAC_2 is the 'signature' of the COSE_Sign1 object.
R constructs the message to be signed:
>,
<< TH_2, CRED_R, ? EAD_2 >>, MAC_2 ] =
[
"Signature1",
h'a11822822e4879f2a41b510c1f9b',
h'58203ab11700841fce193c323911edb317b046dcf24b9950
fd624884f7f57cd98b0758f13081ee3081a1a00302010202
0462319ec4300506032b6570301d311b301906035504030c
124544484f4320526f6f742045643235353139301e170d32
32303331363038323433365a170d32393132333132333030
30305a30223120301e06035504030c174544484f43205265
73706f6e6465722045643235353139302a300506032b6570
032100a1db47b95184854ad12a0c1a354e418aace33aa0f2
c662c00b3ac55de92f9359300506032b6570034100b723bc
01eab0928e8b2b6c98de19cc3823d46e7d6987b032478fec
faf14537a1af14cc8be829c6b73044101837eb4abc949565
d86dce51cfae52ab82c152cb02',
h'7ab961ac7630269a995a729a0fcead31f5cd97fb515bc5db
9c1119833e4c3b4a'
]
]]>
R signs using the private authentication key SK_R
R constructs PLAINTEXT_2:
The input needed to calculate KEYSTREAM_2 is defined in , using EDHOC_Expand() with the EDHOC hash algorithm:
where plaintext_length is the length of PLAINTEXT_2, and info for KEYSTREAM_2 is:
where the last value is the length of PLAINTEXT_2.
R calculates CIPHERTEXT_2 as XOR between PLAINTEXT_2 and KEYSTREAM_2:
R constructs message_2:
where G_Y_CIPHERTEXT_2 is the bstr encoding of the concatenation of
the raw values of G_Y and CIPHERTEXT_2.
message_3
Since METHOD = 0, I authenticates using signatures. Since the selected cipher suite is 0, the EDHOC signature algorithm is EdDSA.
I's signature key pair using EdDSA:
PRK_4e3m is specified in .
Since I authenticates with signatures PRK_4e3m = PRK_3e2m.
The transcript hash TH_3 is calculated using the EDHOC hash algorithm:
TH_3 = H(TH_2, PLAINTEXT_2, CRED_R)
I constructs the remaining input needed to calculate MAC_3:
where
>
]]>
CRED_I is identified by a 64bit hash:
where the COSE header value 34 ('x5t') indicates a hash of an X.509 certficate,
and the COSE algorithm 15 indicates the hash algorithm SHA256 truncated to 64 bits.
CRED_I is a CBOR byte string of the DER encoding of the X.509 certificate in :
No external authorization data:
context_3 = << ID_CRED_I, TH_3, CRED_I, ? EAD_3 >>
MAC_3 is computed through EDHOC_Expand() using the EDHOC hash algorithm, see :
info = ( 6, context_3, mac_length_3 )
where context_3 = << ID_CRED_I, TH_3, CRED_I, ? EAD_3 >>
Since METHOD = 0, mac_length_3 is given by the EDHOC hash algorithm.
info for MAC_3 is:
where the last value is the output size of the EDHOC hash algorithm.
Since METHOD = 0, Signature_or_MAC_3 is the 'signature' of the
COSE_Sign1 object.
I constructs the message to be signed:
>,
<< TH_3, CRED_I, ? EAD_3 >>, MAC_3 ] =
[
"Signature1",
h'a11822822e48c24ab2fd7643c79f',
h'58200312561b7343ceaf659df50013e064e6b46dcb3fa840
d855045e33c021d7f69158f13081ee3081a1a00302010202
0462319ea0300506032b6570301d311b301906035504030c
124544484f4320526f6f742045643235353139301e170d32
32303331363038323430305a170d32393132333132333030
30305a30223120301e06035504030c174544484f4320496e
69746961746f722045643235353139302a300506032b6570
032100ed06a8ae61a829ba5fa54525c9d07f48dd44a302f4
3e0f23d8cc20b73085141e300506032b6570034100521241
d8b3a770996bcfc9b9ead4e7e0a1c0db353a3bdf2910b392
75ae48b756015981850d27db6734e37f67212267dd05eeff
27b9e7a813fa574b72a00b430b',
h'cdd2507bcf662b5d9d9cf23c4b31a9b666c6a19a0a44dc2a
7a9c904522b1eb3e'
]
]]>
I signs using the private authentication key SK_I:
I constructs PLAINTEXT_3:
I constructs the associated data for message_3:
I constructs the input needed to derive the key K_3, see , using the EDHOC hash algorithm:
where key_length is the key length of EDHOC AEAD algorithm, and info for K_3 is:
where the last value is the key length of EDHOC AEAD algorithm.
I constructs the input needed to derive the nonce IV_3, see , using the EDHOC hash algorithm:
where iv_length is the nonce length of EDHOC AEAD algorithm, and info for IV_3 is:
where the last value is the nonce length of EDHOC AEAD algorithm.
I calculates CIPHERTEXT_3 as 'ciphertext' of COSE_Encrypt0 applied
using the EDHOC AEAD algorithm with plaintext PLAINTEXT_3, additional data
A_3, key K_3 and nonce IV_3.
message_3 is the CBOR bstr encoding of CIPHERTEXT_3:
The transcript hash TH_4 is calculated using the EDHOC hash algorithm:
TH_4 = H( TH_3, PLAINTEXT_3, CRED_I )
message_4
No external authorization data:
R constructs PLAINTEXT_4:
R constructs the associated data for message_4:
R constructs the input needed to derive the EDHOC message_4 key, see , using the EDHOC hash algorithm:
where key_length is the key length of the EDHOC AEAD algorithm,
and info for EDHOC_K_4 is:
where the last value is the key length of EDHOC AEAD algorithm.
R constructs the input needed to derive the EDHOC message_4 nonce, see , using the EDHOC hash algorithm:
where length is the nonce length of EDHOC AEAD algorithm,
and info for EDHOC_IV_4 is:
where the last value is the nonce length of EDHOC AEAD algorithm.
R calculates CIPHERTEXT_4 as 'ciphertext' of COSE_Encrypt0 applied
using the EDHOC AEAD algorithm with plaintext PLAINTEXT_4, additional data
A_4, key K_4 and nonce IV_4.
message_4 is the CBOR bstr encoding of CIPHERTEXT_4:
PRK_out and PRK_exporter
PRK_out is specified in .
where hash_length is the length of the output of the EDHOC hash algorithm, and info for PRK_out is:
where the last value is the length of EDHOC hash algorithm.
The OSCORE Master Secret and OSCORE Master Salt are derived with the EDHOC_Exporter as specified in 4.2.1 of .
where PRK_exporter is derived from PRK_out:
where hash_length is the length of the output of the EDHOC hash algorithm, and info for the PRK_exporter is:
where the last value is the length of EDHOC hash algorithm.
OSCORE Parameters
The derivation of OSCORE parameters is specified in Appendix A.1 of .
The AEAD and Hash algorithms to use in OSCORE are given by the selected cipher suite:
The mapping from EDHOC connection identifiers to OSCORE Sender/Recipient IDs is defined in .
C_R is mapped to the Recipient ID of the server, i.e., the Sender ID of the client. The byte string 0x18, which as C_R is encoded as the CBOR byte string 0x4118, is converted to the server Recipient ID 0x18.
C_I is mapped to the Recipient ID of the client, i.e., the Sender ID of the server. The byte string 0x2d, which as C_I is encoded as the CBOR integer 0x2d is converted to the client Recipient ID 0x2d.
The OSCORE Master Secret is computed through EDHOC_Expand() using the
Application hash algorithm, see Appendix A.1 of :
where oscore_key_length is by default the key length of the Application AEAD
algorithm, and info for the OSCORE Master Secret is:
where the last value is the key length of Application AEAD algorithm.
The OSCORE Master Salt is computed through EDHOC_Expand() using the Application hash algorithm, see :
where oscore_salt_length is the length of the OSCORE Master Salt, and info for the OSCORE Master Salt is:
where the last value is the length of the OSCORE Master Salt.
Key Update
Key update is defined in .
where hash_length is the length of the output of the EDHOC hash function, context for KeyUpdate is
and where info for key update is:
After key update the PRK_exporter needs to be derived anew:
where info and hash_length as unchanged as in .
The OSCORE Master Secret is derived with the updated PRK_exporter:
where info and key_length are unchanged as in .
The OSCORE Master Salt is derived with the updated PRK_exporter:
where info and salt_length are unchanged as in .
Authentication with static DH, CCS identified by 'kid'
In this example I and R are authenticated with ephemeralstatic DiffieHellman (METHOD = 3). I supports cipher suites 6 and 2 (in order of preference) and R only supports cipher suite 2. After an initial negotiation message exchange cipher suite 2 is used, which determines the algorithms:
 EDHOC AEAD algorithm = AESCCM1664128
 EDHOC hash algorithm = SHA256
 EDHOC MAC length in bytes (Static DH) = 8
 EDHOC key exchange algorithm (ECDH curve) = P256
 EDHOC signature algorithm = ES256
 Application AEAD algorithm = AESCCM1664128
 Application hash algorithm = SHA256
The public keys are represented as raw public keys (RPK), encoded in a CWT Claims Set (CCS) and identified by the COSE header parameter 'kid'.
message_1 (first time)
Both endpoints are authenticated with static DH, i.e., METHOD = 3:
I selects its preferred cipher suite 6. A single cipher suite is encoded as an int:
I creates an ephemeral key pair for use with the EDHOC key exchange algorithm:
I selects its connection identifier C_I to be the byte string 0x0e, which since it is represented by the 1byte CBOR int 14 is encoded as 0x0e:
No external authorization data:
EAD_1 (CBOR Sequence) (0 bytes)
I constructs message_1:
error
R does not support cipher suite 6 and sends an error with ERR_CODE 2 containing SUITES_R as ERR_INFO. R proposes cipher suite 2, a single cipher suite thus encoded as an int.
message_1 (second time)
Same steps are performed as message_1 first time, , but with updated SUITES_I.
Both endpoints are authenticated with static DH, i.e., METHOD = 3:
I selects cipher suite 2 and indicates the more preferred cipher suite(s), in this case 6, all encoded as the array [6, 2]:
I creates an ephemeral key pair for use with the EDHOC key exchange algorithm:
I selects its connection identifier C_I to be the byte string 0x37, which since it is represented by the 1byte CBOR int 24 is encoded as 0x37:
No external authorization data:
I constructs message_1:
message_2
R supports the selected cipher suite 2 and not the by I more preferred cipher suite(s) 6, so SUITES_I is acceptable.
R creates an ephemeral key pair for use with the EDHOC key exchange algorithm:
R selects its connection identifier C_R to be the byte string 0x27, which since it is represented by the 1byte CBOR int 8 is encoded as 0x27:
The transcript hash TH_2 is calculated using the EDHOC hash algorithm:
TH_2 = H( G_Y, C_R, H(message_1) )
The input to calculate TH_2 is the CBOR sequence:
G_Y, C_R, H(message_1)
PRK_2e is specified in .
First, the ECDH shared secret G_XY is computed from G_X and Y, or G_Y and X:
Then, PRK_2e is calculated using EDHOC_Extract() determined by the EDHOC hash algorithm:
where salt is TH_2:
Since METHOD = 3, R authenticates using static DH. The EDHOC key exchange algorithm is based on the same curve as for the ephemeral keys, which is P256, since the selected cipher suite is 2.
R's static DiffieHellman P256 key pair:
Since R authenticates with static DH (METHOD = 3), PRK_3e2m is derived
from SALT_3e2m and G_RX.
The input needed to calculate SALT_3e2m is defined in , using EDHOC_Expand() with the EDHOC hash algorithm:
where hash_length is the length of the output of the EDHOC hash algorithm, and info for SALT_3e2m is:
PRK_3e2m is specified in .
PRK_3e2m is derived from G_RX using EDHOC_Extract() with the EDHOC hash algorithm:
where G_RX is the ECDH shared secret calculated from G_X and R, or G_R and X.
R constructs the remaining input needed to calculate MAC_2:
MAC_2 = EDHOC_KDF( PRK_3e2m, 2, context_2, mac_length_2 )
context_2 = << ID_CRED_R, TH_2, CRED_R, ? EAD_2 >>
CRED_R is identified by a 'kid' with byte string value 0x32:
CRED_R is an RPK encoded as a CCS:
No external authorization data:
context_2 = << ID_CRED_R, TH_2, CRED_R, ? EAD_2 >>
MAC_2 is computed through EDHOC_Expand() using the EDHOC hash algorithm, see :
MAC_2 = HKDFExpand(PRK_3e2m, info, mac_length_2), where
info = ( 2, context_2, mac_length_2 )
Since METHOD = 3, mac_length_2 is given by the EDHOC MAC length.
info for MAC_2 is:
where the last value is the EDHOC MAC length.
Since METHOD = 3, Signature_or_MAC_2 is MAC_2:
R constructs PLAINTEXT_2:
Since ID_CRED_R contains a single 'kid' parameter, only the byte string value is included in the plaintext, represented as described in . The CBOR map { 4 : h'32' } is thus replaced, not by the CBOR byte string 0x4132, but by the CBOR int 0x32, since that is a one byte encoding of a CBOR integer (19).
The input needed to calculate KEYSTREAM_2 is defined in , using EDHOC_Expand() with the EDHOC hash algorithm:
where plaintext_length is the length of PLAINTEXT_2, and info for KEYSTREAM_2 is:
where the last value is the length of PLAINTEXT_2.
R calculates CIPHERTEXT_2 as XOR between PLAINTEXT_2 and KEYSTREAM_2:
R constructs message_2:
where G_Y_CIPHERTEXT_2 is the bstr encoding of the concatenation of
the raw values of G_Y and CIPHERTEXT_2.
message_3
The transcript hash TH_3 is calculated using the EDHOC hash algorithm:
TH_3 = H( TH_2, PLAINTEXT_2, CRED_R )
Since METHOD = 3, I authenticates using static DH. The EDHOC key exchange algorithm is based on the same curve as for the ephemeral keys, which is P256, since the selected cipher suite is 2.
I's static DiffieHellman P256 key pair:
Since I authenticates with static DH (METHOD = 3), PRK_4e3m is derived
from SALT_4e3m and G_IY.
The input needed to calculate SALT_4e3m is defined in , using EDHOC_Expand() with the EDHOC hash algorithm:
where hash_length is the length of the output of the EDHOC hash algorithm, and info for SALT_4e3m is:
PRK_4e3m is specified in .
Since I authenticates with static DH (METHOD = 3), PRK_4e3m is derived
from G_IY using EDHOC_Extract() with the EDHOC hash algorithm:
where G_IY is the ECDH shared secret calculated from G_I and Y, or G_Y and I.
I constructs the remaining input needed to calculate MAC_3:
MAC_3 = EDHOC_KDF( PRK_4e3m, 6, context_3, mac_length_3 )
context_3 = << ID_CRED_I, TH_3, CRED_I, ? EAD_3 >>
CRED_I is identified by a 'kid' with byte string value 0x2b:
CRED_I is an RPK encoded as a CCS:
No external authorization data:
context_3 = << ID_CRED_I, TH_3, CRED_I, ? EAD_3 >>
MAC_3 is computed through EDHOC_Expand() using the EDHOC hash algorithm, see :
info = ( 6, context_3, mac_length_3 )
Since METHOD = 3, mac_length_3 is given by the EDHOC MAC length.
info for MAC_3 is:
where the last value is the EDHOC MAC length.
Since METHOD = 3, Signature_or_MAC_3 is MAC_3:
I constructs PLAINTEXT_3:
Since ID_CRED_I contains a single 'kid' parameter, only the byte string value is included in the plaintext, represented as described in . The CBOR map { 4 : h'2b' } is thus replaced, not by the CBOR byte string 0x412b, but by the CBOR int 0x2b, since that is a one byte encoding of a CBOR integer (12).
I constructs the associated data for message_3:
I constructs the input needed to derive the key K_3, see , using the EDHOC hash algorithm:
where key_length is the key length of EDHOC AEAD algorithm, and info for K_3 is:
where the last value is the key length of EDHOC AEAD algorithm.
I constructs the input needed to derive the nonce IV_3, see , using the EDHOC hash algorithm:
where iv_length is the nonce length of EDHOC AEAD algorithm, and info for IV_3 is:
where the last value is the nonce length of EDHOC AEAD algorithm.
I calculates CIPHERTEXT_3 as 'ciphertext' of COSE_Encrypt0 applied
using the EDHOC AEAD algorithm with plaintext PLAINTEXT_3, additional data
A_3, key K_3 and nonce IV_3.
message_3 is the CBOR bstr encoding of CIPHERTEXT_3:
The transcript hash TH_4 is calculated using the EDHOC hash algorithm:
TH_4 = H( TH_3, PLAINTEXT_3, CRED_I )
message_4
No external authorization data:
EAD_4 (CBOR Sequence) (0 bytes)
R constructs PLAINTEXT_4:
PLAINTEXT_4 (CBOR Sequence) (0 bytes)
R constructs the associated data for message_4:
R constructs the input needed to derive the EDHOC message_4 key, see , using the EDHOC hash algorithm:
where key_length is the key length of the EDHOC AEAD algorithm,
and info for EDHOC_K_4 is:
where the last value is the key length of EDHOC AEAD algorithm.
R constructs the input needed to derive the EDHOC message_4 nonce, see , using the EDHOC hash algorithm:
where iv_length is the nonce length of EDHOC AEAD algorithm,
and info for EDHOC_IV_4 is:
where the last value is the nonce length of EDHOC AEAD algorithm.
R calculates CIPHERTEXT_4 as 'ciphertext' of COSE_Encrypt0 applied
using the EDHOC AEAD algorithm with plaintext PLAINTEXT_4, additional data
A_4, key K_4 and nonce IV_4.
message_4 is the CBOR bstr encoding of CIPHERTEXT_4:
PRK_out and PRK_exporter
PRK_out is specified in .
where hash_length is the length of the output of the EDHOC hash algorithm, and info for PRK_out is:
where the last value is the length of EDHOC hash algorithm.
The OSCORE Master Secret and OSCORE Master Salt are derived with the EDHOC_Exporter as specified in 4.2.1 of .
where PRK_exporter is derived from PRK_out:
where hash_length is the length of the output of the EDHOC hash algorithm, and info for the PRK_exporter is:
where the last value is the length of EDHOC hash algorithm.
OSCORE Parameters
The derivation of OSCORE parameters is specified in Appendix A.1 of
.
The AEAD and Hash algorithms to use in OSCORE are given by the selected cipher suite:
The mapping from EDHOC connection identifiers to OSCORE Sender/Recipient IDs
is defined in .
C_R is mapped to the Recipient ID of the server, i.e., the Sender ID of the client. The byte string 0x27, which as C_R is encoded as the CBOR integer 0x27, is converted to the server Recipient ID 0x27.
C_I is mapped to the Recipient ID of the client, i.e., the Sender ID of the server. The byte string 0x37, which as C_I is encoded as the CBOR integer 0x0e is converted to the client Recipient ID 0x37.
The OSCORE Master Secret is computed through EDHOC_Expand() using the
Application hash algorithm, see Appendix A.1 of :
where oscore_key_length is by default the key length of the Application AEAD
algorithm, and info for the OSCORE Master Secret is:
where the last value is the key length of Application AEAD algorithm.
The OSCORE Master Salt is computed through EDHOC_Expand() using the Application hash algorithm, see :
where oscore_salt_length is the length of the OSCORE Master Salt, and info for the OSCORE Master Salt is:
where the last value is the length of the OSCORE Master Salt.
Key Update
Key update is defined in .
where hash_length is the length of the output of the EDHOC hash function, context for KeyUpdate is
and where info for key update is:
After key update the PRK_exporter needs to be derived anew:
where info and hash_length as unchanged as in .
The OSCORE Master Secret is derived with the updated PRK_exporter:
where info and key_length are unchanged as in .
The OSCORE Master Salt is derived with the updated PRK_exporter:
where info and salt_length are unchanged as in .
Security Considerations
This document contains examples of EDHOC whose security considerations apply. The keys printed in these examples cannot be considered secret and must not be used.
IANA Considerations
There are no IANA considerations.
Informative References
Ephemeral DiffieHellman Over COSE (EDHOC)
Ericsson AB
Ericsson AB
Ericsson AB
This document specifies Ephemeral DiffieHellman Over COSE (EDHOC), a
very compact and lightweight authenticated DiffieHellman key
exchange with ephemeral keys. EDHOC provides mutual authentication,
forward secrecy, and identity protection. EDHOC is intended for
usage in constrained scenarios and a main use case is to establish an
OSCORE security context. By reusing COSE for cryptography, CBOR for
encoding, and CoAP for transport, the additional code size can be
kept very low.
Elliptic Curves for Security
This memo specifies two elliptic curves over prime fields that offer a high level of practical security in cryptographic applications, including Transport Layer Security (TLS). These curves are intended to operate at the ~128bit and ~224bit security level, respectively, and are generated deterministically based on a list of required properties.
EdwardsCurve Digital Signature Algorithm (EdDSA)
This document describes elliptic curve signature scheme Edwardscurve Digital Signature Algorithm (EdDSA). The algorithm is instantiated with recommended parameters for the edwards25519 and edwards448 curves. An example implementation and test vectors are provided.
CBOR Web Token (CWT)
CBOR Web Token (CWT) is a compact means of representing claims to be transferred between two parties. The claims in a CWT are encoded in the Concise Binary Object Representation (CBOR), and CBOR Object Signing and Encryption (COSE) is used for added applicationlayer security protection. A claim is a piece of information asserted about a subject and is represented as a name/value pair consisting of a claim name and a claim value. CWT is derived from JSON Web Token (JWT) but uses CBOR rather than JSON.
Concise Binary Object Representation (CBOR)
The Concise Binary Object Representation (CBOR) is a data format whose design goals include the possibility of extremely small code size, fairly small message size, and extensibility without the need for version negotiation. These design goals make it different from earlier binary serializations such as ASN.1 and MessagePack.
This document obsoletes RFC 7049, providing editorial improvements, new details, and errata fixes while keeping full compatibility with the interchange format of RFC 7049. It does not create a new version of the format.
CBOR Playground
Acknowledgments
The authors want to thank all people verifying EDHOC test vectors and/or contributing to the interoperability testing including: , , , , , , , , and .