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

Would like enigne_pkcs11 to generate random numbers through HSM. #40

Open
gmt0x0 opened this issue Jun 16, 2016 · 4 comments
Open

Would like enigne_pkcs11 to generate random numbers through HSM. #40

gmt0x0 opened this issue Jun 16, 2016 · 4 comments

Comments

@gmt0x0
Copy link

gmt0x0 commented Jun 16, 2016

Is it planned to add the random number generation functionality to the engine?

Regards,

@gmt0x0 gmt0x0 changed the title enigne_pkcs11 does not generate random numbers. Would like enigne_pkcs11 to generate random numbers through HSM. Jun 20, 2016
@seurat-atreides
Copy link

Hi,
I'm experimenting with an SC-HSM card from cardcontact.de and have managed to generate random numbers (max 265 byte) by sending APDUs to the card via opensc-tool:
opensc-tool -s 00A4040C0be82b0601040181c31f020100 -s 00840000
The last byte (Le) of the GET_CHALLENGE APDU determines the length of the random number chain.
I haven't been able to generate more hat 256 bytes (Le=00) because I can't figure out how to send an extended length Le. I know the card can handle up to 0xFFFF random number chains because I have used the test suite provided by cardcontact.de
I hope someone can explain to me how to use opensc-tool to send an extended length Le for the GET_CHALLENGE APDU.

@dengert
Copy link
Member

dengert commented Aug 5, 2017 via email

@seurat-atreides
Copy link

I'm running opensc-pkcs11ver 0.15 under ubuntu and --generate-random is not an option.
Thanks for the explanation and suggestion.

@dengert
Copy link
Member

dengert commented Aug 7, 2017

It is in 0.17.0. Can you build and try 0.17.0? The engine code calls pkcs11. Testing opensc-pkcs11 would be the first step to getting engine to generate random numbers.

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

3 participants