From 6f17c7d68ec3726a2dc323ee06c8f6d98b68958b Mon Sep 17 00:00:00 2001 From: Jan Hutter Date: Fri, 18 Nov 2005 10:18:45 +0000 Subject: - implemented all diffie hellman groups - diffie hellman tested --- Source/charon/utils/gmp_helper.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'Source/charon/utils/gmp_helper.h') diff --git a/Source/charon/utils/gmp_helper.h b/Source/charon/utils/gmp_helper.h index ff2a73c8a..c1c65246e 100644 --- a/Source/charon/utils/gmp_helper.h +++ b/Source/charon/utils/gmp_helper.h @@ -51,6 +51,21 @@ struct gmp_helper_s { * - OUT_OF_RES */ status_t (*init_prime) (gmp_helper_t *this, mpz_t *var, int bytes); + + /** + * @brief initialize an mpz_t to a random prime of specified size without using gmp + * next prime function! Must be faster then the gmp version + * + * + * @param this calling object + * @param[out] var mpz_t variable to initialize + * @param[in] bytes length of given prime in bytes + * @return + * - SUCCCESS + * - FAILED + * - OUT_OF_RES + */ + status_t (*init_prime_fast) (gmp_helper_t *this, mpz_t *prime, int bytes); /* Convert network form (binary bytes, big-endian) to mpz_t of gmp library. * -- cgit v1.2.3