PKCS11-SPECS | All versions of PKCS # 11 specification in one place | TLS library
kandi X-RAY | PKCS11-SPECS Summary
kandi X-RAY | PKCS11-SPECS Summary
All versions of PKCS#11 specification in one place. 1995 - [PKCS#11 v1.0] v1.0) 1997 - [PKCS#11 v2.0] v2.0_DRAFT) 1997 - [PKCS#11 v2.01] v2.01) 1999 - [PKCS#11 v2.10] v2.10) 2001 - [PKCS#11 v2.11] v2.11) 2004 - [PKCS#11 v2.20] v2.20) 2009 - [PKCS#11 v2.30] v2.30_DRAFT) 2015 - [PKCS#11 v2.40] v2.40) 2020 - [PKCS#11 v3.0] v3.0). 2015 - [RFC7512 - The PKCS#11 URI Scheme] RELATED/RFC7512).
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of PKCS11-SPECS
PKCS11-SPECS Key Features
PKCS11-SPECS Examples and Code Snippets
Community Discussions
Trending Discussions on PKCS11-SPECS
QUESTION
I bought a NitroKey HSM and wanted to derive a secret with EC. Previosly question
For this, I want to use the CKM_ECDH1_DERIVE
mechanisms. Which is supported by this HSM, see:
Referring to the PKCS#11 specification this must be considered:
- The mechanism
CKM_ECDH1_DERIVE
must be used with the functionDerive
(Page 188) - The mechanism
CKM_ECDH1_DERIVE
expects parameterCK_ECDH1_DERIVE_PARAMS
(Page 222) with this arguments:- kdf: Key derivation function used on the shared secret value (CKD)
- sharedData: Some data shared between the two parties
- publicData: Other party's EC public key value
- The function
DeriveKey
expects these arguments:- Mechanism CKM.CKM_ECDH1_DERIVE
- ObjectHandle PrivateKey
- ObjectAttributes (Page 338)
- CKA.CKA_CLASS -> CKO.CKO_SECRET_KEY
- CKA.CKA_KEY_TYPE -> CKK.CKK_GENERIC_SECRET
- But "However, since these facts are all implicit in the mechanism, there is no need to specify any of them" so these can be null?
So with this information, I tried to implement a method.
But I get this Error:
Net.Pkcs11Interop.Common.Pkcs11Exception : Method C_DeriveKey returned CKR_TEMPLATE_INCOMPLETE
at Session.DeriveKey
.
Explanation of CKR_TEMPLATE_INCOMPLETE
(Page 64):
If the attribute values in the supplied template, together with any default attribute values and any attribute values contributed to the object by the object-creation function itself, are insufficient to fully specify the object to create, then the attempt should fail with the error code CKR_TEMPLATE_INCOMPLETE.
and here (Page 98)
CKR_TEMPLATE_INCOMPLETE: The template specified for creating an object is incomplete, and lacks some necessary attributes. See Section 10.1 for more information.
But I used the nesseary attributes:
- CKA.CKA_CLASS -> CKO.CKO_SECRET_KEY
- CKA.CKA_KEY_TYPE -> CKK.CKK_GENERIC_SECRET
Ideas?
Code ...ANSWER
Answered 2017-Feb-21 at 22:02That's a very nice and complete description of a problem.
CKR_TEMPLATE_INCOMPLETE
is always very painful to deal with because almost every library vendor expect different set of attributes to be provided and this error does not reveal which exact attributes are missing.
After a quick look at OpenSC source code I would try with following template:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install PKCS11-SPECS
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page