Replies: 5 comments 7 replies
-
I found CKA_EC_PARAMS which is OID. Still looking for key length. |
Beta Was this translation helpful? Give feedback.
-
I can't find the curves names in https://docs.oasis-open.org/pkcs11/pkcs11-base/v3.0/os/include/pkcs11-v3.0/pkcs11t.h Feel free to send a patch or PR for PyKCS11. |
Beta Was this translation helpful? Give feedback.
-
Cards may not have the OID, but expect calling middleware, written for the card, how to use an EC key on the card. But pkcs11-tool can load other modules, that may support curves unknow to pkcs11-tool or OpenSC.
If the card contains a certificate signed by an EC key from the card, the certificate's SubjectPublicKeyInfo should have the OID. Last resort is to search internet for OID. For example: OID1.3.36.3.3.2.8.1.1.7 Complicating matters experimental OIDs may not be registered. And some OIDs have multiple curve names. |
Beta Was this translation helpful? Give feedback.
-
@frankmorgner @Jakuje The The confusion of PKCS11 3.0 passing Edwards and Montgomery curves by name or OID See: #2952 could also be addressed. I have be waiting to 0.25.0 to be released to propose a PR for the #2952 which is in https://github.com/dengert/OpenSC/tree/X25519-improvements-2 branch, which also deals with |
Beta Was this translation helpful? Give feedback.
-
I would reiterate back to what is the problem you are trying to solve to avoid solving X when the problem is Y. Why do you need the curve name and length? Even though the ECC curves are group of possible infinite number of various curves with different parameters, in reality, only few of them are standardized and used in practice and even fewer of them used in smart cards and in real-world applications and protocols so most applications have some table on their own to hardcode the OID/name/size. Other option might be going through the pkcs11 provider, if you use OpenSSL already. It will provide you a convenient functions to get the curve name and key length for the given key. |
Beta Was this translation helpful? Give feedback.
-
Is there a way to get curve name and key length for EC key from the card?
I can get x,y point, but those two elude me.
Beta Was this translation helpful? Give feedback.
All reactions