ddn.crypto.kex.x25519
ECDH / X25519 Implementation (RFC 7748).
Side-Channel Status: The Montgomery ladder below runs a fixed 255-iteration pattern and performs its conditional swaps with branch-free mask arithmetic. The field arithmetic itself, however, is still variable-time heap-allocated BigInt, so this module is NOT a constant-time implementation: timing analysis of the modular reductions may still correlate with intermediate values. A fixed-width constant-time field representation is required to close that gap.
class X25519
Types 1
classX25519 : KeyAgreement
X25519 Key Agreement (ECDH over Curve25519).
Fields
private ubyte[32] _secretprivate bool _initializedprivate Object constLock_private BigInt curveP_private bool curvePInit_private BigInt a24_private bool a24Init_Methods
void initialize(PrivateKey privateKey)void init(PrivateKey privateKey)ubyte[] calculateSecret(PublicKey publicKey)Destructors