Closed probablynachi closed 1 year ago
:thinking: It seems it should be supported in SoftHSM:
$ pkcs11-tool --modul /usr/lib64/pkcs11/libsofthsm2.so -M
Using slot 0 with a present token (0x63baf6de)
Supported mechanisms:
AES-CBC, keySize={16,32}, encrypt, decrypt, wrap
...
RSA-PKCS-KEY-PAIR-GEN, keySize={512,16384}, generate_key_pair
RSA-PKCS-OAEP, keySize={512,16384}, encrypt, decrypt, wrap, unwrap // <-- here
RSA-PKCS-PSS, keySize={512,16384}, sign, verify
...
If it's not a big problem could you file a PR with a test case showing the failure? Maybe then it'd be easier to spot the error/issue.
Yes i did recreate the same using python's pkcs11 library to see if it was a softhsm issue but I didn't face the error there, I will go ahead and try to create a test case showing the failure and file a PR as soon as i can. Thank you
I have created the PR and even added the softhsm file if needed along with it. Please get back if you need any information.
This OAEP code complies but then throws the Pkcs11(ArgumentsBad) error for any parameters set. I am using softhsm2. Here is the code
Which results in the error: Error: Pkcs11(ArgumentsBad). I tried the same code without using OAEP and it works as well, So i presume it is an issue with OAEP Padding. Thank you