Howto read a mpi point from buffer?
stefbon at gmail.com
Sun Jun 11 15:48:06 CEST 2017
2017-06-11 14:28 GMT+02:00 Werner Koch <wk at gnupg.org>:
> 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.
A thanks! I will read that code.
I've found something in the test/t-mpi-point.c code.
The "q" of a sample ed25519 is read using a hex2mpi function, which on
his turn uses the
gcry_mpi_scan function using the GCRYMPI_FMT_HEX format.
More information about the Gcrypt-devel