Read DSA public key from file

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


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

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

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. 


Shalom-Salam,

   Werner

-- 
Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.




More information about the Gcrypt-devel mailing list