Sanctum: "Swap the classical ECDH part of the exchange from x25519 to secp384r1" Sanctum published a specification change replacing the x25519 classical ECDH component of its hybrid key exchange with a generic ECC key exchange, with the commit message directing that the classical part be swapped from x25519 to secp384r1. The updated spec keeps ML-KEM-1024 as the post-quantum half, deriving per-direction session keys via KMAC256 from the ECDH and ML-KEM-1024 shared secrets combined with a derivative of the shared symmetrical key, and renames the pseudocode calls from X25519-KEYGEN and X25519-SCALAR-MULT to ECC-KEYGEN and ECC-DERIVE. The change matters because it moves Sanctum's hybrid handshake off a fixed curve without altering the ML-KEM-1024 encapsulation flow or the pending RX key installation that avoids dropping traffic. | @@ -18,7 +18,7 @@ construction are fixed as there is no risk for key, nonce | | 18 | 18 | pair re-use in this specific scenario. | | 19 | 19 | | | 20 | 20 | Key derivation for session keys is done by combing unique | | 21 | | - per-direction shared secrets from ECDH x25519 and ML-KEM-1024, | | | 21 | + per-direction shared secrets from ECDH and ML-KEM-1024, | | 22 | 22 | together with a derivative of our shared symmetrical key. | | 23 | 23 | | | 24 | 24 | IKM = len ecdh ss \|\| ecdh ss \|\| len mlkem1024 ss \|\| mlkem1024 ss \|\| | | @@ -133,13 +133,13 @@ these can be distributed via a cathedral as an ambry, see docs/cathedral.md. | | 133 | 133 | | | 134 | 134 | Session keys SK are derived from the traffic base rx or | | 135 | 135 | traffic base tx keys in combination with directional unique | | 136 | | - ECDH x25519 and ML-KEM-1024 shared secrets, using KMAC256 as the KDF. | | | 136 | + ECDH and ML-KEM-1024 shared secrets, using KMAC256 as the KDF. | | 137 | 137 | | | 138 | 138 | Both sides start by sending out offerings that contain an ML-KEM-1024 | | 139 | | - public key and an x25519 public key. | | | 139 | + public key and an ECDH public key. | | 140 | 140 | | | 141 | 141 | Both sides upon receiving these offerings will perform ML-KEM-1024 | | 142 | | - encapsulation and send back the ciphertext and their own x25519 | | | 142 | + encapsulation and send back the ciphertext and their own ECDH | | 143 | 143 | public key which differs from the one sent in the initial offering. | | 144 | 144 | | | 145 | 145 | When a side performs encapsulation it will derive a fresh | | @@ -150,7 +150,7 @@ When a side performs decapsulation it will derive a fresh | | 150 | 150 | TX session key using all of that key material and install the | | 151 | 151 | key as the active TX key. | | 152 | 152 | | | 153 | | - In both cases this results in unique shared secrets for x25519 | | | 153 | + In both cases this results in unique shared secrets for ECDH | | 154 | 154 | and ML-KEM-1024 in each direction, while allowing us to gracefully | | 155 | 155 | install pending RX keys so that we do not miss a beat. | | 156 | 156 | | | @@ -166,7 +166,7 @@ derive offer encryption key seed : | | 166 | 166 | return wk | | 167 | 167 | | | 168 | 168 | offer create : | | 169 | | - offer.ecdh = X25519-KEYGEN | | | 169 | + offer.ecdh = ECC-KEYGEN | | 170 | 170 | offer.kem = ML-KEM-1024-KEYGEN | | 171 | 171 | offer.now = TIME WALL CLOCK , 64-bit | | 172 | 172 | offer.id = PRNG 64-bit , unique sanctum id | | @@ -204,7 +204,7 @@ offer recv pk offer : | | 204 | 204 | dk = derive offer encryption key packet.header.seed | | 205 | 205 | pt = AES256-GCM dk, nonce=1, aad=packet.header, packet.data | | 206 | 206 | | | 207 | | - ecdh ss = X25519-SCALAR-MULT pt.ecdh.pub, offer.ecdh.private | | | 207 | + ecdh ss = ECC-DERIVE pt.ecdh.pub, offer.ecdh.private | | 208 | 208 | offer.kem.ct, kem ss = ML-KEM-1024-ENCAP pt.kem.pk | | 209 | 209 | | | 210 | 210 | if pt.instance < local id | | @@ -249,7 +249,7 @@ offer recv ct offer : | | 249 | 249 | dk = derive offer encryption key packet.header.seed | | 250 | 250 | pt = AES256-GCM dk, nonce=1, aad=packet.header, packet.data | | 251 | 251 | | | 252 | | - ecdh ss = X25519-SCALAR-MULT pt.ecdh.pub, offer.ecdh.private | | | 252 | + ecdh ss = ECC-DERIVE pt.ecdh.pub, offer.ecdh.private | | 253 | 253 | kem ss = ML-KEM-1024-DECAP offer.kem, pt.kem.ct | | 254 | 254 | | | 255 | 255 | if pt.instance < local id | | |