Page MenuHome GnuPG

Composing a private key from raw key material
Open, WishlistPublic


It is better for libgcrypt to support API to compose a private key from raw key
material (by adding some information like appropriate flags, etc.).
This is useful to recover the key from external process, like from paper, from
smartcard (if it is possible to read out the raw key material), etc.

Event Timeline

This will be useful for GnuPG itself. For example, currently in
gnupg/agent/command-ssh.c, we have a function ssh_receive_key which compose a
private key from 'ssh-add'. With this API, it will be cleaned up.

How about adding support with private in keyparam?

  • (genkey(rsa(nbit 2048)(d xxxx)(p xxxx)(q xxxx)(u xxxx))) ; Only p and q, is OK
  • (genkey(ecc(curve cv25519)(flags djb-tweak comp)(d xxx)))