SetSignProcessEd25519Identity

Security and signatures

Description

Sets an Ed25519 X.509 certificate and private key for a detached PDF signature

The certificate must be DER encoded and use the id-Ed25519 subject-public-key algorithm, while the private key can be a 32-byte seed or an unencrypted PKCS #8 DER value

Syntax

Delphi

Function TPDFlib.SetSignProcessEd25519Identity(SignProcessID: Integer; Const CertificateDER, PrivateKeyDER: AnsiString): Integer;

ActiveX

Function PDFlib::SetSignProcessEd25519Identity(SignProcessID As Long, CertificateDER As Variant, PrivateKeyDER As Variant) As Long

DLL

int DLSetSignProcessEd25519Identity(int InstanceID, int SignProcessID, const char* CertificateDER, int CertificateLength, const char* PrivateKeyDER, int PrivateKeyLength);

Parameters

SignProcessIDValue returned by a NewSignProcessFrom* function
CertificateDERComplete DER-encoded X.509 certificate containing the Ed25519 public key
PrivateKeyDERRaw 32-byte Ed25519 seed or unencrypted PKCS #8 DER private key

Return values

1The identity was attached to the process
0The process id or input was invalid

Remarks

Use adbe.pkcs7.detached or ETSI.CAdES.detached; Ed25519 uses the SHA-512 CMS digest identifier and signs the canonical signed-attributes value directly

The implementation derives the public key from the private seed and rejects an identity when it does not match the certificate

ActiveX accepts byte-array variants, and the DLL accepts explicit lengths so embedded zero bytes are retained

See also

SetSignProcessEd25519IdentityFromFile, SetSignProcessDigestAlgorithm, SetSignProcessSubFilter