aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstrongswan/crypto
Commit message (Collapse)AuthorAgeFilesLines
...
* iv-gen: Add a generic constructor to create an IV gen from an algorithmMartin Willi2015-04-132-0/+69
|
* crypto-tester: Explicitly exclude FIPS-PRF from append mode testsMartin Willi2015-03-281-8/+11
| | | | | This was implicitly done by the seed length check before 58dda5d6, but we now require an explicit check to avoid that unsupported use.
* crypto-tester: Test set_key() after a doing a partial append on prf/signersMartin Willi2015-03-271-2/+20
| | | | | While that use is uncommon in real-world use, nonetheless should HMAC set a correct key and reset any underlying hasher.
* diffie-hellman: Verify public DH values in backendsMartin Willi2015-03-232-1/+82
|
* diffie-hellman: Add a bool return value to set_other_public_value()Martin Willi2015-03-231-1/+3
|
* diffie-hellman: Add a bool return value to get_my_public_value()Martin Willi2015-03-231-1/+3
|
* diffie-hellman: Use bool instead of status_t as get_shared_secret() return valueMartin Willi2015-03-231-2/+3
| | | | | While such a change is not unproblematic, keeping status_t makes the API inconsistent once we introduce return values for the public value operations.
* hash-algorithm-set: Add class to manage a set of hash algorithmsTobias Brunner2015-03-042-0/+189
|
* hasher: Add helper to determine hash algorithm from signature schemeTobias Brunner2015-03-042-0/+44
|
* hasher: Add filter function for algorithms permitted by RFC 7427Tobias Brunner2015-03-042-0/+30
|
* hasher: Redefine hash algorithms to match values defined by RFC 7427Tobias Brunner2015-03-042-27/+29
| | | | Other algorithms are defined in private use range.
* Allow SHA256 and SHA384 data hash for BLISS signatures.Andreas Steffen2015-02-261-0/+4
| | | | | The default is SHA512 since this hash function is also used for the c_indices random oracle.
* Fixed bad bit shift and sign extension errorsAndreas Steffen2014-12-231-6/+20
|
* crypto: Define MODP_CUSTOM outside of IKE DH rangeTobias Brunner2014-12-232-7/+10
| | | | | | | | | 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.
* mgf1: Use correct Doxygen groupsTobias Brunner2014-12-152-4/+4
|
* Fixed some typos, courtesy of codespellTobias Brunner2014-12-151-2/+2
|
* pkcs5: Add support for PBES2 encryption schemes other than 3DESTobias Brunner2014-12-051-8/+24
| | | | | | | | This allows using e.g. AES for PKCS#8 and PKCS#12 files. Some legacy schemes defined in RFC 2898 are not supported (like RC2). Fixes #740.
* asn1: Add OID for Blowfish CBCTobias Brunner2014-12-051-0/+7
| | | | | | | | The OID (1.3.6.1.4.1.3029.1.2) is technically not correct, the correct one is (1.3.6.1.4.1.3029.1.1.2). Every other library or tool (like OpenSSL) uses the incorrect one so we do the same. References #740.
* diffie-hellman: Handle dh_exponent_ansi_x9_42 as a boolean settingMartin Willi2014-12-051-2/+2
| | | | | | | | | | | | | 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.
* Implemented get_byte() method for mgf1_bitspender classAndreas Steffen2014-11-292-18/+61
| | | | | | The new get_byte() method returns a pseudo-random byte at a time. Changed the get_bits() interface to the same interface as get_byte(). Updated the mgf1 unit-tests accordingly.
* Started implementing BLISS signature generationAndreas Steffen2014-11-291-0/+8
|
* Implemented bitspender based on the MGF1 mask generator functionAndreas Steffen2014-11-293-1/+219
|
* Moved mgf1 class to libstrongswan/crypto/mgf1Andreas Steffen2014-11-292-0/+257
|
* diffie-hellman: Explicitly initialize DH exponent sizes during initializationMartin Willi2014-08-252-8/+36
| | | | | | | | 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.
* crypto-factory: Only sort RNGs by algorithm identifierTobias Brunner2014-06-201-5/+13
| | | | | Others remain in the order in which they were added, grouped by algorithm identifier and sorted by benchmarking speed, if provided.
* windows: Check for clock_gettime() function itself as wellMartin Willi2014-06-041-1/+1
| | | | | CLOCK_THREAD_CPUTIME_ID seems to be defined sometimes even if clock_gettime() is missing.
* windows: Add a common Windows header for platform specific wrappersMartin Willi2014-06-031-2/+4
| | | | | Include some more basic system headers in utils.h, so we can use that common header on the different platforms.
* enum: Don't directly include enum.hMartin Willi2014-05-161-1/+1
| | | | | To allow enum.h to depend on utils.h definitions, avoid its direct inclusion. Instead include utils.h, which includes enum.h as well.
* aead: Support custom AEAD salt sizesMartin Willi2014-03-315-13/+32
| | | | | | | | | The salt, or often called implicit nonce, varies between AEAD algorithms and their use in protocols. For IKE and ESP, GCM uses 4 bytes, while CCM uses 3 bytes. With TLS, however, AEAD mode uses 4 bytes for both GCM and CCM. Our GCM backends currently support 4 bytes and CCM 3 bytes only. This is fine until we go for CCM mode support in TLS, which requires 4 byte nonces.
* crypto-tester: Don't fail if key size is not supportedTobias Brunner2014-03-201-6/+3
| | | | | | | | The Blowfish and Twofish implementations provided by the gcrypt plugin only support specific key lengths, which we don't know when testing against vectors (either during unit tests or during algorithm registration). The on_create test with a specific key length will be skipped anyway, so there is no point in treating this failure differently.
* unit-tests: Actually verify registered algorithms against test vectorsTobias Brunner2014-03-201-1/+38
| | | | | | | | Previously, the {ns}.crypto_test.on_add option had to be enabled to actually test the algorithms, which we can't enforce for the tests in the test_runner as the option is already read when the crypto factory is initialized. Even so, we wouldn't want to do this for every unit test, which would be the result of enabling that option.
* lib: All settings use configured namespaceTobias Brunner2014-02-123-8/+8
|
* proposal: Add possibility to register custom proposal keyword parserThomas Egerer2014-01-202-2/+66
| | | | | | | | | If a proposal string cannot be matched to a token using strcmp (e.g. if you want to register a whole class of algorithms containing their ID, like my_alg_2342), you can use the provided function to register a parser that transforms the given string into a proposal token. Signed-off-by: Thomas Egerer <thomas.egerer@secunet.com>
* Prototype implementation of IKE key exchange via NTRU encryptionAndreas Steffen2013-11-273-3/+17
|
* ecc: Added ECC Brainpool ECDH groups as registered with IANAAndreas Steffen2013-10-173-3/+20
|
* Revert refactoring which broke CentOS buildAndreas Steffen2013-10-131-1/+1
|
* iv_gen: Mask sequential IVs with a random saltTobias Brunner2013-10-111-0/+24
| | | | | This makes it harder to attack a HA setup, even if the sequence numbers were not fully in sync.
* iv_gen: Provide external sequence number (IKE, ESP)Tobias Brunner2013-10-113-17/+10
| | | | This prevents duplicate sequential IVs in case of a HA failover.
* iv_gen: aead_t implementations provide an IV generatorTobias Brunner2013-10-112-1/+30
|
* iv_gen: Add IV generator that allocates IVs sequentiallyTobias Brunner2013-10-112-0/+119
|
* iv_gen: Add IV generator that allocates IVs randomlyTobias Brunner2013-10-112-0/+111
| | | | Uses RNG_WEAK as the code currently does elsewhere to allocate IVs.
* crypto: Add generic interface for IV generatorsTobias Brunner2013-10-111-0/+59
|
* apidoc: Move mac_prf to prf Doxygen groupTobias Brunner2013-10-111-1/+1
|
* crypto-factory: Try next available RNG implementation if constructor failsTobias Brunner2013-10-111-13/+6
|
* crypto-factory: Order entries by algorithm identifier and (optionally) speedTobias Brunner2013-10-111-22/+18
|
* Remove HASH_PREFERRED, usages are replaced with HASH_SHA1, which is required ↵Tobias Brunner2013-10-114-18/+10
| | | | for IKEv2 anyway
* pkcs5: Add missing break statements when checking crypto primitivesTobias Brunner2013-07-241-0/+2
|
* Fix various API doc issues and typosTobias Brunner2013-07-181-2/+2
| | | | Partially based on an old patch by Adrian-Ken Rueegsegger.
* crypto-factory: count the number of test vector failures during registrationMartin Willi2013-06-212-30/+73
|
* Added missing string for full-length HMAC-SHA512 signerTobias Brunner2013-06-101-0/+1
|