diff options
author | Martin Willi <martin@strongswan.org> | 2005-12-04 01:30:35 +0000 |
---|---|---|
committer | Martin Willi <martin@strongswan.org> | 2005-12-04 01:30:35 +0000 |
commit | 8ff8c33d1d720a227db193c2105cbdcf119e5746 (patch) | |
tree | 7de51ee9de420cf13eca9c91f4dfb70901d41e10 /Source/charon/utils/gmp_helper.h | |
parent | a374d1ee669a6b7674f242119369770cb9e5705c (diff) | |
download | strongswan-8ff8c33d1d720a227db193c2105cbdcf119e5746.tar.bz2 strongswan-8ff8c33d1d720a227db193c2105cbdcf119e5746.tar.xz |
- implemented RSA, only signing and verifying esma_pkcs1 padded
- removed gmp-helper: chunk_to_mpz is now done with gmp functions, prime generation in prime-pool
- added prime-pool (needs priority fix)
- proof of concept RSA authentication
- mpz uses LEAK_DETECTIVE
- configuration-manager supports rsa keys
Diffstat (limited to 'Source/charon/utils/gmp_helper.h')
-rw-r--r-- | Source/charon/utils/gmp_helper.h | 92 |
1 files changed, 0 insertions, 92 deletions
diff --git a/Source/charon/utils/gmp_helper.h b/Source/charon/utils/gmp_helper.h deleted file mode 100644 index 3b274cf05..000000000 --- a/Source/charon/utils/gmp_helper.h +++ /dev/null @@ -1,92 +0,0 @@ -/** - * @file gmp_helper.h - * - * @brief Interface of gmp_helper_t. - * - */ - -/* - * Copyright (C) 1997 Angelos D. Keromytis. - * Copyright (C) 2005 Jan Hutter, Martin Willi - * Hochschule fuer Technik Rapperswil - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - */ - - - -#ifndef GMP_HELPER_H_ -#define GMP_HELPER_H_ - -#include <gmp.h> - -#include <types.h> - - -typedef struct gmp_helper_t gmp_helper_t; - -/** - * @brief Class with helper functions to manipulate gmp values. - * - * @ingroup utils - */ -struct gmp_helper_t { - - /** - * Initialize an mpz_t to a random prime of specified size. - * - * - * @param this calling object - * @param[out] var pointer to mpz_t variable to initialize - * @param[in] bytes length of given prime in bytes - */ - void (*init_prime) (gmp_helper_t *this, mpz_t *var, int bytes); - - /** - * Convert network form (binary bytes, big-endian) to mpz_t of gmp library. - * - * The given mpz_t gets initialized in this function. - * - * @param this calling private_gmp_helper_t object - * @param mpz_value pointer to a mpz_t value - * @param data chunk_t containing the network form of data - */ - void (*chunk_to_mpz) (gmp_helper_t *this,mpz_t *mpz_value, chunk_t data); - - /** - * Convert mpz_t to network form (binary bytes, big-endian). - * - * @param this calling private_gmp_helper_t object - * @param mpz_value mpz_value to convert - * @param data chunk_t where the data are written to - * @param bytes number of bytes to copy - */ - void (*mpz_to_chunk) (gmp_helper_t *this, mpz_t *mpz_value, chunk_t *data, size_t bytes); - - /** - * @brief Destroys an gmp_helper_t object. - * - * @param this gmp_helper_t object to destroy - * @return SUCCESS in any case - */ - void (*destroy) (gmp_helper_t *this); -}; - -/** - * Creates a new gmp_helper_t object - * - * @return gmp_helper_t object - * - * @ingroup utils - */ -gmp_helper_t *gmp_helper_create(); - -#endif /*GMP_HELPER_H_*/ |