Commit Graph

29 Commits

Author SHA1 Message Date
Andreas Steffen 393688aea0 Created newhope plugin implementing the New Hope key exchange algorithm 2016-08-10 14:22:00 +02:00
Martin Willi 0356089d0f diffie-hellman: Verify public DH values in backends 2015-03-23 17:54:03 +01:00
Tobias Brunner e13ef5c434 crypto: Define MODP_CUSTOM outside of IKE DH range
Before this fix it was possible to crash charon with an IKE_SA_INIT
message containing a KE payload with DH group MODP_CUSTOM(1025).
Defining MODP_CUSTOM outside of the two byte IKE DH identifier range
prevents it from getting negotiated.

Fixes CVE-2014-9221.
2014-12-23 15:40:01 +01:00
Martin Willi 0a5b60db20 diffie-hellman: Handle dh_exponent_ansi_x9_42 as a boolean setting
While it was always documented as boolean setting, the option is currently
handled as integer value, for which yes/no values do not work. Instead the
default of TRUE is used for a no value.

The option has been moved a lot during the last years, and in some locations
was handled as bool, in some as integer. In the latest codebase it
congruently used integer, which is actually not what is documented and used
in testing.

Fixes #781.
2014-12-05 14:00:36 +01:00
Martin Willi 46184b07c1 diffie-hellman: Explicitly initialize DH exponent sizes during initialization
To avoid any race conditions when multiple threads call and initialize
diffie_hellman_get_params(), explicitly examine the optimum DH exponent size
during library initialization.

Fixes #655.
2014-08-25 09:43:29 +02:00
Tobias Brunner 8dc6e71632 lib: All settings use configured namespace 2014-02-12 14:34:32 +01:00
Andreas Steffen 146ad86be5 Prototype implementation of IKE key exchange via NTRU encryption 2013-11-27 20:21:40 +01:00
Andreas Steffen cca372465d ecc: Added ECC Brainpool ECDH groups as registered with IANA 2013-10-17 11:57:04 +02:00
Tobias Brunner 5ddeaf2884 Fixed compiler warnings for DH groups that define no subgroup. 2011-11-25 10:18:03 +01:00
Martin Willi 7d7711aba4 Added a generic function to check if a DH group is an EC group 2010-09-03 16:22:10 +02:00
Martin Willi 0abd558a65 Added a MODP_CUSTOM DH group which takes g and p as constructor arguments 2010-09-02 19:33:08 +02:00
Martin Willi 4590260b2d Added support for DH groups 22, 23 and 24, patch contributed by Joy Latten 2010-04-19 14:41:20 +02:00
Martin Willi b34b93dbf7 Store DH generator in a chunk, hide non-public data in a private struct 2010-04-08 15:08:35 +02:00
Tobias Brunner 908d571796 Provide the Diffie Hellman parameters from a central location, so that we do not have to replicate them in every plugin that implements the DH interface.
The main reason for this change is that Android's libcrypto does not
include the get_rfcX_prime_Y functions by default.  Therefore we would
have had to replicate the primes a third time.
2010-03-09 17:15:16 +01:00
Andreas Steffen dcf47581a8 shortened DH group names 2009-05-15 20:58:04 +02:00
Tobias Brunner 8c5d72cd0b removing svn keyword $Id$ from all files 2009-04-30 13:19:35 +00:00
Martin Willi a20abb81e9 added a MODP_NULL Diffie Hellman group to avoid calculation overhead in load-testing 2008-11-22 16:14:55 +00:00
Andreas Steffen 0caf2b936e added missing comma in enumeration 2008-05-29 06:55:03 +00:00
Tobias Brunner 346e9c5712 added the ECP groups from RFC 5114 2008-05-22 11:55:05 +00:00
Tobias Brunner fc1a31d54b added ECDH with OpenSSL (see RFC 4753) 2008-05-22 11:39:17 +00:00
Martin Willi 552cc11b1f merged the modularization branch (credentials) back to trunk 2008-03-13 14:14:44 +00:00
Martin Willi 493f377b41 fixed memory leak 2007-10-04 15:20:00 +00:00
Martin Willi c96aefe268 implemented an optional DH public value test
some other cleanups, using RFC2631 variable names
2007-10-04 15:19:24 +00:00
Martin Willi 40f10fd88e cleanups, fixes and simplification of diffie hellman code 2007-10-04 12:08:11 +00:00
Martin Willi 60356f3375 introduced new logging subsystem using bus:
passive listeners can register on the bus
  active listeners wait for signals actively
  multiplexing allows multiple listeners to receive debug signals
  a lot more...
2006-10-18 11:46:13 +00:00
Martin Willi c71d53ba4e updated copyright information 2006-07-07 08:49:06 +00:00
Martin Willi a2a3fb3e25 workaround for peers rekeying at the same time
loading lifetime policies from ipsec.conf
2006-06-12 07:33:20 +00:00
Martin Willi 9cf5f29027 2006-05-10 13:16:27 +00:00
Martin Willi 95806de938 2006-05-10 07:58:29 +00:00