Annotation of embedaddon/strongswan/src/libstrongswan/plugins/gmp/gmp_diffie_hellman.h, revision 1.1
1.1 ! misho 1: /*
! 2: * Copyright (C) 2005-2007 Martin Willi
! 3: * Copyright (C) 2005 Jan Hutter
! 4: * HSR Hochschule fuer Technik Rapperswil
! 5: *
! 6: * This program is free software; you can redistribute it and/or modify it
! 7: * under the terms of the GNU General Public License as published by the
! 8: * Free Software Foundation; either version 2 of the License, or (at your
! 9: * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
! 10: *
! 11: * This program is distributed in the hope that it will be useful, but
! 12: * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
! 13: * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
! 14: * for more details.
! 15: */
! 16:
! 17: /**
! 18: * @defgroup gmp_diffie_hellman gmp_diffie_hellman
! 19: * @{ @ingroup gmp_p
! 20: */
! 21:
! 22: #ifndef GMP_DIFFIE_HELLMAN_H_
! 23: #define GMP_DIFFIE_HELLMAN_H_
! 24:
! 25: typedef struct gmp_diffie_hellman_t gmp_diffie_hellman_t;
! 26:
! 27: #include <library.h>
! 28:
! 29: /**
! 30: * Implementation of the Diffie-Hellman algorithm, as in RFC2631. Uses libgmp.
! 31: */
! 32: struct gmp_diffie_hellman_t {
! 33:
! 34: /**
! 35: * Implements diffie_hellman_t interface.
! 36: */
! 37: diffie_hellman_t dh;
! 38: };
! 39:
! 40: /**
! 41: * Creates a new gmp_diffie_hellman_t object.
! 42: *
! 43: * @param group Diffie Hellman group number to use
! 44: * @return gmp_diffie_hellman_t object, NULL if not supported
! 45: */
! 46: gmp_diffie_hellman_t *gmp_diffie_hellman_create(diffie_hellman_group_t group);
! 47:
! 48: /**
! 49: * Creates a new gmp_diffie_hellman_t object for MODP_CUSTOM.
! 50: *
! 51: * @param group MODP_CUSTOM
! 52: * @param ... expects generator and prime as chunk_t
! 53: * @return gmp_diffie_hellman_t object, NULL if not supported
! 54: */
! 55: gmp_diffie_hellman_t *gmp_diffie_hellman_create_custom(
! 56: diffie_hellman_group_t group, ...);
! 57:
! 58: #endif /** GMP_DIFFIE_HELLMAN_H_ @}*/
! 59:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>