14151 Commits

Author SHA1 Message Date
Andreas Steffen
9e7d5666af libtpmtss: Rename diffie_hellman_t to key_exchange_t 2021-12-27 13:51:30 +01:00
Andreas Steffen
6cd81ad73d oqs: Included version 4.1 of BIKE Round 3 (L1 and L3)
Requirement: liboqs-0.7.0
2021-12-27 11:41:16 +01:00
Tobias Brunner
4a0d9377d2 wolfssl: Move shared secret calculation to get_shared_secret()
The ECDH implementation gets a bit simpler since we removed the
ecp_x_coordinate_only option a while ago.

Also added calls to verify public keys.
2021-12-27 11:41:16 +01:00
Tobias Brunner
4de247fcac pkcs11: Move shared secret calculation to get_shared_secret() 2021-12-27 11:41:16 +01:00
Tobias Brunner
892d3ff1f7 openssl: Move shared secret calculation to get_shared_secret() 2021-12-27 11:41:16 +01:00
Tobias Brunner
3ba69906cc gcrypt: Move shared secret calculation to get_shared_secret() 2021-12-27 11:41:16 +01:00
Tobias Brunner
d99b05a9af curve25519: Move shared secret calculation to get_shared_secret() 2021-12-27 11:41:16 +01:00
Tobias Brunner
cfa35c7a60 botan: Move shared secret calculation to get_shared_secret() 2021-12-27 11:41:16 +01:00
Tobias Brunner
a116eca054 gmp: Move shared secret calculation to get_shared_secret()
This avoids doing costly operations when just setting the public key.
For the same reason the optional extended public key check is moved.
2021-12-27 11:41:16 +01:00
Tobias Brunner
ddfcaa466f key-exchange: Warn about costly operations in set_public_key() 2021-12-27 11:41:16 +01:00
Tobias Brunner
103d0beb4b ike-auth: Move packet collection to post_build() method
This way we avoid having to pre-generate the message when it could
theoretically still get modified by a task that follows or from a plugin
via message() hook.
2021-12-27 11:41:16 +01:00
Tobias Brunner
ea6840c4bc message: Store original encrypted payload when generating fragments
If we don't do this, get_plain() will fail after generating the message
fragmented.
2021-12-27 11:41:16 +01:00
Tobias Brunner
f337fe50f8 ikev2: Delay IKE key derivation until next message
In particular as responder, this delays costly cryptographic operations
until the IKE_AUTH (or the next IKE_INTERMEDIATE) request is received,
which is preferable to reduce the impact of DoS attacks.

Another advantage is that the key material is not changed until all tasks
built or processed a message so e.g. IntAuth can be calculated with the
current keys without issues.
2021-12-27 11:41:16 +01:00
Andreas Steffen
a392a79909 vici: Increase maximum proposal length 2021-12-27 11:41:16 +01:00
Andreas Steffen
15c6df4500 oqs: Updated Falcon sig tests to liboqs-0.5.0 2021-12-27 11:41:16 +01:00
Andreas Steffen
19223c4421 oqs: Upgraded Dilithium to NIST Round 3.1 2021-12-27 11:41:16 +01:00
Andreas Steffen
915963e6d5 test-vectors: No changes for Saber KE NIST Round 3 tests 2021-12-27 11:41:16 +01:00
Andreas Steffen
8bb4acfb24 oqs: Support for HQC key exchange algorithm 2021-12-27 11:41:16 +01:00
Andreas Steffen
5c672bc273 test-vectors: Upgraded Kyber KE tests to NIST Round 3 2021-12-27 11:41:16 +01:00
Andreas Steffen
4b6a78b281 test-vectors: Upgraded NTRU KE tests to NIST Round 3 2021-12-27 11:41:16 +01:00
Andreas Steffen
a9f182a60b oqs: Support of Falcon signature algorithms 2021-12-27 11:41:16 +01:00
Andreas Steffen
e6c7a9d0fb oqs: Complete post-quantum signature support 2021-12-27 11:41:16 +01:00
Andreas Steffen
903717dd5c ntru: Removed legacy NTRU key exchange method 2021-12-27 11:41:16 +01:00
Andreas Steffen
759e519fdd newhope: Removed legacy Newhope key exchange method 2021-12-27 11:41:15 +01:00
Andreas Steffen
d14b0a970c bliss: Removed legacy BLISS signatures 2021-12-27 11:41:15 +01:00
Andreas Steffen
05af328067 oqs: Added signature tests 2021-12-27 11:41:15 +01:00
Andreas Steffen
ca19d5ec49 oqs: Postponed freeing of kem object 2021-12-27 11:41:15 +01:00
Andreas Steffen
d1f97c173e oqs: Support of Dilithium signature algorithms 2021-12-27 11:41:15 +01:00
Andreas Steffen
32d5e8f669 oqs: Update to NIST round 3 KEM candidates 2021-12-27 11:41:15 +01:00
Andreas Steffen
25ceda02ab oqs: Removed BIKE round 1 version including test vectors 2021-12-27 11:41:15 +01:00
Andreas Steffen
dabc9f1fd4 wip: ikev2: Change multi-KE codepoints for testing 2021-12-27 11:41:15 +01:00
Andreas Steffen
0aae412d34 vici: List additional key exchanges
Co-authored-by: Tobias Brunner <tobias@strongswan.org>
2021-12-27 11:41:15 +01:00
Andreas Steffen
c6e8615adc frodo: FrodoKEM KE method 2021-12-27 11:41:15 +01:00
Andreas Steffen
f67326101f oqs: Added post-quantum KEM methods based on liboqs 2021-12-27 11:41:15 +01:00
Andreas Steffen
de30be4e5c test-vectors: Added NIST KEM test vectors 2021-12-27 11:41:15 +01:00
Andreas Steffen
75f3591749 key-exchange: Joint ke_test_vector format for DH and KEM
Both Diffie-Hellman (DH) and Key Encapsulation Mechanism (KEM) based
key exchange methods use a common ke_test_vector format. The
set_seed() function is used to provide deterministic private key
material for the crypto tests.
2021-12-27 11:41:15 +01:00
Andreas Steffen
08704351aa key-exchange: Added NIST round 2 submission KEM candidates 2021-12-27 11:41:15 +01:00
Tobias Brunner
d7c6b7f249 wip: ike-init: Indicate support for IKE_INTERMEDIATE
wip: Not strictly necessary. I guess we should also add some checks if
the notify was not received.
2021-12-27 11:41:15 +01:00
Tobias Brunner
65f7432319 proposal: Prevent selection of duplicate key exchange methods
All additional (and the initial) key exchanges must use a different method.
2021-12-27 11:41:15 +01:00
Tobias Brunner
0df42b3ba2 proposal: Add helper to check if additional key exchanges are contained 2021-12-27 11:41:15 +01:00
Tobias Brunner
b831175d1b proposal: Accept NONE for additional key exchanges also for IKE proposals 2021-12-27 11:41:15 +01:00
Tobias Brunner
1c361c6156 unit-tests: Add tests for CHILD_SA rekeying with multiple key exchanges 2021-12-27 11:41:15 +01:00
Tobias Brunner
71fc950002 unit-tests: Add tests for CHILD_SA creation with multiple key exchanges 2021-12-27 11:41:15 +01:00
Tobias Brunner
532db090e9 unit-tests: Tests for additional key exchanges 2021-12-27 11:41:15 +01:00
Tobias Brunner
d0053e1b09 unit-tests: Support multiple proposals in exchange tests 2021-12-27 11:41:15 +01:00
Tobias Brunner
fb289a24be unit-tests: Hand out an actual shared secret in mock KE implementation
Makes key derivation a bit more realistic.
2021-12-27 11:41:15 +01:00
Tobias Brunner
cc70ebe44e proposal: Add prefix for additional key exchanges when logging proposals 2021-12-27 11:41:15 +01:00
Tobias Brunner
541ab616b8 key-exchange: Add dynamic parser for additional key exchange methods 2021-12-27 11:41:15 +01:00
Tobias Brunner
3830b9da13 child-rekey: Support CHILD_SA rekeying with multiple key exchanges 2021-12-27 11:41:15 +01:00
Tobias Brunner
7d3b882749 child-sa: Cache and forward actual initiator flag for outbound SA
Kernel interfaces (e.g. TKM) might rely on this flag to be correct.
2021-12-27 11:41:15 +01:00