-
Notifications
You must be signed in to change notification settings - Fork 742
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
OpenPGP Card 3.3: pkcs11-tool does not work with ECC keys #1351
Comments
We don't currently have ECC support for any OpenPGP card, so the fix would be to implement it 😉 |
Well, that explains a lot 😄 The older Cards do not support ECC anyway. The following OpenPGP based Cards support ECC: Gnuk from firmware 1.2 on |
ECC is supported for some cards |
Grep for brainpool. Looks like there is some support. PKCS#11 v2.40 2.3.3 ECDSA public key objects and 2.3.4 Elliptic curve private key objects says: "The use of a namedCurve is recommended over the choice ecParameters. The choice implicitlyCA must not be used in Cryptoki" OpenSC only supports namedCurves. So your driver will have to map the OID to something internal. OpenSC supports ECDSA, and ECDH. Grep for SC_ALGORITHM_ECDH_CDH_RAW |
@alex-nitrokey @frankmorgner @dengert @hongquan I have started with a series of patches resulting in a first PR: #1498 In addition, I have more patches on top of this PR in the branch OpenPGP-towards-EC of my forked repo. |
🤔 Maybe I should have said, that I am currently working on it? :-/ Anyway, I will have a look at your PR and may add comments on how I did stuff. |
Okay, I see. I did some changes similiar to yours to prepare the code, but also actually re-wrote a lot of the functions in card-openpgp.c for ECC (e.g. generation is already working). I am not sure yet, how to proceed now with the two approaches and I probably should have done a preparation PR at first, like you did. Please have a look at my branch. Mind that the code is not completely ready yet. |
The PR is still open for review... |
Problem Description
When using ECC key the
pkcs11-tool -L
command fails to detect Card.Steps to reproduce
Set key usage to brainpoolP256r1 with gpg-connect-agent like this:
Restart pcscd, unplug and insert smartcard (in this case: Nitrokey Storage 2 with OpenPGP Card v3.3) and type
This results reproducible in:
Any ideas what's happening here and how to fix?
PS: This does not happen if rsa-2048 or alike is used.
The text was updated successfully, but these errors were encountered: