Category : asn.1

I tried to develop some ECC features with PKCS#11 library in C++. I generated some ECC key DER and PEM files by openssl. For example, below is one of the DER files after decoded by ASN.1 JavaScript decoder. EC_PRIVATEKEY ::= SEQUENCE { INTEGER 1 OCTET STRING 61300E611C121ECBE7C2D49DA8FCD99571DF00296F51C3A9EC02DFF3063DBD3E [0] OBJECT IDENTIFIER 1.2.840.10045.3.1.7 [1] BIT STRING 0004E924EC46F36A675528E2CA977A7D51C3E510993E092466F1A632419CC4A085F494F1B9D20E4B281484CB971B9AF99F088F11AB17A74928595075877D0047A4CC ..

Read more

I’m trying to encode and then decode CERT_AUTHORITY_KEY_ID_INFO structure. But I’m getting an error and I couldn’t find an example online. How to do the round trip properly? CERT_AUTHORITY_KEY_ID_INFO info; info.KeyId.cbData = 10; info.KeyId.pbData = new BYTE[10]{ 1,2,3,4,5,1,2,3,4,5 }; info.CertIssuer.cbData = 10; info.CertIssuer.pbData = new BYTE[10]{ 2,4,6,8,10,2,4,6,8,10 }; info.CertSerialNumber.cbData = 10; info.CertSerialNumber.pbData = new BYTE[10]{ ..

Read more