- wrote diffie_hellman_t but not tested
This commit is contained in:
@@ -130,6 +130,7 @@ static status_t init_prime (private_gmp_helper_t *this, mpz_t *prime, int bytes)
|
||||
allocator_free(random_bytes.ptr);
|
||||
random_bytes.ptr = NULL;
|
||||
|
||||
/* composites are possible but should never occur */
|
||||
mpz_nextprime (*(prime),*(prime));
|
||||
|
||||
return SUCCESS;
|
||||
|
||||
@@ -53,6 +53,8 @@ struct gmp_helper_s {
|
||||
status_t (*init_prime) (gmp_helper_t *this, mpz_t *var, int bytes);
|
||||
|
||||
/* Convert network form (binary bytes, big-endian) to mpz_t of gmp library.
|
||||
*
|
||||
* mpz_t gets initialized in this function.
|
||||
*
|
||||
* @param this calling private_gmp_helper_t object
|
||||
* @param mpz_value pointer to a mpz_t value
|
||||
|
||||
Reference in New Issue
Block a user