Read DSA public key from file

Werner Koch wk at
Mon Jan 3 12:34:06 CET 2011

On Sun,  2 Jan 2011 16:03, dirkneumann at said:

> error=gcry_sexp_build(&key_public,NULL,
>                       "(public-key(dsa(p%m)(q%m)(g%m)(y%m)))",
>                       p.size(),,q.size(),,
>                       g.size(),,y.size(),;

Nope. %m takes an gcry_mpi_t and not size and data.  

> documentation of the format of GPG-exports (beside the GPG-source?) or
> a magic function which does that task?

RFC 4880 tells you everything.

  gpg --list-packets --debug 2 file_with_openpg_secret_key

shows the MPI values. 



Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.

More information about the Gcrypt-devel mailing list