Skip to content
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

SmartCard-HSM: Error Generating Private Key on Smart card through SC-HSM PKCS11 Module #682

Closed
scottthomas007 opened this issue Feb 19, 2016 · 2 comments

Comments

@scottthomas007
Copy link

I am trying to generate private key on SmartCard-HSM but its showing that it is unsupported.

1st i tried to generate the private key through PKCS11 module(sc-hsm-pkcs11-2.7.0.msi) provided on SC-HSM website but it doesn't support key generation. Link of that zip file was http:https://www.cardcontact.de/download/sc-hsm-starterkit.zip

C:\Program Files\OpenSC Project\OpenSC\tools>pkcs11-tool -l --pin 12345678 --key
pairgen --key-type rsa:2048 --id 10 -label "KEY" --module "C:\Program Files\Card
Contact\sc-hsm-pkcs11\lib\sc-hsm-pkcs11.dll"
Using slot 0 with a present token (0x0)
error: PKCS11 function C_GenerateKeyPair failed: rv = CKR_FUNCTION_NOT_SUPPORTED
(0x54)
Aborting.

C:\Program Files\OpenSC Project\OpenSC\tools>pkcs11-tool -l --pin 12345678 --key
pairgen --key-type rsa:1024 --id 10 -label "KEY" --module "C:\Program Files\Open
SC Project\OpenSC\tools\sc-hsm-pkcs11.dll"
Using slot 0 with a present token (0x0)
error: PKCS11 function C_GenerateKeyPair failed: rv = CKR_FUNCTION_NOT_SUPPORTED
(0x54)
Aborting.

What's this issue, can't we generate a key on SmartCard-HSM ?????

@CardContact
Copy link
Member

This PKCS#11 is a lightweight read/only module. It's meant to be deployed on workstations where no key generation or update is required. You can create keys with the PKCS#11 module from OpenSC or any of the other OpenSCDP tools and use the keys with the lightweight module.

@scottthomas007
Copy link
Author

Yes, SmartCard-HSM is fully workable with opensc-pkcs11.dll. I have verified it thoroughly.
Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants