The EdDSA pool and the seed-based EdDSA keys. tDSIEdDSA implements iDSIED and carries the ONLY real implementation of the EdDSA signature/verification schemes, as overrides of the protected virtual SignaturePrimitive_EdDSA/VerificationPrimitive_EdDSA methods of tDSIDLArith (which raise in every other pool). The pool is registered with PKTypes in this unit's initialization; obtain it via GetDSIED. The key classes (iEdDSAPrivateKey/iEdDSAPublicKey, declared in StreamSec.DSI.PKTypes) form a class of their own: their SignScheme is pinned to dlssaEdDSA and cannot be changed, and the EdDSA dispatch in StreamSec.DSI.DiscreteLog only accepts keys implementing the EdDSA key interfaces - so EdDSA and every other scheme are mutually exclusive by construction. The private key is the RFC 8032 seed (32 bytes for Ed25519, 57 for Ed448); the secret scalar and prefix are derived per operation. The curve arithmetic (field elements, the branchless Edwards ladder, the point codec and the curve classes) lives in StreamSec.DSI.CurveEdArith; hashing is accessed through stSecUtils (SHA-512 via the hash class registry, SHAKE256 via stSHA3).
inherits from tDLPrivateKey
implements iEdDSAPrivateKey
constructor Create(const aPool: iDSIDLArith; const aParams: iDiscreteLogField);
destructor Destroy; override;
function NewKeys(const aParams: iDiscreteLogField): iGroupElement; overload; override;
function PublicKey: iGroupElement; overload; override;
function Validate(const aPubl: iDLPublicKey): Boolean; overload; override;
property Seed: tBytes read GetSeed write SetSeed;
inherits from tDLPublicKey
implements iEdDSAPublicKey
constructor Create(const aPool: iDSIDLArith; const aParams: iDiscreteLogField);
inherits from tDSIDLArith
implements iDSIED
class function CreatePrivateKey(const aPool: iDSIDLArith; const aParams : iDiscreteLogField): iDLPrivateKey; override;
class function CreatePublicKey(const aPool: iDSIDLArith; const aParams : iDiscreteLogField): iDLPublicKey; override;
function IsNonTrivialFieldElement(const aElement: iGroupElement; const aParams : iDiscreteLogField) : Boolean; override;
function IsGroupElement(const aElement: iGroupElement; const aParams : iDiscreteLogField) : Boolean; override;
function FieldElementToBytes(const aElement : iGroupElement; const aParams : iDiscreteLogField; const aDst : tBytes; aDstOffset: Integer; var aDstCount : Integer) : Boolean; override;
function BytesToFieldElement(const aSrc : tBytes; aSrcOffset, aSrcCount : Integer; const aParams : iDiscreteLogField) : iGroupElement; override;