Howto read a mpi point from buffer?

Werner Koch wk at gnupg.org
Sun Jun 11 14:28:10 CEST 2017


On Sat, 10 Jun 2017 19:55, stefbon at gmail.com said:

> The file I want to read is the public key stored by openssh, where the "q"
> (elliptic curve point octet string) of the key:
>
> string "ed25519"
> string "q"

I suggest to read gnupg/agent/command-ssh.c.  In particular the
functions ssh_receive_key and stream_read_blob.  The trick here is that
you don't read a proper MPI but merely use the MPI object to store an
opaque value - the ECC crypto function can handle them.


Salam-Shalom,

   Werner

-- 
Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 227 bytes
Desc: not available
URL: </pipermail/attachments/20170611/2a5bd3ce/attachment.sig>


More information about the Gcrypt-devel mailing list