You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
we are using a IAIK java library to create mldsa44 key and certificate and store into a PKCS#12 in java.
Trying to open the pkcs12 in openssl oqs failed.
Recompiled the oqs provider with -DNOPUBKEY_IN_PRIVKEY=ON and it didn't work aswell.
That's not surprising as ML-DSA44 (final) is not yet integrated into OQS: If you want to check quickly, you may want to try with the corresponding "feature" branches bhe-fips204-final (liboqs) and bhe-fips204-final-tracker (oqsprovider). Otherwise, please wait for the next releases.
The failure happens in oqsprov/oqsprov_keys.c, while calling d2i_ASN1_OCTET_STRING() function which return NULL.
The privatekey that came from the PKCS#12 has size 2560, which is passed to d2i_ASN1_OCTET_STRING(). d2i_ASN1_OCTET_STRING expects ASN.1 octet encoded string and fails because input is not a ASN.1 octet string but a raw private key bytes.
Describe the bug
we are using a IAIK java library to create mldsa44 key and certificate and store into a PKCS#12 in java.
Trying to open the pkcs12 in openssl oqs failed.
Recompiled the oqs provider with -DNOPUBKEY_IN_PRIVKEY=ON and it didn't work aswell.
Attached is pkcs#12 created in java code.
pqckeycert2.zip
To Reproduce
Steps to reproduce the behavior:
Opening the pkcs12 with oqs provider fails with below error.
`$openssl pkcs12 -in ./pqckeycert2.p12 -passin pass:123456
Bag Attributes
friendlyName: acme.com
localKeyID: 2D 32 35 39 32 32 34 35 35 37
Error outputting keys and certificates
00A4EEA3CA7F0000:error:1E08010C:DECODER routines:OSSL_DECODER_from_bio:unsupported:crypto/encode_decode/decoder_lib.c:102:No supported data to decode. Input type: DER, Input structure: PrivateKeyInfo
00A4EEA3CA7F0000:error:0300009C:digital envelope routines:pkey_set_type:unsupported algorithm:crypto/evp/p_lib.c:1566:
00A4EEA3CA7F0000:error:03000076:digital envelope routines:evp_pkcs82pkey_legacy:unsupported private key algorithm:crypto/evp/evp_pkey.c:42:TYPE=mldsa44
Recompiled OQS Provider with -DNOPUBKEY_IN_PRIVKEY=ON, fails with the same error.
$openssl pkcs12 -in ~/pqckeycert2.p12 -passin pass:123456Bag Attributes
friendlyName: acme.com
localKeyID: 2D 32 35 39 32 32 34 35 35 37
Error outputting keys and certificates
00D41F85407F0000:error:1E08010C:DECODER routines:OSSL_DECODER_from_bio:unsupported:crypto/encode_decode/decoder_lib.c:102:No supported data to decode. Input type: DER, Input structure: PrivateKeyInfo
00D41F85407F0000:error:0300009C:digital envelope routines:pkey_set_type:unsupported algorithm:crypto/evp/p_lib.c:1565:
00D41F85407F0000:error:03000076:digital envelope routines:evp_pkcs82pkey_legacy:unsupported private key algorithm:crypto/evp/evp_pkey.c:42:TYPE=mldsa44
`
Expected behavior
openssl oqs should open p12 created in third-party IAIK library.
Environment (please complete the following information):
Redhat 8
Please run the following commands to obtain the version information:
master branch of openssel and oqsprovider
The text was updated successfully, but these errors were encountered: