mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-14 21:47:19 +02:00
release 0.2.3
This commit is contained in:
parent
b18d1107ec
commit
d6fa02add6
41 changed files with 464 additions and 110 deletions
|
@ -113,9 +113,11 @@ gen_k( MPI p )
|
|||
/****************
|
||||
* Generate a key pair with a key of size NBITS
|
||||
* Returns: 2 structures filles with all needed values
|
||||
* and an array with n-1 factors of (p-1)
|
||||
*/
|
||||
void
|
||||
elg_generate( ELG_public_key *pk, ELG_secret_key *sk, unsigned nbits )
|
||||
elg_generate( ELG_public_key *pk, ELG_secret_key *sk,
|
||||
unsigned nbits, MPI **ret_factors )
|
||||
{
|
||||
MPI p; /* the prime */
|
||||
MPI p_min1;
|
||||
|
@ -136,7 +138,7 @@ elg_generate( ELG_public_key *pk, ELG_secret_key *sk, unsigned nbits )
|
|||
else
|
||||
qbits = 240;
|
||||
g = mpi_alloc(1);
|
||||
p = generate_elg_prime( nbits, qbits, g );
|
||||
p = generate_elg_prime( nbits, qbits, g, ret_factors );
|
||||
mpi_sub_ui(p_min1, p, 1);
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue