-
-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fails to sign with 4096 bit RSA #80
Comments
Can you try with a shorter key like 1024? |
1024: OK |
Is there anything else I can do to assist you with the bug fix? |
I’ll debug myself. For curiosity, are you generating the 4k key in the device or it’s imported? How nuch time does it take? |
I got the 4096 bit key generated from within the device. I am not sure how long that takes. It starts and fails similar to the signing process. However, the result is not important at the USB interface so I can check after a while for the correctly generated key. I suspect that the keep-alive USB function has some issue. I.e. any USB operation taking longer than 1.5s? fails. Fortunately, the key generation does continue in the background :) |
Try this snippet and report the result:
|
|
Is the key 33 a rsa 4096? |
No, 1024 because 4096 fails. |
So you tried the snippet with a rsa 4096 and failed, right? In which step? Which error? |
If you ask me that way... key generation fails for every RSA key size:
Same each (example above for 1024 bit):
However, it completes in the background after a while. But usually, the device needs to be plugged again after that to work correctly. |
Just for reference:
|
I am using a Xiao RP2350 with PicoHSM FW 5.4 as provided in the release notes here.
I am executing the following commands on Windows using OpenSC 0.26.1:
pkcs11-tool -l --pin <mypin> --keypairgen --key-type rsa:4096 --id 1 --label 001
openssl req -x509 -new -nodes -engine pkcs11 -key 31 -keyform engine -out 001.crt -days 9125 -config openssl.cnf -subj "%SUBJ%" -reqexts ca_ext
This, however, fails after sending the APDU for signing:
In Wireshark I can see two things I would expect different (without checking the actual specification):
First: The sequence number stays the same. Is that correct?
Second: There is some unknown message type from Pico HSM to PC. What means 0xBD? I can see a lot of 0x55 in other parts, but that does not seems to be an issue.
The text was updated successfully, but these errors were encountered: