Contents · Forum Home · StreamSec Tools 4.1.5.363 documentation

StreamSec.DSI.CustomKeyFormat

Classes, interfaces and records

classeKeyFormatError

inherits from Exception

(no public members)

interfaceiKeyFileHeader

function GetData: iUnknown; procedure SetData(const Value: iUnknown); function GetHeader: TStrings; function GetEncodedHeader: OctetString; procedure SetEncodedHeader(const Value: OctetString); property Header: TStrings read GetHeader; property EncodedHeader: OctetString read GetEncodedHeader write SetEncodedHeader; property Data: iUnknown read GetData write SetData;

classtRFC822KeyFileHeader

inherits from TInterfacedObject

implements iUnknown, iKeyFileHeader

constructor Create; destructor Destroy; override;

interfaceiCustomDSIKeyFormat

function GetKeyFormatSupports: tKeyFormatSupports; function LoadFromStream(const aPwd : iSecretKey; aStrm: TStream; const aKey : iUnknown; const aKFS : tKeyFormatSupports) : iUnknown; procedure SaveToStream(const aPriv: iUnknown; const aPwd : iSecretKey; aStrm: TStream; const aKFS : tKeyFormatSupports); property KeyFormatSupports: tKeyFormatSupports read GetKeyFormatSupports;

classtCustomDSIKeyFormat

inherits from tCustomOption

implements iCustomDSIKeyFormat

(no public members)

classtCustomDSIKeyFormatList

inherits from tCustomOptionList

procedure SuggestRequiredUnits(aProc: tGetStringMethod); override; procedure SaveToStream(const aPriv: iUnknown; const aPwd : iSecretKey; aStrm: TStream; const aIntf: TGUID); overload;
Generic by-GUID save used by the DSI key components in StreamSec.DSI.ArithComp (their PublicKeyFormat/PrivateKeyFormat lists are these tDSI*KeyFormatList types) when the concrete key-pair interface is only available as a GUID at the call site: it walks SelOptions looking for the first enabled for... Full description »
property EnabledFormatCount: Integer read GetEnabledFormatCount;
Number of format implementations currently enabled (selected) in SelOptions for this key type. An application (or the IDE's option-list editor) enables/disables individual on-disk formats at design time; LoadFromStream on the derived list tries EnabledFormatCount formats in turn to auto-detect th... Full description »

interfaceiDSIIFPrivateKeyFormat

One concrete on-disk encoding (e.g. a PKCS#1/PKCS#8-style format) for an IF (RSA-family, integer-factorization) private key. Application code normally does not call these methods on a single format directly; it goes through tDSIIFPrivateKeyFormatList so the right encoding is picked automatically. LoadFromStream decodes aStrm (decrypting with aPwd if the format is password-protected) into aKey; SaveToStream encodes aKey to aStrm the same way.

function LoadFromStream(const aPwd : iSecretKey; aStrm: TStream; const aKey : iIFPrivateKey) : iIFPrivateKey;
Decodes this one on-disk encoding of the RSA-family private key from aStrm into aKey, decrypting with aPwd for password-protected formats, and returns nil when this format cannot decode the stream. Application code normally loads via the typed key or tDSIIFPrivateKeyFormatList, not a raw format.
procedure SaveToStream(const aPriv: iIFPrivateKey; const aPwd : iSecretKey; aStrm: TStream);
Encodes aPriv to aStrm in this one format, encrypting under aPwd for password-protected formats. Application code normally saves via tDSIIFPrivateKeyFormatList, which selects the format, rather than here.

classtDSIIFPrivateKeyFormatList

inherits from tCustomDSIKeyFormatList

implements iDSIIFPrivateKeyFormat

The IF (RSA-family) private-key format registry an application actually talks to (e.g. via key storage/manager code) when loading or saving a private key file whose exact on-disk format is not known in advance.

function LoadFromStream(const aPwd : iSecretKey; aStrm: TStream; const aKey : iIFPrivateKey) : iIFPrivateKey;
Tries each enabled format in turn (rewinding aStrm between attempts) until one successfully decodes aKey; returns nil if none match, so this is the usual way an application auto-detects an IF private-key file's encoding without knowing it up front.
procedure SaveToStream(const aPriv: iIFPrivateKey; const aPwd : iSecretKey; aStrm: TStream); overload;
Always writes using EnabledFormats[0] (raises if no format is enabled), so an application controls the on-disk encoding used for new key files by ordering/enabling formats in SelOptions, not by picking one here.
property EnabledFormats[aIndex: Integer]: iDSIIFPrivateKeyFormat read GetEnabledFormats;
Indexed access (0..EnabledFormatCount-1) to the individual enabled format implementations, in the order they will be tried by LoadFromStream / used (index 0) by SaveToStream.

classtDSIIFPrivateKeyFormat

inherits from tCustomDSIKeyFormat

implements iDSIIFPrivateKeyFormat

procedure SuggestRequiredUnits(aProc: tGetStringMethod); override;

interfaceiDSIDLPrivateKeyFormat

One concrete on-disk encoding for a DL-family private key. iDLPrivateKey here covers the discrete-log family in the widest sense used by this pool abstraction: plain DL/DSA, FFC (finite-field Diffie-Hellman), EC (ECDSA/ECDH) and Edwards-curve (EdDSA) keys can all arrive through this same interface, distinguished by which pool (iDSIFF/iDSIEC/iDSIED) backs them -- see tDSIDLPrivateKeyFormat.SuggestRequiredUnits. As with the IF formats, application code normally goes through tDSIDLPrivateKeyFormatList rather than calling a single format directly.

function LoadFromStream(const aPwd : iSecretKey; aStrm: TStream; const aKey : iDLPrivateKey) : iDLPrivateKey;
Decodes this one on-disk encoding of the DL-family private key from aStrm into aKey, decrypting with aPwd for password-protected formats, and returns nil when this format cannot decode the stream. Application code normally loads via the typed key or tDSIDLPrivateKeyFormatList, not a raw format.
procedure SaveToStream(const aPriv: iDLPrivateKey; const aPwd : iSecretKey; aStrm: TStream);
Encodes aPriv to aStrm in this one format, encrypting under aPwd for password-protected formats. Application code normally saves via tDSIDLPrivateKeyFormatList, which selects the format, rather than here.

classtDSIDLPrivateKeyFormatList

inherits from tCustomDSIKeyFormatList

implements iDSIDLPrivateKeyFormat

The DL-family (DSA/DH/ECDSA/ECDH/EdDSA) private-key format registry an application uses to load/save private keys of these types without hard-coding the on-disk encoding.

function LoadFromStream(const aPwd : iSecretKey; aStrm: TStream; const aKey : iDLPrivateKey) : iDLPrivateKey;
Auto-detects the encoding by trying each enabled format in turn, rewinding aStrm between attempts, and returns nil if none decode it.
procedure SaveToStream(const aPriv: iDLPrivateKey; const aPwd : iSecretKey; aStrm: TStream); overload;
Writes using EnabledFormats[0] only (raises if none are enabled); the write format is chosen by list order/enablement, not by this call.
property EnabledFormats[aIndex: Integer]: iDSIDLPrivateKeyFormat read GetEnabledFormats;
Indexed access to the individual enabled DL private-key formats, in the order LoadFromStream tries them / SaveToStream's index-0 pick.

classtDSIDLPrivateKeyFormat

inherits from tCustomDSIKeyFormat

implements iDSIDLPrivateKeyFormat

procedure SuggestRequiredUnits(aProc: tGetStringMethod); override;

interfaceiDSISNTRUPPrivateKeyFormat

Typed Streamlined NTRU Prime key-format extension points. Concrete encoders can implement a format using only the interfaces in PKTypes; this registry assigns no ASN.1 algorithm identifier or wire encoding.

function LoadFromStream(const aPwd : iSecretKey; aStrm: TStream; const aKey : iSNTRUPPrivateKey) : iSNTRUPPrivateKey;
Decodes this one on-disk encoding of the sntrup761 private key from aStrm into aKey, decrypting with aPwd for password-protected formats, and returns nil when this format cannot decode the stream. Application code normally loads via tDSISNTRUPPrivateKeyFormatList.
procedure SaveToStream(const aPriv: iSNTRUPPrivateKey; const aPwd : iSecretKey; aStrm: TStream);
Encodes aPriv to aStrm in this one format, encrypting under aPwd for password-protected formats. Application code normally saves via tDSISNTRUPPrivateKeyFormatList, which selects the format, rather than here.

classtDSISNTRUPPrivateKeyFormatList

inherits from tCustomDSIKeyFormatList

implements iDSISNTRUPPrivateKeyFormat

sntrup761 private-key format registry: the entry point an application uses to load or save a post-quantum KEM private key file without knowing its exact on-disk encoding up front.

function LoadFromStream(const aPwd : iSecretKey; aStrm: TStream; const aKey : iSNTRUPPrivateKey) : iSNTRUPPrivateKey;
Tries each enabled sntrup761 format in turn (rewinding aStrm) to auto-detect the encoding; returns nil if none decode successfully.
procedure SaveToStream(const aPriv: iSNTRUPPrivateKey; const aPwd : iSecretKey; aStrm: TStream); overload;
Always writes with EnabledFormats[0] (raises if none enabled).
property EnabledFormats[aIndex: Integer]: iDSISNTRUPPrivateKeyFormat read GetEnabledFormats;
Indexed access to the enabled sntrup761 private-key formats, in the order LoadFromStream tries them / SaveToStream's index-0 pick.

classtDSISNTRUPPrivateKeyFormat

inherits from tCustomDSIKeyFormat

implements iDSISNTRUPPrivateKeyFormat

procedure SuggestRequiredUnits(aProc: tGetStringMethod); override;

interfaceiDSIMLKEMPrivateKeyFormat

One concrete on-disk encoding for a post-quantum ML-KEM private key (FIPS 203). As with the classical formats above, an application normally reaches this through tDSIMLKEMPrivateKeyFormatList rather than a single format instance.

function LoadFromStream(const aPwd : iSecretKey; aStrm: TStream; const aKey : iMLKEMPrivateKey) : iMLKEMPrivateKey;
Decodes this one on-disk encoding of the ML-KEM private key from aStrm into aKey, decrypting with aPwd for password-protected formats, and returns nil when this format cannot decode the stream. Application code normally loads via the typed key or tDSIMLKEMPrivateKeyFormatList, not a raw format.
procedure SaveToStream(const aPriv: iMLKEMPrivateKey; const aPwd : iSecretKey; aStrm: TStream);
Encodes aPriv to aStrm in this one format, encrypting under aPwd for password-protected formats. Application code normally saves via tDSIMLKEMPrivateKeyFormatList, which selects the format, rather than here.

classtDSIMLKEMPrivateKeyFormatList

inherits from tCustomDSIKeyFormatList

implements iDSIMLKEMPrivateKeyFormat

ML-KEM private-key format registry: the entry point an application uses to load or save a post-quantum KEM private key file without knowing its exact on-disk encoding up front.

function LoadFromStream(const aPwd : iSecretKey; aStrm: TStream; const aKey : iMLKEMPrivateKey) : iMLKEMPrivateKey;
Tries each enabled ML-KEM format in turn (rewinding aStrm) to auto-detect the encoding; returns nil if none decode successfully.
procedure SaveToStream(const aPriv: iMLKEMPrivateKey; const aPwd : iSecretKey; aStrm: TStream); overload;
Always writes with EnabledFormats[0] (raises if none enabled).
property EnabledFormats[aIndex: Integer]: iDSIMLKEMPrivateKeyFormat read GetEnabledFormats;
Indexed access to the enabled ML-KEM private-key formats, in the order LoadFromStream tries them / SaveToStream's index-0 pick.

classtDSIMLKEMPrivateKeyFormat

inherits from tCustomDSIKeyFormat

implements iDSIMLKEMPrivateKeyFormat

procedure SuggestRequiredUnits(aProc: tGetStringMethod); override;

interfaceiDSIMLDSAPrivateKeyFormat

One concrete on-disk encoding for a post-quantum ML-DSA private key (FIPS 204). Reached indirectly through tDSIMLDSAPrivateKeyFormatList by application code in the common case.

function LoadFromStream(const aPwd : iSecretKey; aStrm: TStream; const aKey : iMLDSAPrivateKey) : iMLDSAPrivateKey;
Decodes this one on-disk encoding of the ML-DSA private key from aStrm into aKey, decrypting with aPwd for password-protected formats, and returns nil when this format cannot decode the stream. Application code normally loads via the typed key or tDSIMLDSAPrivateKeyFormatList, not a raw format.
procedure SaveToStream(const aPriv: iMLDSAPrivateKey; const aPwd : iSecretKey; aStrm: TStream);
Encodes aPriv to aStrm in this one format, encrypting under aPwd for password-protected formats. Application code normally saves via tDSIMLDSAPrivateKeyFormatList, which selects the format, rather than here.

classtDSIMLDSAPrivateKeyFormatList

inherits from tCustomDSIKeyFormatList

implements iDSIMLDSAPrivateKeyFormat

ML-DSA private-key format registry: how an application loads/saves a post-quantum signature private key file without hard-coding its encoding.

function LoadFromStream(const aPwd : iSecretKey; aStrm: TStream; const aKey : iMLDSAPrivateKey) : iMLDSAPrivateKey;
Auto-detects the encoding by trying each enabled ML-DSA format in turn (rewinding aStrm between attempts); returns nil if none decode it.
procedure SaveToStream(const aPriv: iMLDSAPrivateKey; const aPwd : iSecretKey; aStrm: TStream); overload;
Always writes with EnabledFormats[0] (raises if none enabled).
property EnabledFormats[aIndex: Integer]: iDSIMLDSAPrivateKeyFormat read GetEnabledFormats;
Indexed access to the enabled ML-DSA private-key formats, in the order LoadFromStream tries them / SaveToStream's index-0 pick.

classtDSIMLDSAPrivateKeyFormat

inherits from tCustomDSIKeyFormat

implements iDSIMLDSAPrivateKeyFormat

procedure SuggestRequiredUnits(aProc: tGetStringMethod); override;

interfaceiDSICompositeMLDSAPrivateKeyFormat

One concrete on-disk encoding for a composite ML-DSA private key (the IETF LAMPS composite-signature combiner pairing a traditional signature key with ML-DSA). Application code normally reaches this through tDSICompositeMLDSAPrivateKeyFormatList.

function LoadFromStream(const aPwd : iSecretKey; aStrm: TStream; const aKey : iCompositeMLDSAPrivateKey) : iCompositeMLDSAPrivateKey;
Decodes this one on-disk encoding of the composite (traditional + ML-DSA) private key from aStrm into aKey, decrypting with aPwd for password-protected formats, and returns nil when this format cannot decode the stream. Application code normally loads via the typed key or tDSICompositeMLDSAPrivateKeyFormatList, not a raw format.
procedure SaveToStream(const aPriv: iCompositeMLDSAPrivateKey; const aPwd : iSecretKey; aStrm: TStream);
Encodes aPriv to aStrm in this one format, encrypting under aPwd for password-protected formats. Application code normally saves via tDSICompositeMLDSAPrivateKeyFormatList, which selects the format, rather than here.

classtDSICompositeMLDSAPrivateKeyFormatList

inherits from tCustomDSIKeyFormatList

implements iDSICompositeMLDSAPrivateKeyFormat

Composite ML-DSA private-key format registry: how an application loads or saves a composite (traditional + post-quantum) signature private key file without hard-coding its on-disk encoding.

function LoadFromStream(const aPwd : iSecretKey; aStrm: TStream; const aKey : iCompositeMLDSAPrivateKey) : iCompositeMLDSAPrivateKey;
Auto-detects the encoding by trying each enabled format in turn (rewinding aStrm between attempts); returns nil if none decode it.
procedure SaveToStream(const aPriv: iCompositeMLDSAPrivateKey; const aPwd : iSecretKey; aStrm: TStream); overload;
Always writes with EnabledFormats[0] (raises if none enabled).
property EnabledFormats[aIndex: Integer]: iDSICompositeMLDSAPrivateKeyFormat read GetEnabledFormats;
Indexed access to the enabled composite ML-DSA private-key formats, in the order LoadFromStream tries them / SaveToStream's index-0 pick.

classtDSICompositeMLDSAPrivateKeyFormat

inherits from tCustomDSIKeyFormat

implements iDSICompositeMLDSAPrivateKeyFormat

procedure SuggestRequiredUnits(aProc: tGetStringMethod); override;

interfaceiDSICompositeMLKEMPrivateKeyFormat

One concrete on-disk encoding for a composite ML-KEM private key (a hybrid classical-KEM + ML-KEM combiner). Reached indirectly through tDSICompositeMLKEMPrivateKeyFormatList by application code.

function LoadFromStream(const aPwd : iSecretKey; aStrm: TStream; const aKey : iCompositeMLKEMPrivateKey) : iCompositeMLKEMPrivateKey;
Decodes this one on-disk encoding of the composite (classical + ML-KEM) private key from aStrm into aKey, decrypting with aPwd for password-protected formats, and returns nil when this format cannot decode the stream. Application code normally loads via the typed key or tDSICompositeMLKEMPrivateKeyFormatList, not a raw format.
procedure SaveToStream(const aPriv: iCompositeMLKEMPrivateKey; const aPwd : iSecretKey; aStrm: TStream);
Encodes aPriv to aStrm in this one format, encrypting under aPwd for password-protected formats. Application code normally saves via tDSICompositeMLKEMPrivateKeyFormatList, which selects the format, rather than here.

classtDSICompositeMLKEMPrivateKeyFormatList

inherits from tCustomDSIKeyFormatList

implements iDSICompositeMLKEMPrivateKeyFormat

Composite ML-KEM private-key format registry: how an application loads or saves a hybrid (classical + post-quantum) KEM private key file without hard-coding its on-disk encoding.

function LoadFromStream(const aPwd : iSecretKey; aStrm: TStream; const aKey : iCompositeMLKEMPrivateKey) : iCompositeMLKEMPrivateKey;
Auto-detects the encoding by trying each enabled format in turn (rewinding aStrm between attempts); returns nil if none decode it.
procedure SaveToStream(const aPriv: iCompositeMLKEMPrivateKey; const aPwd : iSecretKey; aStrm: TStream); overload;
Always writes with EnabledFormats[0] (raises if none enabled).
property EnabledFormats[aIndex: Integer]: iDSICompositeMLKEMPrivateKeyFormat read GetEnabledFormats;
Indexed access to the enabled composite ML-KEM private-key formats, in the order LoadFromStream tries them / SaveToStream's index-0 pick.

classtDSICompositeMLKEMPrivateKeyFormat

inherits from tCustomDSIKeyFormat

implements iDSICompositeMLKEMPrivateKeyFormat

procedure SuggestRequiredUnits(aProc: tGetStringMethod); override;

interfaceiDSIIFPublicKeyFormat

One concrete on-disk encoding for an IF (RSA-family) public key -- no password, since public keys are not encrypted. Certificates and PKIX code (StreamSec.DSI.PkixCert / X509Comp) commonly go through the SPKI layer rather than this format list directly, but standalone public-key files (e.g. exported for a peer) go through tDSIIFPublicKeyFormatList as with the private-key formats above.

function LoadFromStream(aStrm: TStream; const aKey : iIFPublicKey) : iIFPublicKey;
Decodes this one on-disk encoding of the RSA-family public key from aStrm into aKey (public keys are stored unencrypted, so there is no password), returning nil when this format cannot decode the stream. Application code normally loads via the typed key or tDSIIFPublicKeyFormatList, not a raw format.
procedure SaveToStream(const aPubl: iIFPublicKey; aStrm: TStream);
Encodes aPubl to aStrm in this one format. Application code normally saves via tDSIIFPublicKeyFormatList rather than calling a raw format.

classtDSIIFPublicKeyFormatList

inherits from tCustomDSIKeyFormatList

implements iDSIIFPublicKeyFormat

IF (RSA-family) public-key format registry used by an application to load/save a standalone public-key file without hard-coding its encoding.

function LoadFromStream(aStrm: TStream; const aKey : iIFPublicKey) : iIFPublicKey;
Auto-detects the encoding by trying each enabled format in turn (rewinding aStrm between attempts); returns nil if none decode it.
procedure SaveToStream(const aPubl: iIFPublicKey; aStrm: TStream); overload;
Always writes with EnabledFormats[0] (raises if none enabled).
property EnabledFormats[aIndex: Integer]: iDSIIFPublicKeyFormat read GetEnabledFormats;
Indexed access to the enabled IF public-key formats, in the order LoadFromStream tries them / SaveToStream's index-0 pick.

classtDSIIFPublicKeyFormat

inherits from tCustomDSIKeyFormat

implements iDSIIFPublicKeyFormat

procedure SuggestRequiredUnits(aProc: tGetStringMethod); override;

interfaceiDSIDLPublicKeyFormat

One concrete on-disk encoding for a DL-family public key (DSA/DH/ECDSA/ ECDH/EdDSA, same broad family as iDSIDLPrivateKeyFormat, unencrypted). Application code normally goes through tDSIDLPublicKeyFormatList.

function LoadFromStream(aStrm: TStream; const aKey : iDLPublicKey) : iDLPublicKey;
Decodes this one on-disk encoding of the DL-family public key from aStrm into aKey (public keys are stored unencrypted, so there is no password), returning nil when this format cannot decode the stream. Application code normally loads via the typed key or tDSIDLPublicKeyFormatList, not a raw format.
procedure SaveToStream(const aPubl: iDLPublicKey; aStrm: TStream);
Encodes aPubl to aStrm in this one format. Application code normally saves via tDSIDLPublicKeyFormatList rather than calling a raw format.

classtDSIDLPublicKeyFormatList

inherits from tCustomDSIKeyFormatList

implements iDSIDLPublicKeyFormat

DL-family public-key format registry used by an application to load or save a standalone public key file without hard-coding its encoding.

function LoadFromStream(aStrm: TStream; const aKey : iDLPublicKey) : iDLPublicKey;
Auto-detects the encoding by trying each enabled format in turn (rewinding aStrm between attempts); returns nil if none decode it.
procedure SaveToStream(const aPubl: iDLPublicKey; aStrm: TStream); overload;
Always writes with EnabledFormats[0] (raises if none enabled).
property EnabledFormats[aIndex: Integer]: iDSIDLPublicKeyFormat read GetEnabledFormats;
Indexed access to the enabled DL public-key formats, in the order LoadFromStream tries them / SaveToStream's index-0 pick.

classtDSIDLPublicKeyFormat

inherits from tCustomDSIKeyFormat

implements iDSIDLPublicKeyFormat

procedure SuggestRequiredUnits(aProc: tGetStringMethod); override;

interfaceiDSISNTRUPPublicKeyFormat

Typed Streamlined NTRU Prime key-format extension points. Concrete encoders can implement a format using only the interfaces in PKTypes; this registry assigns no ASN.1 algorithm identifier or wire encoding.

function LoadFromStream(aStrm: TStream; const aKey : iSNTRUPPublicKey) : iSNTRUPPublicKey;
Decodes this one on-disk encoding of the sntrup761 public key from aStrm into aKey (public keys are stored unencrypted, so there is no password), returning nil when this format cannot decode the stream. Application code normally loads via tDSISNTRUPPublicKeyFormatList.
procedure SaveToStream(const aPubl: iSNTRUPPublicKey; aStrm: TStream);
Encodes aPubl to aStrm in this one format. Application code normally saves via tDSISNTRUPPublicKeyFormatList rather than calling a raw format.

classtDSISNTRUPPublicKeyFormatList

inherits from tCustomDSIKeyFormatList

implements iDSISNTRUPPublicKeyFormat

sntrup761 public-key format registry used by an application to load/save a standalone post-quantum KEM public key file without hard-coding its encoding.

function LoadFromStream(aStrm: TStream; const aKey : iSNTRUPPublicKey) : iSNTRUPPublicKey;
Auto-detects the encoding by trying each enabled format in turn (rewinding aStrm between attempts); returns nil if none decode it.
procedure SaveToStream(const aPubl: iSNTRUPPublicKey; aStrm: TStream); overload;
Always writes with EnabledFormats[0] (raises if none enabled).
property EnabledFormats[aIndex: Integer]: iDSISNTRUPPublicKeyFormat read GetEnabledFormats;
Indexed access to the enabled sntrup761 public-key formats, in the order LoadFromStream tries them / SaveToStream's index-0 pick.

classtDSISNTRUPPublicKeyFormat

inherits from tCustomDSIKeyFormat

implements iDSISNTRUPPublicKeyFormat

procedure SuggestRequiredUnits(aProc: tGetStringMethod); override;

interfaceiDSIMLKEMPublicKeyFormat

One concrete on-disk encoding for a post-quantum ML-KEM public key (unencrypted). Reached indirectly through tDSIMLKEMPublicKeyFormatList by application code, e.g. when exporting/importing a peer's KEM public key outside of a certificate.

function LoadFromStream(aStrm: TStream; const aKey : iMLKEMPublicKey) : iMLKEMPublicKey;
Decodes this one on-disk encoding of the ML-KEM public key from aStrm into aKey (public keys are stored unencrypted, so there is no password), returning nil when this format cannot decode the stream. Application code normally loads via the typed key or tDSIMLKEMPublicKeyFormatList, not a raw format.
procedure SaveToStream(const aPubl: iMLKEMPublicKey; aStrm: TStream);
Encodes aPubl to aStrm in this one format. Application code normally saves via tDSIMLKEMPublicKeyFormatList rather than calling a raw format.

classtDSIMLKEMPublicKeyFormatList

inherits from tCustomDSIKeyFormatList

implements iDSIMLKEMPublicKeyFormat

ML-KEM public-key format registry used by an application to load/save a standalone post-quantum KEM public key file without hard-coding its encoding.

function LoadFromStream(aStrm: TStream; const aKey : iMLKEMPublicKey) : iMLKEMPublicKey;
Auto-detects the encoding by trying each enabled format in turn (rewinding aStrm between attempts); returns nil if none decode it.
procedure SaveToStream(const aPubl: iMLKEMPublicKey; aStrm: TStream); overload;
Always writes with EnabledFormats[0] (raises if none enabled).
property EnabledFormats[aIndex: Integer]: iDSIMLKEMPublicKeyFormat read GetEnabledFormats;
Indexed access to the enabled ML-KEM public-key formats, in the order LoadFromStream tries them / SaveToStream's index-0 pick.

classtDSIMLKEMPublicKeyFormat

inherits from tCustomDSIKeyFormat

implements iDSIMLKEMPublicKeyFormat

procedure SuggestRequiredUnits(aProc: tGetStringMethod); override;

interfaceiDSIMLDSAPublicKeyFormat

One concrete on-disk encoding for a post-quantum ML-DSA public key (unencrypted). Reached indirectly through tDSIMLDSAPublicKeyFormatList by application code.

function LoadFromStream(aStrm: TStream; const aKey : iMLDSAPublicKey) : iMLDSAPublicKey;
Decodes this one on-disk encoding of the ML-DSA public key from aStrm into aKey (public keys are stored unencrypted, so there is no password), returning nil when this format cannot decode the stream. Application code normally loads via the typed key or tDSIMLDSAPublicKeyFormatList, not a raw format.
procedure SaveToStream(const aPubl: iMLDSAPublicKey; aStrm: TStream);
Encodes aPubl to aStrm in this one format. Application code normally saves via tDSIMLDSAPublicKeyFormatList rather than calling a raw format.

classtDSIMLDSAPublicKeyFormatList

inherits from tCustomDSIKeyFormatList

implements iDSIMLDSAPublicKeyFormat

ML-DSA public-key format registry used by an application to load/save a standalone post-quantum signature public key file without hard-coding its encoding.

function LoadFromStream(aStrm: TStream; const aKey : iMLDSAPublicKey) : iMLDSAPublicKey;
Auto-detects the encoding by trying each enabled format in turn (rewinding aStrm between attempts); returns nil if none decode it.
procedure SaveToStream(const aPubl: iMLDSAPublicKey; aStrm: TStream); overload;
Always writes with EnabledFormats[0] (raises if none enabled).
property EnabledFormats[aIndex: Integer]: iDSIMLDSAPublicKeyFormat read GetEnabledFormats;
Indexed access to the enabled ML-DSA public-key formats, in the order LoadFromStream tries them / SaveToStream's index-0 pick.

classtDSIMLDSAPublicKeyFormat

inherits from tCustomDSIKeyFormat

implements iDSIMLDSAPublicKeyFormat

procedure SuggestRequiredUnits(aProc: tGetStringMethod); override;

interfaceiDSISLHDSAPrivateKeyFormat

SLH-DSA (FIPS 205) key formats. One concrete on-disk encoding for an SLH-DSA private key. Application code normally reaches this through tDSISLHDSAPrivateKeyFormatList rather than a single format instance.

function LoadFromStream(const aPwd : iSecretKey; aStrm: TStream; const aKey : iSLHDSAPrivateKey) : iSLHDSAPrivateKey;
Decodes this one on-disk encoding of the SLH-DSA private key from aStrm into aKey, decrypting with aPwd when the format is password-protected, and returns nil when this format cannot decode the stream. Application code normally loads via the typed key or tDSISLHDSAPrivateKeyFormatList, not a raw format.
procedure SaveToStream(const aPriv: iSLHDSAPrivateKey; const aPwd : iSecretKey; aStrm: TStream);
Encodes aPriv to aStrm in this one format, encrypting under aPwd when the format is password-protected. Application code normally saves via tDSISLHDSAPrivateKeyFormatList rather than calling a raw format.

classtDSISLHDSAPrivateKeyFormatList

inherits from tCustomDSIKeyFormatList

implements iDSISLHDSAPrivateKeyFormat

SLH-DSA private-key format registry: how an application loads or saves an SLH-DSA (stateless hash-based signature) private key file without hard-coding its on-disk encoding.

function LoadFromStream(const aPwd : iSecretKey; aStrm: TStream; const aKey : iSLHDSAPrivateKey) : iSLHDSAPrivateKey;
Auto-detects the encoding by trying each enabled format in turn (rewinding aStrm between attempts); returns nil if none decode it.
procedure SaveToStream(const aPriv: iSLHDSAPrivateKey; const aPwd : iSecretKey; aStrm: TStream); overload;
Always writes with EnabledFormats[0] (raises if none enabled).
property EnabledFormats[aIndex: Integer]: iDSISLHDSAPrivateKeyFormat read GetEnabledFormats;
Indexed access to the enabled SLH-DSA private-key formats, in the order LoadFromStream tries them / SaveToStream's index-0 pick.

classtDSISLHDSAPrivateKeyFormat

inherits from tCustomDSIKeyFormat

implements iDSISLHDSAPrivateKeyFormat

procedure SuggestRequiredUnits(aProc: tGetStringMethod); override;

interfaceiDSISLHDSAPublicKeyFormat

One concrete on-disk encoding for an SLH-DSA public key (unencrypted). Reached indirectly through tDSISLHDSAPublicKeyFormatList by application code.

function LoadFromStream(aStrm: TStream; const aKey : iSLHDSAPublicKey) : iSLHDSAPublicKey;
Decodes this one on-disk encoding of the SLH-DSA public key from aStrm into aKey (public keys are stored unencrypted, so there is no password), returning nil when this format cannot decode the stream. Application code normally loads via the typed key or tDSISLHDSAPublicKeyFormatList, not a raw format.
procedure SaveToStream(const aPubl: iSLHDSAPublicKey; aStrm: TStream);
Encodes aPubl to aStrm in this one format. Application code normally saves via tDSISLHDSAPublicKeyFormatList rather than calling a raw format.

classtDSISLHDSAPublicKeyFormatList

inherits from tCustomDSIKeyFormatList

implements iDSISLHDSAPublicKeyFormat

SLH-DSA public-key format registry used by an application to load/save a standalone SLH-DSA public key file without hard-coding its encoding.

function LoadFromStream(aStrm: TStream; const aKey : iSLHDSAPublicKey) : iSLHDSAPublicKey;
Auto-detects the encoding by trying each enabled format in turn (rewinding aStrm between attempts); returns nil if none decode it.
procedure SaveToStream(const aPubl: iSLHDSAPublicKey; aStrm: TStream); overload;
Always writes with EnabledFormats[0] (raises if none enabled).
property EnabledFormats[aIndex: Integer]: iDSISLHDSAPublicKeyFormat read GetEnabledFormats;
Indexed access to the enabled SLH-DSA public-key formats, in the order LoadFromStream tries them / SaveToStream's index-0 pick.

classtDSISLHDSAPublicKeyFormat

inherits from tCustomDSIKeyFormat

implements iDSISLHDSAPublicKeyFormat

procedure SuggestRequiredUnits(aProc: tGetStringMethod); override;

interfaceiDSICompositeMLKEMPublicKeyFormat

One concrete on-disk encoding for a composite (hybrid classical + ML-KEM) public key, unencrypted. Reached indirectly through tDSICompositeMLKEMPublicKeyFormatList by application code.

function LoadFromStream(aStrm: TStream; const aKey : iCompositeMLKEMPublicKey) : iCompositeMLKEMPublicKey;
Decodes this one on-disk encoding of the composite (classical + ML-KEM) public key from aStrm into aKey (public keys are stored unencrypted, so there is no password), returning nil when this format cannot decode the stream. Application code normally loads via the typed key or tDSICompositeMLKEMPublicKeyFormatList, not a raw format.
procedure SaveToStream(const aPubl: iCompositeMLKEMPublicKey; aStrm: TStream);
Encodes aPubl to aStrm in this one format. Application code normally saves via tDSICompositeMLKEMPublicKeyFormatList rather than calling a raw format.

classtDSICompositeMLKEMPublicKeyFormatList

inherits from tCustomDSIKeyFormatList

implements iDSICompositeMLKEMPublicKeyFormat

Composite ML-KEM public-key format registry used by an application to load/save a standalone hybrid KEM public key file without hard-coding its encoding.

function LoadFromStream(aStrm: TStream; const aKey : iCompositeMLKEMPublicKey) : iCompositeMLKEMPublicKey;
Auto-detects the encoding by trying each enabled format in turn (rewinding aStrm between attempts); returns nil if none decode it.
procedure SaveToStream(const aPubl: iCompositeMLKEMPublicKey; aStrm: TStream); overload;
Always writes with EnabledFormats[0] (raises if none enabled).
property EnabledFormats[aIndex: Integer]: iDSICompositeMLKEMPublicKeyFormat read GetEnabledFormats;
Indexed access to the enabled composite ML-KEM public-key formats, in the order LoadFromStream tries them / SaveToStream's index-0 pick.

classtDSICompositeMLKEMPublicKeyFormat

inherits from tCustomDSIKeyFormat

implements iDSICompositeMLKEMPublicKeyFormat

procedure SuggestRequiredUnits(aProc: tGetStringMethod); override;

interfaceiDSICompositeMLDSAPublicKeyFormat

One concrete on-disk encoding for a composite (traditional + ML-DSA) public key, unencrypted. Reached indirectly through tDSICompositeMLDSAPublicKeyFormatList by application code.

function LoadFromStream(aStrm: TStream; const aKey : iCompositeMLDSAPublicKey) : iCompositeMLDSAPublicKey;
Decodes this one on-disk encoding of the composite (traditional + ML-DSA) public key from aStrm into aKey (public keys are stored unencrypted, so there is no password), returning nil when this format cannot decode the stream. Application code normally loads via the typed key or tDSICompositeMLDSAPublicKeyFormatList, not a raw format.
procedure SaveToStream(const aPubl: iCompositeMLDSAPublicKey; aStrm: TStream);
Encodes aPubl to aStrm in this one format. Application code normally saves via tDSICompositeMLDSAPublicKeyFormatList rather than calling a raw format.

classtDSICompositeMLDSAPublicKeyFormatList

inherits from tCustomDSIKeyFormatList

implements iDSICompositeMLDSAPublicKeyFormat

Composite ML-DSA public-key format registry used by an application to load/save a standalone composite signature public key file without hard-coding its encoding.

function LoadFromStream(aStrm: TStream; const aKey : iCompositeMLDSAPublicKey) : iCompositeMLDSAPublicKey;
Auto-detects the encoding by trying each enabled format in turn (rewinding aStrm between attempts); returns nil if none decode it.
procedure SaveToStream(const aPubl: iCompositeMLDSAPublicKey; aStrm: TStream); overload;
Always writes with EnabledFormats[0] (raises if none enabled).
property EnabledFormats[aIndex: Integer]: iDSICompositeMLDSAPublicKeyFormat read GetEnabledFormats;
Indexed access to the enabled composite ML-DSA public-key formats, in the order LoadFromStream tries them / SaveToStream's index-0 pick.

classtDSICompositeMLDSAPublicKeyFormat

inherits from tCustomDSIKeyFormat

implements iDSICompositeMLDSAPublicKeyFormat

procedure SuggestRequiredUnits(aProc: tGetStringMethod); override;

Types (enumerations, sets, aliases)

enumtKeyFormatSupport

  tKeyFormatSupport = (kfsKeyOnly,
                       kfsUsage,
                       kfsCertificate,
                       kfsMultipleKeys,
                       kfsDeterministic,
                       kfsPBEncryption
                       );

settKeyFormatSupports

  tKeyFormatSupports = set of tKeyFormatSupport;