diff options
author | Rob Austein <sra@hactrn.net> | 2017-03-01 14:10:31 -0500 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2017-03-01 14:10:31 -0500 |
commit | 623ed007f5eb5fc66c24e0b3872d0912e11cf0ee (patch) | |
tree | 59907d09d202fdc142a397b44f90dff63c0a3f53 /tests/test-rsa.h | |
parent | 147208e5724d92f49f7252d0e877979ff4424173 (diff) |
Compute public key if necessary when loading a private key.
libhal and PKCS #11 have slightly different models of private keys: in
libhal, a "private key" object is really a keypair, while in PKCS #11
a private key really is a naked private key. This was a deliberate
design decision in libhal, both for simplicity and to better support
user interfaces other than PKCS #11, so we'd rather not change it.
This difference doesn't matter very much for RSA keys in PKCS #11,
where the private key components are a superset of the public key
components anyway, but the PKCS #11 template for ECDSA private keys
doesn't allow setting public key components with C_CreateObject().
Fortunately, computing the public components of an ECDSA key pair from
the private key is straightforward, so we just do that when needed.
Diffstat (limited to 'tests/test-rsa.h')
0 files changed, 0 insertions, 0 deletions