SetSignProcessBrainpoolIdentity
Security and signatures
Description
Attaches a Brainpool P256r1, P384r1 or P512r1 certificate and private scalar to a signature process so it signs with RFC 5639 ECDSA
Syntax
Delphi
Function SetSignProcessBrainpoolIdentity(SignProcessID: Integer; Const CertificateDER, PrivateKeyDER: AnsiString): Integer;ActiveX
Function PDFlib::SetSignProcessBrainpoolIdentity(SignProcessID As Long, CertificateDER As Variant, PrivateKeyDER As Variant) As LongDLL
int DLSetSignProcessBrainpoolIdentity(int InstanceID, int SignProcessID, const char* CertificateDER, int CertificateLength, const char* PrivateKeyDER, int PrivateKeyLength);Parameters
| SignProcessID | Signature process handle returned by NewSignProcessFrom* |
|---|---|
| CertificateDER | DER certificate whose SubjectPublicKeyInfo carries ecPublicKey paired with brainpoolP256r1 (1.3.36.3.3.2.8.1.1.7), brainpoolP384r1 (1.3.36.3.3.2.8.1.1.11) or brainpoolP512r1 (1.3.36.3.3.2.8.1.1.13) |
| PrivateKeyDER | Raw private scalar (32, 48 or 64 bytes), or an unencrypted PKCS #8 / SEC1 DER structure wrapping one |
Return values
1 when the identity was accepted, or 0 for an unknown process or an identity whose derived public point does not match the certificate
Remarks
The identity replaces every other attached identity on the signature process
By default brainpoolP256r1 pairs with SHA-256, brainpoolP384r1 pairs with SHA-384 and brainpoolP512r1 pairs with SHA-512; explicit SHA-2 or SHA-3 selections via SetSignProcessDigestAlgorithm are also honoured
The detached CMS SignerInfo carries the matching ECDSA signature algorithm identifier (ecdsa-with-SHA256, ecdsa-with-SHA384, ecdsa-with-SHA512 or id-ecdsa-with-sha3-*) and encodes (r, s) as a DER SEQUENCE of two INTEGERs
See also
SetSignProcessBrainpoolIdentityFromFile, SetSignProcessDigestAlgorithm, SetSignProcessSM2Identity, SetSignProcessEd448Identity