Tobias Brunner
f88d824114
Fixed some typos, courtesy of codespell
2025-07-08 10:54:49 +02:00
Tobias Brunner
9fe58c83fb
proposal: Add supported KE methods to default ESP/AH proposals, but optional
...
This allows accepting clients that send proposals with non-optional KE
methods during rekeying, while still accepting clients that use the
previous non-KE default proposals.
2025-04-10 08:31:10 +02:00
Tobias Brunner
6cbd93838b
Add configure option to disable testing key exchange methods
...
If this is used, the functionality to set a private key/value/seed for
key exchange methods is removed (including from the interface to avoid
accidentally forgetting to wrap implementations and uses of set_seed()).
The set_seed() method is assigned outside the INIT() macro to avoid
potentially undefined behavior (preprocessing directives in macro
arguments).
The test done by the crypto tester is a simple functionality test.
2025-04-10 08:31:09 +02:00
Tobias Brunner and Thomas Egerer
e7848e36fa
ha: Add support to sync IKE and Child SAs with multiple key exchanges
...
Synchronization for the additional transforms in the IKE and Child SA
proposals is added. Details of the IKE_SA synchronization are changed
to support IKE_INTERMEDIATE exchanges that cause multiple HA_IKE_ADD
messages and key derivations. The cache has been extended to handle
multiple such messages.
Co-authored-by: Thomas Egerer <[email protected] >
2025-02-28 16:02:41 +01:00
Andreas Steffen
3b7c49bc31
mgf1: Support of RSA PSS with SHA3 hash
2024-11-22 14:05:36 +01:00
Andreas Steffen
1265d78cac
ntru: Remove legacy NTRU key exchange method
2024-11-22 14:05:36 +01:00
Andreas Steffen
8e3a373e18
newhope: Remove legacy Newhope key exchange method
2024-11-22 14:05:36 +01:00
Andreas Steffen
4833f29b15
bliss: Remove legacy BLISS signatures
2024-11-22 14:05:36 +01:00
Tobias Brunner
09636199e6
key-exchange: Document how the interface is used with KEMs
2024-11-21 14:26:35 +01:00
Andreas Steffen
40676786aa
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.
2024-11-21 14:26:35 +01:00
Tobias Brunner
47de9ef9a1
key-exchange: Add identifiers for ML-KEM algorithms
2024-11-21 14:26:35 +01:00
Tobias Brunner
12d2b6e2b4
key-exchange: Pass prefix array directly, not a pointer to it
2024-08-08 11:19:16 +02:00
Tobias Brunner
012d99ecf4
proposal: Prevent selection of duplicate key exchange methods
...
All additional (and the initial) key exchanges must use a different method.
2024-08-07 16:20:19 +02:00
Tobias Brunner
1d5e921911
proposal: Add helper to check if additional key exchanges are contained
2024-08-07 16:20:19 +02:00
Tobias Brunner
882ff93bfd
proposal: Accept NONE for additional key exchanges also for IKE proposals
2024-08-07 16:20:19 +02:00
Tobias Brunner
c5a6938b9e
proposal: Add prefix for additional key exchanges when logging proposals
2024-08-07 16:20:18 +02:00
Tobias Brunner
e05d86b27a
key-exchange: Add dynamic parser for additional key exchange methods
2024-08-07 16:20:18 +02:00
Tobias Brunner
c36eaf42da
key-exchange: Add helper to concatenate shared secrets of several key exchanges
2024-08-07 16:20:18 +02:00
Tobias Brunner
9cc5f4a511
proposal: Make all key exchange transforms optional in ESP/AH proposals
2024-08-07 16:20:18 +02:00
Tobias Brunner
fb6b8c833b
proposal: Skip all KE transforms if PROPOSAL_SKIP_KE given
2024-08-07 16:20:18 +02:00
Tobias Brunner
2e059e0c27
transform: Add helper to check if transform type negotiates key exchange
2024-08-07 16:20:18 +02:00
Tobias Brunner
22550bd262
transform: Add additional key exchange transform types
2024-08-07 16:20:18 +02:00
Tobias Brunner
14bd0bc743
Fixed some typos, courtesy of codespell
2023-11-14 10:11:16 +01:00
Tobias Brunner
f73d8699b3
crypto-tester: Fix build with DEBUG_LEVEL < 1
2023-05-08 14:06:43 +02:00
Tobias Brunner
0351b5af3b
key-exchange: Warn about costly operations in set_public_key()
2022-06-29 10:28:50 +02:00
Tobias Brunner
3bebf5bf8d
proposal: Generalize KE methods
2022-06-29 10:28:50 +02:00
Andreas Steffen
b7c167f972
Rename MODP_NONE to KE_NONE
2022-06-29 10:28:50 +02:00
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
5cf82de69a
proposal: Demote AES-XCBC/CMAC PRFs in default proposal
...
These are rarely used, so strictly propose HMAC-based PRFs first.
References strongswan/strongswan#1026
References strongswan/strongswan#1044
2022-05-10 09:04:42 +02:00
Tobias Brunner
37dbc87960
crypto: Add new KDF type for IKEv2 PRFs
2022-04-14 19:02:56 +02:00
Tobias Brunner
7bde56a9bc
crypto: Adapt kdf_t interface to support KDFs with fixed output length
2022-04-14 19:02:56 +02:00
Tobias Brunner
f535f1ed53
crypto: Remove unused prf_plus_t
2022-04-14 19:02:56 +02:00
Tobias Brunner
02f7d63e52
crypto-factory: Use actual plugin name when testing during construction
2022-04-14 18:54:24 +02:00
Tobias Brunner
0c6baa8997
crypto-tester: Add facility to test KDFs
2022-04-14 18:54:24 +02:00
Tobias Brunner
fbb0bdebe7
crypto-factory: Add constructor and methods to create KDFs
...
Using some arguments directly in the constructor will allow us to fall
back on other implementations.
2022-04-14 18:54:24 +02:00
Tobias Brunner
35ad267fce
pkcs5: Rename kdf_t to avoid conflict
2022-04-14 18:54:24 +02:00
Tobias Brunner
e93882c6a0
transform: Add private transform for KDFs
2022-04-14 18:54:24 +02:00
Tobias Brunner
40a09613d2
crypto: Add interface for key derivation functions
2022-04-14 18:54:24 +02:00
Tobias Brunner
963adc7637
xof: Fix typo in documentation for set_seed()
2022-02-17 16:34:56 +01:00
Martin Willi
956b25a4cc
proposal: Add ESN transform to default ESP AEAD proposal
...
The commit mentioned below adds an AES-GCM default proposal for ESP. That
proposal does not include any ESN or non-ESN transform to indicate if
extended sequence numbers are supported.
A standards-compliant peer will include one or more ESN support transforms,
and will be unable to select this proposal due to a proposal mismatch.
Fix the default AES-GCM proposal by adding a NO_ESN algorithm. While ESN has
been supported in the Linux kernel for a while, having it in the default
proposal can be problematic with kernel-libipsec or on other platforms.
Fixes: c7bef954ee ("proposal: Add AES-GCM to the ESP default AEAD proposal")
Closes strongswan/strongswan#868
2022-02-01 13:06:42 +01:00
Andreas Steffen
695a04d146
openssl: Support of AES-CFB encryption
2021-12-06 12:52:37 +01:00
Tobias Brunner
8b2b5a647b
proposal: Add aliases for AES-GCM/CCM without explicit ICV length
...
These are mapped to use the default, maximum ICV length of 16 bytes.
2021-02-12 14:35:23 +01:00
Tobias Brunner
85bde019d3
diffie-hellman: Classify x25519 and x448 as ECDH methods
2021-02-12 14:35:23 +01:00
Tobias Brunner
9514aa2dcc
diffie-hellman: Add enum names that match proposal keywords
2021-02-12 14:35:23 +01:00
Tobias Brunner
c7bef954ee
proposal: Add AES-GCM to the ESP default AEAD proposal
...
References #3461 .
2020-06-12 13:45:58 +02:00
Tobias Brunner
e630f2d373
proposal: Add IKEv1 transform number on which a proposal is based
2020-03-06 10:31:30 +01:00
Josh Soref
b3ab7a48cc
Spelling fixes
...
* accumulating
* acquire
* alignment
* appropriate
* argument
* assign
* attribute
* authenticate
* authentication
* authenticator
* authority
* auxiliary
* brackets
* callback
* camellia
* can't
* cancelability
* certificate
* choinyambuu
* chunk
* collector
* collision
* communicating
* compares
* compatibility
* compressed
* confidentiality
* configuration
* connection
* consistency
* constraint
* construction
* constructor
* database
* decapsulated
* declaration
* decrypt
* derivative
* destination
* destroyed
* details
* devised
* dynamic
* ecapsulation
* encoded
* encoding
* encrypted
* enforcing
* enumerator
* establishment
* excluded
* exclusively
* exited
* expecting
* expire
* extension
* filter
* firewall
* foundation
* fulfillment
* gateways
* hashing
* hashtable
* heartbeats
* identifier
* identifiers
* identities
* identity
* implementers
* indicating
* initialize
* initiate
* initiation
* initiator
* inner
* instantiate
* legitimate
* libraries
* libstrongswan
* logger
* malloc
* manager
* manually
* measurement
* mechanism
* message
* network
* nonexistent
* object
* occurrence
* optional
* outgoing
* packages
* packets
* padding
* particular
* passphrase
* payload
* periodically
* policies
* possible
* previously
* priority
* proposal
* protocol
* provide
* provider
* pseudo
* pseudonym
* public
* qualifier
* quantum
* quintuplets
* reached
* reading
* recommendation to
* recommendation
* recursive
* reestablish
* referencing
* registered
* rekeying
* reliable
* replacing
* representing
* represents
* request
* request
* resolver
* result
* resulting
* resynchronization
* retriable
* revocation
* right
* rollback
* rule
* rules
* runtime
* scenario
* scheduled
* security
* segment
* service
* setting
* signature
* specific
* specified
* speed
* started
* steffen
* strongswan
* subjectaltname
* supported
* threadsafe
* traffic
* tremendously
* treshold
* unique
* uniqueness
* unknown
* until
* upper
* using
* validator
* verification
* version
* version
* warrior
Closes strongswan/strongswan#164 .
2020-02-11 18:23:07 +01:00
Andreas Steffen
20f3d04b13
aesni: Added AES_ECB support
2019-11-28 17:03:08 +01:00
Andreas Steffen
11e9d2b8d1
drbg: The drbg instance owns the entropy rng
2019-11-28 09:55:56 +01:00