ddn.crypto.kex.x448

X448 Implementation (RFC 7748).

Constant-Time Implementation: This module uses the Montgomery

ladder algorithm which provides constant-time execution pattern. The conditional swaps use a branch-based implementation; for maximum side-channel resistance, consider additional countermeasures.

class X448

Types 1

classX448 : KeyAgreement

X448 Key Agreement (ECDH over Curve448).

Fields
private ubyte[56] _secret
private bool _initialized
private BigInt P
private BigInt A24
Methods
void init(PrivateKey privateKey)
ubyte[] calculateSecret(PublicKey publicKey)
ubyte[] x448(const(ubyte)[] k, const(ubyte)[] u)Calculates X448(k, u).
private BigInt decodeLittleEndian(const(ubyte)[] b)
private ubyte[] encodeLittleEndian(BigInt n)
private BigInt montgomeryLadder(BigInt k, BigInt u)Montgomery ladder scalar multiplication.
private void cswap(uint doSwap, ref BigInt a, ref BigInt b)Conditional swap for Montgomery ladder.