PLValidateBrainpoolIdentity

Cryptography, digital signatures

Description

Checks that a Brainpool EC private key belongs to a certificate and extracts the curve id and private scalar

Syntax

Delphi

Function PLValidateBrainpoolIdentity(Const CertificateDER, PrivateKeyDER: AnsiString;
  Out CurveId: Integer; Out PrivateKeyScalar: AnsiString): Boolean;

Parameters

CertificateDERDER-encoded certificate carrying a Brainpool public key
PrivateKeyDERDER-encoded PKCS#8 private key, encrypted or plain
CurveIdReceives 0 for P-256r1, 1 for P-384r1, 2 for P-512r1; stays 0 on failure
PrivateKeyScalarReceives the fixed-length big-endian private scalar; empty on failure

Return values

TrueThe pair matches and the scalar was extracted
FalseThe certificate does not carry a Brainpool key, the private key does not derive the public point, or the encodings are malformed

Remarks

Counterpart of PLValidateEd25519Identity for Brainpool curves (RFC 5639); encrypted PKCS#8 input is unwrapped through PLDecryptPKCS8PrivateKey

Passing validation means a pure-Pascal signing path can reproduce the key owner signature without CNG

See also

PLValidateEd25519Identity, PLValidateSM2Identity, BPSignFixedK, PLDecryptPKCS8PrivateKey