aboutsummaryrefslogtreecommitdiffstats
path: root/Source/charon/utils/gmp_helper.h
diff options
context:
space:
mode:
authorJan Hutter <jhutter@hsr.ch>2005-11-18 10:18:45 +0000
committerJan Hutter <jhutter@hsr.ch>2005-11-18 10:18:45 +0000
commit6f17c7d68ec3726a2dc323ee06c8f6d98b68958b (patch)
tree5326d463c9c2cdc6abf98d77f72ad8ab50756356 /Source/charon/utils/gmp_helper.h
parent469ce15ad1409658a36b792a4da22e51f836befa (diff)
downloadstrongswan-6f17c7d68ec3726a2dc323ee06c8f6d98b68958b.tar.bz2
strongswan-6f17c7d68ec3726a2dc323ee06c8f6d98b68958b.tar.xz
- implemented all diffie hellman groups
- diffie hellman tested
Diffstat (limited to 'Source/charon/utils/gmp_helper.h')
-rw-r--r--Source/charon/utils/gmp_helper.h15
1 files changed, 15 insertions, 0 deletions
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.
*