mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-14 21:47:19 +02:00
See ChangeLog: Sun Apr 18 10:11:28 CEST 1999 Werner Koch
This commit is contained in:
parent
02d018f9c8
commit
1feae2011c
50 changed files with 547 additions and 502 deletions
|
@ -245,11 +245,16 @@ encrypt(MPI a, MPI b, MPI input, ELG_public_key *pkey )
|
|||
{
|
||||
MPI k;
|
||||
|
||||
/* Note: maybe we should change the interface, so that it
|
||||
* is possible to check that input is < p and return an
|
||||
* error code.
|
||||
*/
|
||||
|
||||
k = gen_k( pkey->p );
|
||||
mpi_powm( a, pkey->g, k, pkey->p );
|
||||
/* b = (y^k * input) mod p
|
||||
* = ((y^k mod p) * (input mod p)) mod p
|
||||
* and because input is < p (FIXME: check this!)
|
||||
* and because input is < p
|
||||
* = ((y^k mod p) * input) mod p
|
||||
*/
|
||||
mpi_powm( b, pkey->y, k, pkey->p );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue