Feature notes: PKIX / CMS implementation notes
inherits from Exception
(no public members)
inherits from tExternalIFPrivateKey
constructor Create; override;
procedure Bind(aToken: tPkcs11Token; aKeyHandle: CK_OBJECT_HANDLE);
function ImportKey(const aPKIdentifier; aPKILen: Integer): Boolean; override;
function GetIdentifier: string; override;
function GetKeySize: Integer; override;
function IFPrivateKeyOperation(aI: iDSInteger; var aJ: iDSInteger): Boolean; override;
function SignMsg(const aMsg : tBytes; aOffset, aCount : Integer; aHashAlgorithm : tHashAlgorithm; aMGFHashAlgorithm: tHashAlgorithm; aSaltLen : Cardinal; aEncoding : tSignEncoding; var aSign : tBytes; var aSignCount : Integer): Boolean; override;
function SignDigest(const aDigest : tBytes; aOffset, aCount : Integer; aHashAlgorithm : tHashAlgorithm; aMGFHashAlgorithm: tHashAlgorithm; aSaltLen : Cardinal; aEncoding : tSignEncoding; aNullMsg : Boolean; var aSign : tBytes; var aSignCount : Integer): Boolean; override;
function IFESDecryption(const aEMsg : tBytes; aEOffset, aECount : Integer; const aP : tBytes; aPOffset, aPCount : Integer; aHashAlgorithm : tHashAlgorithm; aMGFHashAlgorithm: tHashAlgorithm; aEncryptEncoding : tEncryptEncoding; var aMsg : tBytes; var aSuccess : Boolean): Boolean; override;
function Validate(aPubl: iIFPublicKey): Boolean; override;
property Token: tPkcs11Token read fToken;
property KeyHandle: CK_OBJECT_HANDLE read fKeyHandle;
property KeyLabel: string read fKeyLabel;
property KeyID: tBytes read fKeyID;
inherits from tExternalDLPrivateKey
The EC counterpart. Only the signature primitive is delegated: the token is handed the raw digest and returns r||s, and the library encodes that pair as DER or P1363 exactly as it does for a software key.
ECDSA needs no equivalent of the RSA padding negotiation -- CKM_ECDSA is the one mechanism, it takes a bare digest, and the device truncates to the group order itself. That is why this class is so much smaller than the RSA one.
constructor Create; override;
procedure Bind(aToken: tPkcs11Token; aKeyHandle: CK_OBJECT_HANDLE);
function ImportKey(const aPKIdentifier; aPKILen: Integer): Boolean; override;
function GetIdentifier: string; override;
function GetOrderSize: Integer; override;
function SignDigest(const aDigest : tBytes; aOffset, aCount : Integer; aHashAlgorithm: tHashAlgorithm; out aSigR : iDSInteger; out aSigS : iDSInteger): Boolean; override;
function Validate(const aPubl: iDLPublicKey): Boolean; override;
function GetPublicKey: iGroupElement; override;
property Token: tPkcs11Token read fToken;
property KeyHandle: CK_OBJECT_HANDLE read fKeyHandle;
property KeyLabel: string read fKeyLabel;
property KeyID: tBytes read fKeyID;