[kmf-discuss] Create and Store Key APIs
Wyllys Ingersoll
wyllys.ingersoll at sun.com
Mon Mar 19 07:30:30 PDT 2007
I've had a look at the code and based on Max's suggestions, I think
some fixes are needed.
#1 - It should be optional for CreateKeypair to actually store the
keys in the keystore as they are created. The alternative is
to just create them in memory and let the caller store them
later.
#2 - #1 leads to another problem, we don't have separate APIs for
storing keys. We have a KMF_StorePrivateKey() function, but
it is only for raw asymmetric Private keys, it won't work with
a standard KMF_KEY_HANDLE nor will it work with public keys.
I think we need a KMF_StoreKey() API that looks like this:
KMF_RETURN
KMF_StoreKey(KMF_HANDLE_T kmfhandle,
KMF_STOREKEY_PARAMS *params,
KMF_KEY_HANDLE *kmfkey);
This could be used to store public or private keys in any of the
supported keystores.
Fixing these 2 issues would allow a program to create keys in memory
and store them later.
#3 - KMF_StorePrivateKey() should probably go away or perhaps
be renamed KMF_StoreRawPrivateKey to make it clear that it has
a very specific usage.
Thoughts ?
- Wyllys
More information about the kmf-discuss
mailing list