function GetAlgorithmID: ObjectIdentifier;
function GetPartyAInfo: OctetString;
function GetPartyBInfo: OctetString;
function GetSuppPrivInfo: OctetString;
function GetSuppPubInfo: OctetString;
procedure SetAlgorithmID(const Value: ObjectIdentifier);
procedure SetPartyAInfo(const Value: OctetString);
procedure SetPartyBInfo(const Value: OctetString);
procedure SetSuppPrivInfo(const Value: OctetString);
procedure SetSuppPubInfo(const Value: OctetString);
function Encode(aASN1DER: Boolean = True): tBytes;
property AlgorithmID: ObjectIdentifier read GetAlgorithmID write SetAlgorithmID;
property PartyAInfo: OctetString read GetPartyAInfo write SetPartyAInfo;
property PartyBInfo: OctetString read GetPartyBInfo write SetPartyBInfo;
property SuppPrivInfo: OctetString read GetSuppPrivInfo write SetSuppPrivInfo;
property SuppPubInfo: OctetString read GetSuppPubInfo write SetSuppPubInfo;
inherits from Exception
(no public members)
inherits from eDSIException
Discrete-log branch of the DSI exception hierarchy (see eDSIError in StreamSec.DSI.ArithTypes). The descendants separate the four ways a DSA/NR/DLIES/EdDSA operation is refused, so a caller can tell a missing hash unit from a mis-configured key without parsing the message.
(no public members)
inherits from eDSIDiscreteLog
The requested tHashAlgorithm has no implementation linked into the application (FindHashClass returned nil), or the primitive supports only a fixed set of hashes.
(no public members)
inherits from eDSIDiscreteLog
The key's SignScheme cannot be served here - either the scheme is unknown, or it is EdDSA, which signs the message rather than a digest.
(no public members)
inherits from eDSIDiscreteLog
An external (HSM / PKCS#11 / CryptoAPI) key refused to sign, or returned an incomplete signature. There is no software fallback: the private scalar is not in this process.
(no public members)
inherits from eDSIDiscreteLog
The caller's output buffer is too small for the signature.
(no public members)
inherits from TInterfacedObject
implements iX9_42KDFParameterEncoder
function Encode(aASN1BER: Boolean = True): tBytes;
property AlgorithmID: ObjectIdentifier read GetAlgorithmID write SetAlgorithmID;
property PartyAInfo: OctetString read GetPartyAInfo write SetPartyAInfo;
property PartyBInfo: OctetString read GetPartyBInfo write SetPartyBInfo;
property SuppPrivInfo: OctetString read GetSuppPrivInfo write SetSuppPrivInfo;
property SuppPubInfo: OctetString read GetSuppPubInfo write SetSuppPubInfo;
inherits from tInterfacedObject
implements iX9_42MacTagParams
property AlgorithmID: iSecretKey read GetAlgorithmID write SetAlgorithmID;
property Counter: UInt32 read GetCounter write SetCounter;
property IdA: iSecretKey read GetIdA write SetIdA;
property IdB: iSecretKey read GetIdB write SetIdB;
property YA: iGroupElement read GetYA write SetYA;
property YB: iGroupElement read GetYB write SetYB;
property TA: iGroupElement read GetTA write SetTA;
property TB: iGroupElement read GetTB write SetTB;
property MacTag: iSecretKey read GetMacTag write SetMacTag;
property MacTagLen: Integer read GetMacTagLen write SetMacTagLen;
inherits from iDSIDLArith
function FieldElementToInteger(const aElement: iGroupElement; const aGroup : iDiscreteLogField) : iDSInteger;
function SecretValueDerivationPrimitive_DH(const aPriv: iDLPrivateKey; const aPubl: iGroupElement) : iDSInteger;
function SecretValueDerivationPrimitive_DHC(const aPriv: iDLPrivateKey; const aPubl: iGroupElement) : iDSInteger;
function SecretValueDerivationPrimitive_MQV(const aParams: iDiscreteLogField; const S : iDSInteger; const U : iDSInteger; const V : iGroupElement; const WPr : iGroupElement; const VPr : iGroupElement) : iDSInteger;
function SecretValueDerivationPrimitive_MQVC(const aParams: iDiscreteLogField; const S : iDSInteger; const U : iDSInteger; const V : iGroupElement; const WPr : iGroupElement; const VPr : iGroupElement) : iDSInteger;
procedure SignaturePrimitive_NR(const aPriv: iDLPrivateKey; const F : iDSInteger; var R, S : iDSInteger);
procedure SignaturePrimitive_DSA(const aPriv: iDLPrivateKey; const F : iDSInteger; var R, S : iDSInteger);
function VerificationPrimitive_NR(const aPubl: iDLPublicKey; const R, S : iDSInteger; var F : iDSInteger) : Boolean;
function VerificationPrimitive_DSA(const aPubl: iDLPublicKey; const R, S : iDSInteger; const F : iDSInteger) : Boolean;
function IsNonTrivialFieldElement(const aElement: iGroupElement; const aParams : iDiscreteLogField) : Boolean;
function IsGroupElement(const aElement: iGroupElement; const aParams : iDiscreteLogField) : Boolean;
inherits from TInterfacedObject
implements iDSIDLArith, iDSIDLArithInternal
class function SubGroupValidation: Boolean; virtual;
class procedure EnableSubGroupValidation;
class procedure DisableSubGroupValidation;
class function AllowedDigestAlgorithmsGenerate: tHashAlgorithms;
class procedure SetAllowedDigestAlgorithmsGenerate(const aValue: tHashAlgorithms);
class function AllowedDigestAlgorithmsVerify: tHashAlgorithms;
class procedure SetAllowedDigestAlgorithmsVerify(const aValue: tHashAlgorithms);
class function CreatePrivateKey(const aPool: iDSIDLArith; const aParams : iDiscreteLogField): iDLPrivateKey; virtual;
class function CreatePublicKey(const aPool: iDSIDLArith; const aParams : iDiscreteLogField): iDLPublicKey; virtual;
function NewPrivateKey(const aParams : iDiscreteLogField): iDLPrivateKey;
function NewPublicKey(const aParams : iDiscreteLogField): iDLPublicKey;
function IsNonTrivialFieldElement(const aElement: iGroupElement; const aParams : iDiscreteLogField) : Boolean; virtual; abstract;
function IsGroupElement(const aElement: iGroupElement; const aParams : iDiscreteLogField) : Boolean; virtual; abstract;
function FieldElementToBytes(const aElement: iGroupElement; const aParams : iDiscreteLogField) : tBytes; overload; virtual;
function FieldElementToBytes(const aElement : iGroupElement; const aParams : iDiscreteLogField; const aDst : tBytes; aDstOffset: Integer; var aDstCount : Integer) : Boolean; overload; virtual; abstract;
function BytesToFieldElement(const aSrc : tBytes; const aParams: iDiscreteLogField) : iGroupElement; overload; virtual;
function BytesToFieldElement(const aSrc : tBytes; aSrcOffset, aSrcCount : Integer; const aParams : iDiscreteLogField) : iGroupElement; overload; virtual; abstract;
function KeyAgreementScheme_DH1(const aPriv : iDLPrivateKey; const aWPr : iGroupElement; const aP : iSecretKey; aCoFactor : Boolean; aHashAlgorithm: tHashAlgorithm; aKeyDerivation: tKeyDerivation; akLen : Integer; var aK : iSecretKey; const aMacTag1 : iX9_42MacTagParams = nil; const aMacTag2 : iX9_42MacTagParams = nil) : Boolean;
function KeyAgreementScheme_DH2(const aPriv0 : iDLPrivateKey; const aPriv1 : iDLPrivateKey; const aWPr : iGroupElement; const aVPr : iGroupElement; const aP : iSecretKey; aCoFactor0, aCoFactor1 : Boolean; aHashAlgorithm: tHashAlgorithm; aKeyDerivation: tKeyDerivation; akLen : Integer; var aK : iSecretKey;
function KeyAgreementScheme_MQV(const aPriv0 : iDLPrivateKey; const aPriv1 : iDSInteger; const aPubl1 : iGroupElement; const aWPr : iGroupElement; const aVPr : iGroupElement; const aP : iSecretKey; aCoFactor : Boolean; aHashAlgorithm: tHashAlgorithm; aKeyDerivation: TKeyDerivation; akLen : Integer; var aK : iSecretKey;
function EncodingMethodForSignatureWithAppendix1(const aDigest : tBytes; aOffset, aCount : Integer; aHashAlgorithm: tHashAlgorithm; aFBitSize : Cardinal) : iDSInteger; overload;
function EncodingMethodForSignatureWithAppendix1(aDigest : pByteArray; aCount : Integer; aHashAlgorithm: tHashAlgorithm; aFBitSize : Cardinal) : iDSInteger; overload;
function DecodingMethodForSignatureWithAppendix1(const aF : iDSInteger; const aDigest : tBytes; aOffset, aCount : Integer; aHashAlgorithm: tHashAlgorithm; aFBitSize : Cardinal) : Boolean;
function SignatureLength(aKey: iDLKey): Integer;
function SSASignatureGeneration(aKey : iDLPrivateKey; const Digest : tBytes; Offset, Count: Integer; HashAlgorithm: tHashAlgorithm; NullMsg : Boolean; DEREncode : Boolean; const Sign : tBytes; SignOffset, SignCount : Integer) : Integer; overload;
function SSASignatureGeneration(aKey : iDLPrivateKey; aDigest : pByteArray; aCount : Integer; aHashAlgorithm: tHashAlgorithm; aNullMsg : Boolean; aDEREncode : Boolean; aSign : pByteArray; aSignCount : Integer) : Integer; overload;
function SSASignatureGeneration(aKey : iDLPrivateKey; const Digest : tBytes; HashAlgorithm: tHashAlgorithm; NullMsg : Boolean; DEREncode : Boolean; var Sign : tBytes) : Integer; overload;
function SSASignatureGeneration(aKey : iDLPrivateKey; Digest : iSecretKey; HashAlgorithm: tHashAlgorithm; NullMsg : Boolean; DEREncode : Boolean; var Sign : iSecretKey) : Integer; overload;
function SSASignatureGeneration(aKey : iDLPrivateKey; const Msg : tBytes; Offset, Count: Integer; HashAlgorithm: tHashAlgorithm; DEREncode : Boolean; const Sign : tBytes; SignOffset, SignCount : Integer) : Integer; overload;
function SSASignatureGeneration(aKey : iDLPrivateKey; aMsg : pByteArray; aCount : Integer; aHashAlgorithm: tHashAlgorithm; aDEREncode : Boolean; aSign : pByteArray; aSignCount : Integer) : Integer; overload;
function SSASignatureGeneration(aKey : iDLPrivateKey; const Msg : tBytes; HashAlgorithm: tHashAlgorithm; DEREncode : Boolean; var Sign : tBytes) : Integer; overload;
function SSASignatureVerification(aKey : iDLPublicKey; const Digest : tBytes; DOffset, DCount : Integer; const Sign : tBytes; SOffset, SCount : Integer; DEREncode : Boolean; HashAlgorithm: tHashAlgorithm; NullMsg : Boolean) : Boolean; overload;
function SSASignatureVerification(aKey : iDLPublicKey; const Digest : tBytes; const Sign : tBytes; DEREncode : Boolean; HashAlgorithm: tHashAlgorithm; NullMsg : Boolean) : Boolean; overload;
function SSASignatureVerification(aKey : iDLPublicKey; Digest : iSecretKey; Sign : iSecretKey; DEREncode : Boolean; HashAlgorithm: tHashAlgorithm; NullMsg : Boolean) : Boolean; overload;
function SSASignatureVerification(aKey : iDLPublicKey; const Msg : tBytes; MOffset, MCount : Integer; const Sign: tBytes; SOffset, SCount : Integer; DEREncode : Boolean; HashAlgorithm: tHashAlgorithm) : Boolean; overload;
function SSASignatureVerification(aKey : iDLPublicKey; const Msg : tBytes; const Sign : tBytes; DEREncode : Boolean; HashAlgorithm: tHashAlgorithm) : Boolean; overload;
procedure IntegratedEncryption(aKey : iDLPublicKey; const Msg : tBytes; MsgOffset, MsgCount : Integer; const P1 : tBytes; P1Offset, P1Len : Integer; const P2 : tBytes; P2Offset, P2Len : Integer; HashAlgorithm: tHashAlgorithm;
procedure IntegratedEncryption(aKey: iDLPublicKey; const Msg: tBytes; MsgOffset, MsgCount: Integer; const P1: tBytes; P1Offset, P1Len: Integer; const P2: tBytes; P2Offset, P2Len: Integer; HashAlgorithm: tHashAlgorithm; CipherClass: TCipherClass; KeyLen: Integer; var EphemeralKey: iGroupElement; var CipherText: tBytes; var MAC: tBytes); overload;
function IntegratedDecryption(aKey: iDLPrivateKey; EphemeralKey: iGroupElement; const CipherText: tBytes; CTOffset, CTCount: Integer; const MAC: tBytes; MACOffset, MACCount: Integer; const P1: tBytes; P1Offset, P1Len: Integer; const P2: tBytes; P2Offset, P2Len: Integer; HashAlgorithm: tHashAlgorithm; const Msg: tBytes; MsgOffset: Integer; var MsgCount: Integer): Boolean; overload;
function IntegratedDecryption(aKey: iDLPrivateKey; EphemeralKey: iGroupElement; const CipherText: tBytes; CTOffset, CTCount: Integer; const MAC: tBytes; MACOffset, MACCount: Integer; const P1: tBytes; P1Offset, P1Len: Integer; const P2: tBytes; P2Offset, P2Len: Integer; HashAlgorithm: tHashAlgorithm; CipherClass: TCipherClass; KeyLen: Integer; const Msg: tBytes; MsgOffset: Integer; var MsgCount: Integer): Boolean; overload;
procedure NewKeys(const aParams: iDiscreteLogField; var aPriv : iDSInteger; var aPubl : iGroupElement); overload;
procedure NewKeys(const aParams: iDiscreteLogField; var aPriv : iDLPrivateKey; var aPubl : iGroupElement); overload;
procedure KDF1(const Z : tBytes; zOffset, zLen: Integer; const P : tBytes; pOffset, pLen: Integer; HashAlgorithm: tHashAlgorithm; const K: tBytes; kOffset, kLen: Integer); overload;
function KDF1(Z : iSecretKey; P : iSecretKey; HashAlgorithm: tHashAlgorithm; kLen : Integer) : iSecretKey; overload;
procedure KDF2(const Z : tBytes; zOffset, zLen: Integer; const P : tBytes; pOffset, pLen: Integer; HashAlgorithm: tHashAlgorithm; const K : tBytes; kOffset, kLen: Integer); overload;
function KDF2(const Z : tBytes; zOffset, zLen: Integer; const P : tBytes; pOffset, pLen: Integer; HashAlgorithm: tHashAlgorithm; kLen : Integer) : iSecretKey; overload;
function KDF2(Z : iSecretKey; P : iSecretKey; HashAlgorithm: tHashAlgorithm; kLen : Integer) : iSecretKey; overload;
procedure KDFX9_42ASN1BER(const Z : tBytes; zOffset, zLen: Integer; const P : tBytes; pOffset, pLen: Integer; HashAlgorithm: tHashAlgorithm; const K : tBytes; kOffset, kLen: Integer); overload;
function KDFX9_42ASN1BER(Z : iSecretKey; P : iSecretKey; HashAlgorithm: tHashAlgorithm; kLen : Integer) : iSecretKey; overload;
procedure KDFX9_42Concatenation(const Z : tBytes; zOffset, zLen: Integer; const P : tBytes; pOffset, pLen: Integer; HashAlgorithm: tHashAlgorithm; const K : tBytes; kOffset, kLen: Integer); overload;
function KDFX9_42Concatenation(Z : iSecretKey; P : iSecretKey; HashAlgorithm: tHashAlgorithm; kLen : Integer) : iSecretKey; overload;
procedure X9_42MacTag(const Z : tBytes; zOffset, zLen: Integer; const MacTag : iX9_42MacTagParams);
inherits from tInterfacedObject
implements iDLKey, iSignKeyDL
constructor Create(const aPool: iDSIDLArith; const aParams : iDiscreteLogField);
property Pool: iDSIDLArith read GetPool;
property SignScheme: tDLSignatureScheme read GetSignScheme write SetSignScheme;
property Params: iDiscreteLogField read GetParams;
inherits from tDLKey
implements iDLPrivateKey, iSignPrivateKey, iSignPrivateKeyDL
function NewKeys(const aParams: iDiscreteLogField): iGroupElement; overload; virtual;
function PublicKey: iGroupElement; overload; virtual;
procedure PublicKey(var aPubl: iDLPublicKey); overload;
function Validate(const aPubl: iDLPublicKey): Boolean; overload; virtual;
procedure SetAttributes(const aPublicKey: iUnknown);
property S: iDSInteger read GetS write SetS;
inherits from tDLKey
implements iDLPublicKey, iSignPublicKey, iSignPublicKeyDL
function Validate: Boolean;
property W: iGroupElement read GetW write SetW;