Tobias Brunner
3af7c6db87
Rename diffie_hellman_t to key_exchange_t and change the interface etc.
...
This makes it more generic so we can use it for QSKE methods.
2022-06-29 10:28:50 +02:00
Tobias Brunner
19ef2aec15
Update copyright headers after acquisition by secunet
2022-06-28 10:22:56 +02:00
Tobias Brunner
c508b904b8
openssl: Fix typo in comment
2022-04-21 11:06:30 +02:00
Tobias Brunner
36cf74f5d9
openssl: Fixes for DH with OpenSSL 3.0
...
While we could assign the DH object to a EVP_PKEY object, this won't work
with BoringSSL as it doesn't seem to support EVP_PKEY_derive() for DH.
2022-04-14 19:05:44 +02:00
Tobias Brunner
1c1213f4b6
openssl: Move shared secret calculation to get_shared_secret()
...
This is a change from the multi-KE branch.
2022-04-14 19:05:44 +02:00
Tobias Brunner
57e68ab9c5
openssl: Improve compatibility to newer BoringSSL releases
...
Closes strongswan/strongswan#352
2021-08-24 14:20:37 +02:00
Tobias Brunner
1b67166921
Unify format of HSR copyright statements
2018-05-23 16:32:53 +02:00
Tobias Brunner
46a62f0126
Define MODP_CUSTOM constructors as variadic functions
...
They now match the dh_constructor_t signature. This is a follow up for
the changes merged with b668bf3f9e and should fix use of MODP_CUSTOM on
Apple's ARM64 platform.
2017-09-18 12:07:26 +02:00
Tobias Brunner
54d629b7ad
openssl: Update DH API to OpenSSL 1.1.0
2016-06-29 11:09:37 +02:00
Tobias Brunner
c8a219a28d
openssl: The member storing the DH exponent length has been renamed in BoringSSL
2016-04-15 10:32:53 +02:00
Tobias Brunner
5f18e2c371
openssl: Explicitly include openssl/bn.h
...
If OpenSSL is compiled with OPENSSL_NO_DEPRECATED some of the headers
we include don't include openssl/bn.h anymore. Therefore, we have to
explicitly include it ourselves where we use BN_* functions.
Fixes #1113 .
2015-09-16 11:57:52 +02:00
Martin Willi
e77ca5c79d
openssl: Support setting private Diffie-Hellman values
2015-04-15 14:38:42 +02:00
Martin Willi
0356089d0f
diffie-hellman: Verify public DH values in backends
2015-03-23 17:54:03 +01:00
Martin Willi
a777155ffe
diffie-hellman: Add a bool return value to set_other_public_value()
2015-03-23 17:54:03 +01:00
Martin Willi
42431690e0
diffie-hellman: Add a bool return value to get_my_public_value()
2015-03-23 17:54:03 +01:00
Martin Willi
bace1d6479
diffie-hellman: Use bool instead of status_t as get_shared_secret() return value
...
While such a change is not unproblematic, keeping status_t makes the API
inconsistent once we introduce return values for the public value operations.
2015-03-23 17:54:02 +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
Tobias Brunner
a3a190b7bd
openssl: Properly honor OPENSSL_NO_* defines
2013-01-31 17:33:23 +01:00
Tobias Brunner
f05b427265
Moved debug.[ch] to utils folder
2012-10-24 16:00:51 +02:00
Martin Willi
42b1ac91c4
Added support for MODP_CUSTOM to openssl plugin
2010-09-03 09:33:15 +02:00
Martin Willi
ba31fe1fd6
Use a seperate section for each nested struct member in INIT macro
2010-08-18 12:15:03 +02:00
Martin Willi
57202484e4
Migrated remaining classes in openssl plugin to INIT/METHOD macros
2010-08-10 18:46:30 +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
8b0e09103b
Adding DBG_LIB to all calls of libstrongswan's version of DBG*.
2010-04-06 12:47:40 +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
Martin Willi
7daf5226b7
removed trailing spaces ([[:space:]]+$)
2009-09-04 13:46:09 +02:00
Andreas Steffen
ebb97511e6
dh_exponent_ansi_x9_42 is now a libstrongswan setting
2009-05-26 18:32:52 +02:00
Tobias Brunner
8c5d72cd0b
removing svn keyword $Id$ from all files
2009-04-30 13:19:35 +00:00
Martin Willi
b8cbb6451c
ported some hard-to-merge cherries back to trunk :-/
...
shame, svn, shame: this was ways to complicated
we should consider a switch to git...
2008-11-12 15:09:24 +00:00
Martin Willi
d4f08fe324
removed superfluous get_other_public_value in diffie_hellman_t interface
2008-11-04 13:12:11 +00:00
Martin Willi
ddd7e6c656
fixed bignum export if BN_num_bytes() != DH_size()
2008-11-04 13:05:00 +00:00
Andreas Steffen
f5ab7f5f57
refining changeset 4483 by introducing charon.dh_exponent_ansi_x9_42 key
2008-10-28 01:59:01 +00:00
Andreas Steffen
21a45f2f2d
use 512 bits of entropy for secret DH exponents
2008-10-26 23:53:52 +00:00
Tobias Brunner
ae7e837c30
adding diffie hellman with OpenSSL
2008-04-29 15:42:34 +00:00