Sanctum changes the classical Diffie-Hellman component of its hybrid key exchange from X25519 to the secp384r1 elliptic curve. OpenSSL is now the default backend; MbedTLS is an alternative, and LibreSSL can substitute for OpenSSL. As a result, a standard build now needs OpenSSL as well as pkg-config and libsodium, unless a different asymmetry backend is selected at compile time. The code generalizes key and signature size definitions so alternate cryptographic backends can specify their own dimensions.
The exchange still combines ECDH with ML-KEM-1024: both peers create offers, exchange public keys and KEM data, and derive directional session keys from the resulting shared secrets and a derivative of their shared symmetric key, using KMAC256. The larger curve’s 96-byte public key is sent in four 32-byte fragments, while its private key and shared secret use 48 bytes. Documentation and protocol structures are updated to describe generic ECDH rather than X25519. Ed25519 remains the default signing mechanism for offers used in Cathedral communication; signatures are not part of ordinary key exchanges, and replacing Ed25519 is identified as a possible future change.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.