New answers tagged

0

The signature format was not correct, I've added the following: from asn1crypto.algos import DSASignature signature = priv.sign(info.dump(), mechanism=Mechanism.ECDSA_SHA1) value = DSASignature.from_p1363(signature).dump() csr = CertificationRequest({ 'certification_request_info': info, '...


1

PKCS11 (and also P1363) formats ECDSA signature by concatenating the two numbers r,s encoded as fixed-size unsigned; for P-256 that size is 32 octets giving signature of 64 octets. PKCS10, like X.509/PKIX, formats ECDSA signature as an ASN.1 SEQUENCE of two INTEGERs; each INTEGER in ASN.1 DER is variable-size signed (technically two's complement, but since ...


Top 50 recent answers are included