summaryrefslogtreecommitdiffstats
path: root/providers
AgeCommit message (Collapse)Author
2019-09-12Fix no-engineMatt Caswell
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9863)
2019-09-12Fix no-dsaMatt Caswell
Also fixes no-dh Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9861)
2019-09-11Add EVP_CIPHER_CTX_tag_length()Shane Lontis
There is no deprecated CTRL support for this new field. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9698)
2019-09-11Register KDF's using their name macros rather than stringsPauli
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9814)
2019-09-11Make FIPS provider use KDF name for PBKDF2Pauli
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9814)
2019-09-11Coverity 1453634: Resource leaks (RESOURCE_LEAK)Pauli
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de> (Merged from https://github.com/openssl/openssl/pull/9805)
2019-09-11Coverity 1453633: Error handling issues (CHECKED_RETURN)Pauli
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de> (Merged from https://github.com/openssl/openssl/pull/9805)
2019-09-11Coverity 1453630: Null pointer dereferences (FORWARD_NULL)Pauli
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de> (Merged from https://github.com/openssl/openssl/pull/9805)
2019-09-09Revise EVP_PKEY param handlingMatt Caswell
We add new functions for getting parameters and discovering the gettable and settable parameters. We also make EVP_PKEY_CTX_get_signature_md() a function and implement it in terms of the new functions. This enables applications to discover the set of parameters that are supported for a given algorithm implementation. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9753)
2019-09-09Add support for verify/verify_recover functions to EVP_SIGNATUREMatt Caswell
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9753)
2019-09-09Implement DSA in the default providerMatt Caswell
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9753)
2019-09-07Use common digest getter for X942 KDFPauli
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9770)
2019-09-07Use common digest getter for SSH KDFPauli
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9770)
2019-09-07Use common digest getter for TLS1 PRFPauli
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9770)
2019-09-07Use common digest getter for single step KDFPauli
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9770)
2019-09-07Use common digest getter for PBKDF2Pauli
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9770)
2019-09-07Use common digest getter for HKDFPauli
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9770)
2019-09-07KMAC using common digest get codePauli
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9770)
2019-09-07HMAC using common digest get codePauli
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9770)
2019-09-07GMAC using common cipher get codePauli
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9770)
2019-09-07CMAC using common cipher get codePauli
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9770)
2019-09-07Unify the digest getting code inside providers.Pauli
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9770)
2019-09-06PBKDF2 implementation: refactor to avoid memleakRichard Levitte
Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/9662)
2019-09-06Fix memleaks in KDF implementationsRichard Levitte
Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/9662)
2019-09-06KDF error codes reworkedPauli
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9662)
2019-09-06Add KDFs to providersPauli
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9662)
2019-09-06Move KDFs to the provider.Pauli
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9662)
2019-09-05Change provider params from int to size_tShane Lontis
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9699)
2019-09-04New function EVP_CIPHER_free()Richard Levitte
This function re-implements EVP_CIPHER_meth_free(), but has a name that isn't encumbered by legacy EVP_CIPHER construction functionality. We also refactor most of EVP_CIPHER_meth_new() into an internal evp_cipher_new() that's used when creating fetched methods. EVP_CIPHER_meth_new() and EVP_CIPHER_meth_free() are rewritten in terms of evp_cipher_new() and EVP_CIPHER_free(). This means that at any time, we can deprecate all the EVP_CIPHER_meth_ functions with no harmful consequence. Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/9758)
2019-09-04New function EVP_MD_free()Richard Levitte
This function re-implements EVP_MD_meth_free(), but has a name that isn't encumbered by legacy EVP_MD construction functionality. We also refactor most of EVP_MD_meth_new() into an internal evp_md_new() that's used when creating fetched methods. EVP_MD_meth_new() and EVP_MD_meth_free() are rewritten in terms of evp_md_new() and EVP_MD_free(). This means that at any time, we can deprecate all the EVP_MD_meth_ functions with no harmful consequence. Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/9758)
2019-09-01Fix platform specific issues with provider ciphersShane Lontis
s390_aes naming issues with ofb128 and cfb128 Solaris missing include for camellia. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9702)
2019-08-29Fix no-engineMatt Caswell
Make sure references to ENGINE functions are appropriately guarded. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9720)
2019-08-29Fix no-cmacMatt Caswell
Don't include files that we don't want to build Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9718)
2019-08-29Fix no-poly1305, no-siphash and no-blake2Matt Caswell
Make sure we don't include files that we don't need if we've disabled them. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9717)
2019-08-29Fix no-desMatt Caswell
Don't refer to cipher functions in the providers that have been compiled out. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9719)
2019-08-27Coverty fixes for MACsRichard Levitte
Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/9700)
2019-08-26Cleanup ciphers and Add 3des ciphers.Shane Lontis
Moved the relevant ciphers into default and restructed headers to allow the move. This removed most of the cases of #ifdef NO_XXX (which are now specified in build.info) Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9482)
2019-08-25Fix Issue OSS-Fuzz: Branch on uninitialized memory (in ccm code).Shane Lontis
This would also happen for aes-ccm. There was one branch path where it just returned 1 without setting *padlen, It now branches so that the value is set to 0. Fixes #9691 Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de> (Merged from https://github.com/openssl/openssl/pull/9692)
2019-08-24Get rid of the diversity of names for MAC parametersRichard Levitte
The EVP_PKEY MAC implementations had a diversity of controls that were really the same thing. We did reproduce that for the provider based MACs, but are changing our minds on this. Instead of that, we now use one parameter name for passing the name of the underlying ciphers or digests to a MAC implementation, "cipher" and "digest", and one parameter name for passing the output size of the MAC, "size". Then we leave it to the EVP_PKEY->EVP_MAC bridge to translate "md" to "digest", and "digestsize" to "size". Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/9667)
2019-08-22Add basic aria and camellia ciphers modes to default providerShane Lontis
The aes code has been refactored into generic and algorithn specific parts, so that most of the code can be shared. The cipher related files have been broken up into smaller parts. Add chunked variant of mode ciphers - aria uses this (many other ciphers will use this new code instead of the generic code used by aes). Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9451)
2019-08-20cleanup provider digestsShane Lontis
Added some missing #ifdef NO_XXX around some of the digest functions. Renamed core_mkdigest.h to digestcommon.h Added ERR_raise() to set/get params for digest. Moved common code for get_params/gettable_params into digest_common.c Renamed #defines in digestcommon. Removed null_prov.c (It should not be needed) Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9625)
2019-08-20Add aes_ccm to providerShane Lontis
Add Cleanups for gcm - based on the changes to ccm. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Patrick Steuer <patrick.steuer@de.ibm.com> (Merged from https://github.com/openssl/openssl/pull/9280)
2019-08-19Use macros internally for algorithm namesRichard Levitte
The macros are defined in include/openssl/core_names.h and follow the naming standard OSSL_{OPNAME}_NAME_{ALGONAME}, where {OPNAME} is the name of the operation (such as MAC) and {ALGONAME} is the name of the algorithm. Example: OSSL_MAC_NAME_HMAC Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/9635)
2019-08-19cipher cleanups.Shane Lontis
Add test to evp_test_extra for ciphers (that is similiar to the digest_fetch). Move some of the aes and gcm methods that can be shared with other ciphers into ciphers_common.c Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9580)
2019-08-19Add fips provider code for handling self test dataShane Lontis
More PR's related to self test will be derived from this PR. Note: the code removed in core_get_params() was causing a freeze since the fips module was being loaded from a config file, which then called core_get_params() which then tried to init the config fle again... Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9596)
2019-08-18Directly return from final sha3/keccak_final if no bytes are requestedPatrick Steuer
Requesting zero bytes from shake previously led to out-of-bounds write on some platforms. Signed-off-by: Patrick Steuer <patrick.steuer@de.ibm.com> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9433)
2019-08-16Rename ctx_{get,set}_params to {get,set}_ctx_paramsRichard Levitte
Recently, we added dispatched functions to get parameter descriptions, and those for operation context parameters ended up being called something_gettable_ctx_params and something_settable_ctx_params. The corresponding dispatched functions to actually perform parameter transfers were previously called something_ctx_get_params and something_ctx_set_params, which doesn't quite match, so we rename them to something_get_ctx_params and something_set_ctx_params. An argument in favor of this name change is English, where you'd rather say something like "set the context parameters". This only change the libcrypto <-> provider interface. Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/9612)
2019-08-15Rename the hash implementations KMAC{128,256} to KECCAK_KMAC{128,256}Richard Levitte
This avoids getting them confused with the MAC implementations. Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/8877)
2019-08-15Adjust some provider reason codesRichard Levitte
BLAKE2 MACs came with a set of new reason codes. Those talking about lengths are consistently called PROV_R_INVALID_FOO_LENGTH, for any name FOO. The cipher messages were briefer. In the interest of having more humanly readable messages, we adjust the reasons used by the ciphers (that's just IV length and key length). Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/8877)
2019-08-15Move Poly1305 to providersRichard Levitte
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/8877)