Replies: 10 comments 1 reply
|
testing with openssl 3.5.7 thanks |
|
Hi @olszomal can u check this one out? i need openssl genpkey to work because it sets the CKA_ID of the key when it gens it. if CKA_ID is not set then the openssl asn.1 module wont let us use the key for cert stuff like CSR etc generation. i have SLHDSA in my hsm pkcs11 provider. need me to test? i can test with MLDSA, SLHDSA and MLKEM in my hsm pkcs11 provider. thanks |
|
oh forgot to say, i have Entrust (ncipher) rack mounted big man HSM :-) thanks |
|
Thanks for testing and for the report. The pkcs11 provider does not support For now, please use the |
|
thanks for the update and clarification! ok sounds good! i will test ou the SLHDSA sign and verify :-) and mldsa again thanks cheers! |
|
Hi chaps! Just an update doing testing with an hsm Entrust N5C hsm (ncipher) 13.9.5 all around versions and firmware. openssl 3.5.7 latchset git clone from master branch MLDSA sign and verify works good :-) MLDSA 87 scheme and mech [root@rhel98libp11sw1395 nfast]# openssl pkeyutl -sign -inkey "pkcs11:token=accelerator;pin-value=1234;object=mldsa33" -out workload.sig5 -in workload.txt
pkcs11 debug log looks clean and good :-) 2026-06-26 19:27:56 [29609] t406773f7107f0000: pkcs11: 000008CB >> C_SignInit 2026-06-26 19:27:56 [29609] t406773f7107f0000: pkcs11: 000008CB > pSignature 0x132fd60 looks good! Verify on MLDSA: [root@rhel98libp11sw1395 nfast]# openssl pkeyutl -verify -in workload.txt -sigfile workload.sig5 -inkey "pkcs11:token=accelerator;pin-value=1234;object=mldsa33;type=public" -pubin EXPORT PUB: [root@rhel98libp11sw1395 nfast]# openssl pkey -in pkcs11:object=mldsa33 -pubin -pubout -text ok lets do SLHDSA now :-) sign and verify SLHDSA256ShSHAKE is the mech / scheme export SLHDSA pub key [root@rhel98libp11sw1395 nfast]# openssl pkey -in pkcs11:object=slhdsa33 -pubin -pubout -text works good! look how small that pubkey is :-) |
|
Hi @olszomal ok did some testing on an SLHDSA key with the following schemes: SLHDSA128FhSHA2 [root@rhel98libp11sw1395 nfast]# openssl pkeyutl -sign -inkey "pkcs11:token=accelerator;pin-value=1234;object=slhdsaSLHDSA128FhSHA2" -out workload.sig5 -in workload.txt [root@rhel98libp11sw1395 nfast]# openssl pkeyutl -sign -inkey "pkcs11:token=accelerator;pin-value=1234;object=slhdsa33" -out workload.sig5 -in workload.txt hmmm both failed... I am attaching pkcs11 debug log here :-) any ideas? do you support those 2 schemes for SLHDSA keys? the Entrust (ncipher) hsm has the following SLHDSA schemes available in pkcs11: (SLHDSA128FhSHA2, SLHDSA128ShSHA2, SLHDSA128FhSHAKE, i havent looked in your header to see what schemes / parameter sets you support.... but i tried a lower one and a higher one :-) attaching pkcs11 debug log thanks!!! :-) shaping up good the MLDSA works GREAT on the Entrust (ncipher) N5c rack mount HSM :-) |
|
I can see in the pkcs11 log its doing a c findobjects for priv key with cka label set it finds it then it does get attrib on cka id and parameter and always auth and returns the values... then it does some more on public keys etc. thanks :-) |
|
Just an update I got the command line SLHDSA signer working :-) it requires the key CKA_ID set to something unique..... (but for MLDSA the signer didnt need that.....) (sign for SLHDSA using Entrust (ncipher) N5c rack mount hsm) openssl pkeyutl -sign -inkey "pkcs11:token=accelerator;pin-value=1234;object=slhdsa33" -out workload.sig5 -in workload.txt 0 14:53:13 [149993] t40474b01ee7f0000: pkcs11: 000008CB >> C_SignInit 2026-06-30 14:53:13 [149993] t40474b01ee7f0000: pkcs11: 000008CB > pSignature 0x20910e0 works good :-) pub key dumps ok now: [root@rhel98libp11sw1395 nfast]# openssl pkey -in pkcs11:object=slhdsa33 -pubin -pubout -text verify works :-) [root@rhel98libp11sw1395 nfast]# openssl pkeyutl -verify -in workload.txt -sigfile workload.sig5 -inkey "pkcs11:token=accelerator;pin-value=1234;object=slhdsa33;type=public" -pubin so im wondering why the MLDSA signer works without CKA ID and the SLHDSA needs a CKA_ID ??? maybe its extra thing in the template code...... have to check it out :-) |
|
gen a CSR on mldsa, SLHDSA not there yet ;-) [root@rhel98libp11sw1395 nfast]# openssl req -key "pkcs11:token=accelerator;pin-value=1234;object=slhdsa33" -new -out req.csr
|
Uh oh!
There was an error while loading. Please reload this page.
hi chaps!
I pulled master with a git clone.
built it good.
im using an hsm.
I am testing out the PQ things :-)
i can do an MLDSA sign (with my HSM MLDSA key) through pkcs11 no problems
that works, and debug log looks good.
openssl genpkey is NOT working
[root@rhel98libp11sw1395 nfast]# openssl genpkey -algorithm ML-DSA-87 -provider pkcs11prov -propquery "provider=pkcs11prov" -pkeyopt "pkcs11_uri:pkcs11:token=accelerator;object=mldsa_libp11;"
Error initializing ML-DSA-87 context
40D73B80BE7F0000:error:03000096:digital envelope routines:gen_init:operation not supported for this keytype:crypto/evp/pmeth_gn.c:87:
[root@rhel98libp11sw1395 nfast]#
Can anyone take a look at the master branch?
did you guys set it up so we can use genpkey to create MLDSA keys etc?
may be a bug in there
I can get latchset pkcs11 provider to genpkey and it works.... i think you guys are missing something in the code hmmm
thanks! :-)
All reactions