mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
gpg: Use opaque MPI for shared point.
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
b73fef0376
commit
5b094067f7
1 changed files with 1 additions and 7 deletions
|
@ -282,13 +282,7 @@ get_it (ctrl_t ctrl,
|
|||
gcry_mpi_t decoded;
|
||||
|
||||
/* At the beginning the frame are the bytes of shared point MPI. */
|
||||
err = gcry_mpi_scan (&shared_mpi, GCRYMPI_FMT_USG, frame, nframe, NULL);
|
||||
if (err)
|
||||
{
|
||||
err = gpg_error (GPG_ERR_WRONG_SECKEY);
|
||||
goto leave;
|
||||
}
|
||||
|
||||
shared_mpi = gcry_mpi_set_opaque_copy (NULL, frame, nframe * 8);
|
||||
err = pk_ecdh_decrypt (&decoded, fp, enc->data[1]/*encr data as an MPI*/,
|
||||
shared_mpi, sk->pkey);
|
||||
mpi_release (shared_mpi);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue