"Fixing" private key/generating public key from incomplete private

Dmitry Eremin-Solenikov dbaryshkov at gmail.com
Fri Feb 14 22:23:43 CET 2014


On Sat, Feb 1, 2014 at 9:06 PM, Dmitry Eremin-Solenikov
<dbaryshkov at gmail.com> wrote:
> I'm looking for a way to 'fixup' the private key. For example. I load
> the DSA key from PKCS#8 keyfile. It contains (in terms of gcrypt
> s-exp) domain parameters (p, q, g), secret exponent (x) but no
> public exponent (y). I found gcrypt_pubkey_get_sexp, but it
> (currently) only works for ECC.
> It there a good way to solve my problem? I was thinking about
> adding an special mode to gcry_pk_genkey or about adding a
> special API resembling gcrypt_pubkey_get_sexp() but working
> with such (incomplete) private keys instead of contexts.

Werner, what is your opinion? I'd like to have a way to do 'key fixture'
in a generic way from the API point of view, rather than applying fixes
on an algo-by-algo cases in my application.

With best wishes

More information about the Gcrypt-devel mailing list