From 5de0aa3452bb0c1467b3f8e0df7fbca3ad0686fc Mon Sep 17 00:00:00 2001 From: Auresium <77592857+Auresium@users.noreply.github.com> Date: Thu, 14 Aug 2025 12:02:27 -0400 Subject: [PATCH 1/3] Improve meaning of tx and rx keys in the algo details It was not clear from which viewpoint the algorithm was considering tx and rx. It was from the client one so we made it more explicit. --- key_exchange/README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/key_exchange/README.md b/key_exchange/README.md index a3f9e1a..ffb32a8 100644 --- a/key_exchange/README.md +++ b/key_exchange/README.md @@ -107,9 +107,12 @@ The shared secret key `rx` should be used by the server to receive data from the ## Algorithm details -Let `p.n` be the `crypto_scalarmult_curve25519_BYTES` byte output of the X25519 key exchange operation. The 512-bit output of `BLAKE2B-512` is split into two 256-bit keys `rx` and `tx`. +Let `p.n` be the `crypto_scalarmult_curve25519_BYTES` byte output of the X25519 key exchange operation. The 512-bit output of `BLAKE2B-512` is split into two 256-bit keys `crx` and `ctx`. +`crx = stx` and `ctx = srx`. +`crx` being the client reception key and `ctx` the client transmission key. +`srx` being the server reception key and `stx` the server transmission key. -`rx || tx = BLAKE2B-512(p.n || client_pk || server_pk)` +`crx || ctx = BLAKE2B-512(p.n || client_pk || server_pk)` ## Notes From 88918454e2c5dcc8744aa59c20ef02243f395b74 Mon Sep 17 00:00:00 2001 From: Auresium <77592857+Auresium@users.noreply.github.com> Date: Thu, 14 Aug 2025 12:03:22 -0400 Subject: [PATCH 2/3] Add some line breaks --- key_exchange/README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/key_exchange/README.md b/key_exchange/README.md index ffb32a8..7dd80ee 100644 --- a/key_exchange/README.md +++ b/key_exchange/README.md @@ -108,8 +108,11 @@ The shared secret key `rx` should be used by the server to receive data from the ## Algorithm details Let `p.n` be the `crypto_scalarmult_curve25519_BYTES` byte output of the X25519 key exchange operation. The 512-bit output of `BLAKE2B-512` is split into two 256-bit keys `crx` and `ctx`. + `crx = stx` and `ctx = srx`. + `crx` being the client reception key and `ctx` the client transmission key. + `srx` being the server reception key and `stx` the server transmission key. `crx || ctx = BLAKE2B-512(p.n || client_pk || server_pk)` From db29a3f6366d2bdb546a736500d6f4f3f9cb3ec4 Mon Sep 17 00:00:00 2001 From: Auresium <77592857+Auresium@users.noreply.github.com> Date: Thu, 14 Aug 2025 12:15:52 -0400 Subject: [PATCH 3/3] Make naming convention consistent with the rest of the document --- key_exchange/README.md | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/key_exchange/README.md b/key_exchange/README.md index 7dd80ee..fd3ca75 100644 --- a/key_exchange/README.md +++ b/key_exchange/README.md @@ -107,15 +107,11 @@ The shared secret key `rx` should be used by the server to receive data from the ## Algorithm details -Let `p.n` be the `crypto_scalarmult_curve25519_BYTES` byte output of the X25519 key exchange operation. The 512-bit output of `BLAKE2B-512` is split into two 256-bit keys `crx` and `ctx`. +Let `p.n` be the `crypto_scalarmult_curve25519_BYTES` byte output of the X25519 key exchange operation. The 512-bit output of `BLAKE2B-512` is split into two 256-bit keys `client_rx` and `client_tx`. -`crx = stx` and `ctx = srx`. +`client_rx = server_tx` and `client_tx = server_rx`. -`crx` being the client reception key and `ctx` the client transmission key. - -`srx` being the server reception key and `stx` the server transmission key. - -`crx || ctx = BLAKE2B-512(p.n || client_pk || server_pk)` +`client_rx || client_tx = BLAKE2B-512(p.n || client_pk || server_pk)` ## Notes