Skip to content

Commit

Permalink
tests: traces is now RFC9529
Browse files Browse the repository at this point in the history
  • Loading branch information
chrysn committed Mar 21, 2024
1 parent 555d66b commit 0462f2f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lakers-python/test/test_lakers.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import lakers
import pytest

# values from draft-ietf-lake-traces
# values from RFC9529
CRED_I = bytes.fromhex("A2027734322D35302D33312D46462D45462D33372D33322D333908A101A5010202412B2001215820AC75E9ECE3E50BFC8ED60399889522405C47BF16DF96660A41298CB4307F7EB62258206E5DE611388A4B8A8211334AC7D37ECB52A387D257E6DB3C2A93DF21FF3AFFC8")
I = bytes.fromhex("fb13adeb6518cee5f88417660841142e830a81fe334380a953406a1305e8706b")
R = bytes.fromhex("72cc4761dbd4c78f758931aa589d348d1ef874a7e303ede2f140dcf3e6aa4aac")
Expand Down Expand Up @@ -57,7 +57,7 @@ def test_handshake():
assert i_oscore_secret == r_oscore_secret
assert i_oscore_salt == r_oscore_salt

# test key update with context from draft-ietf-lake-traces
# test key update with context from RFC9529
i_prk_out_new = initiator.edhoc_key_update(CONTEXT)
r_prk_out_new = responder.edhoc_key_update(CONTEXT)
assert i_prk_out_new == r_prk_out_new
Expand Down
2 changes: 1 addition & 1 deletion lib/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ mod test {
assert_eq!(i_oscore_secret, r_oscore_secret);
assert_eq!(i_oscore_salt, r_oscore_salt);

// test key update with context from draft-ietf-lake-traces
// test key update with context from RFC9529
let i_prk_out_new = initiator.edhoc_key_update(&[
0xa0, 0x11, 0x58, 0xfd, 0xb8, 0x20, 0x89, 0x0c, 0xd6, 0xbe, 0x16, 0x96, 0x02, 0xb8,
0xbc, 0xea,
Expand Down
2 changes: 1 addition & 1 deletion shared/src/cred.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ impl CredentialRPK {
}

fn parse(cred: &[u8]) -> Result<(BytesP256ElemLen, u8), EDHOCError> {
// NOTE: this routine is only guaranteed to work with credentials from lake-traces
// NOTE: this routine is only guaranteed to work with credentials from RFC9529
const CCS_PREFIX_LEN: usize = 3;
const CNF_AND_COSE_KEY_PREFIX_LEN: usize = 8;
const COSE_KEY_FIRST_ITEMS_LEN: usize = 6;
Expand Down

0 comments on commit 0462f2f

Please sign in to comment.