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

Consider deriving PKCS #11 public key from certificate #71

Open
clundin25 opened this issue Mar 22, 2023 · 1 comment
Open

Consider deriving PKCS #11 public key from certificate #71

clundin25 opened this issue Mar 22, 2023 · 1 comment
Assignees
Labels
priority: p3 Desirable enhancement or fix. May not be included in next release. type: question Request for information or clarification. Not an issue.

Comments

@clundin25
Copy link
Collaborator

Currently PKCS#11 requires a public key to be token. Alternatively, the public key can be derived from the certificate, similar to the windows and macos implementations.

This would:

  1. Reduce work. There is no reason to have the public key stored in the HSM, our use case only cares about the certificate.
  2. Reduce mistakes. Most users of ECP will likely think a certificate and private key is enough. Extracting and loading the Public key is an awkward and extra step.
@clundin25 clundin25 added type: question Request for information or clarification. Not an issue. priority: p3 Desirable enhancement or fix. May not be included in next release. labels Mar 22, 2023
@clundin25 clundin25 self-assigned this Mar 22, 2023
@salrashid123
Copy link

it'd help to document the specific objects you need on the device to use this proxy.

eg, you need to have the private key ofcourse but also the cert and the public key.

the cert can certainly exist outside of the device and the public key itself can get derived from private anyway.

$ pkcs11-tool --module /usr/lib/x86_64-linux-gnu/softhsm/libsofthsm2.so  --list-objects --pin mynewpin
Using slot 0 with a present token (0x51aac4a2)
Public Key Object; RSA 2048 bits
  label:      keylabel3
  ID:         10
  Usage:      encrypt, verify, wrap
  Access:     none
Private Key Object; RSA 
  label:      keylabel3
  ID:         10
  Usage:      decrypt, sign, unwrap
  Access:     sensitive
Certificate Object; type = X.509 cert
  label:      keylabel3
  subject:    DN: L=US, O=Google, OU=Enterprise, CN=user10.esodemoapp2.com
  serial:     1C
  ID:         10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p3 Desirable enhancement or fix. May not be included in next release. type: question Request for information or clarification. Not an issue.
Projects
None yet
Development

No branches or pull requests

2 participants