-
Notifications
You must be signed in to change notification settings - Fork 48
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
Key import fail with "Invalid value" error #15
Comments
|
Could you test if NIST P-256 is working ? |
It doesn't work either. I also tested brainpoolP256r1, same thing. Here is the output of Fun fact: after failing (for every ECC), I see it generated keys for signature and authentication but not for encryption. The signature counter is also incremented by 2. Here is what I got after the above session: |
|
From what I see in the APDU exchanges, the problem arrises during key import Indeed, when the user says Yes to the question "Make off-card backup of encryption key? (Y/n)", the encryption key is generated outside the card, and then imported, which actually fails for an unknown reason yet. Could you please retry without answering Yes to this question to be sure the problem is really the key import process ? |
|
You are right, the problem isn't with ECC but with the key import. Generating keys on the card without the backup does works. |
|
Ok thank you. |
|
Sure, here is the versions: Thank you very much for your time! |
|
In the key import command, only the private part (tag 92 in the APDU command) is provided by gnupg, not the public part (tag 99 in the APDU command). The public part is actually optional in the OpenPGP card specification (page 34), and gnupg seems not to provide it and it seems this card does not support this. |
|
Sorry, I forgot that there is a solution. Which tool did you use to switch your card to NIST-P384 ? Is the last byte of the key attributes set to |
|
From what I see in the response to the command get APPLICATION_RELATED_DATA the key attributes are set to the OID of ansix9p384r1 but without the additional
Without the additional |
It makes a lot of things this card doen't support, too bad it is the only JavaCard 3.0.4 card I found :/
GnuPG, with
I just tested and it works! Thank you a lot! :) |
Hello,
After a few tests with SmartPGP, I found out that RSA 2048 key works well, but not NIST P-384. This problem affects both on-card key generation and the upload of computer-generated ones. My card is an ACOS-J, which does support ECC up to 384 bits. I do not have any other card to test against.
Edit: As stated below the problem is with key import, not ECC.
The text was updated successfully, but these errors were encountered: