ddn.crypto.signature.ed25519

Ed25519 Signature Implementation (RFC 8032).

Constant-Time Implementation: This module uses constant-time

scalar multiplication to prevent timing side-channel attacks. The point multiplication executes in constant time regardless of the scalar value.

Types 4

private structCurveEd25519
private structPoint
Fields
private Ed25519PrivateKey _key
private Appender!(ubyte[]) _buffer
Methods
void init(PrivateKey key)
void update(const(ubyte)[] input)
ubyte[] sign()
Fields
private Ed25519PublicKey _key
private Appender!(ubyte[]) _buffer
Methods
void init(PublicKey key)
void update(const(ubyte)[] input)
bool verify(const(ubyte)[] signature)

Functions 10

private fnPoint pointAdd(Point P, Point Q)
private fnPoint pointDouble(Point P)
private fnPoint pointMul(Point P, BigInt s)Constant-time scalar multiplication using double-and-add-always.
private fnPoint ctSelectPoint(uint condition, Point a, Point b) pure nothrow @safeConstant-time point selection.
private fnubyte[] encodePoint(Point P)
private fnPoint decodePoint(const(ubyte)[] enc)
private fnbool encodedIsNull(const(ubyte)[] enc)
private fnBigInt modInverse(BigInt a, BigInt n)
private fnBigInt bytesToBigIntLE(const(ubyte)[] bytes)
private fnubyte[] bigIntToBytesLE(BigInt n, size_t len)