From 2d0b44126763f989a4cbffbffe9d0c7518158bb7 Mon Sep 17 00:00:00 2001 From: Bill Cox Date: Wed, 9 Mar 2016 23:08:31 +0100 Subject: Add blake2 support. Reviewed-by: Andy Polyakov Reviewed-by: Rich Salz --- include/openssl/evp.h | 4 ++++ include/openssl/obj_mac.h | 10 ++++++++++ include/openssl/objects.h | 10 ++++++++++ 3 files changed, 24 insertions(+) (limited to 'include') diff --git a/include/openssl/evp.h b/include/openssl/evp.h index 4516db130e..c5598133e3 100644 --- a/include/openssl/evp.h +++ b/include/openssl/evp.h @@ -700,6 +700,10 @@ const EVP_MD *EVP_md4(void); const EVP_MD *EVP_md5(void); const EVP_MD *EVP_md5_sha1(void); # endif +# ifndef OPENSSL_NO_BLAKE2 +const EVP_MD *EVP_blake2b(void); +const EVP_MD *EVP_blake2s(void); +# endif const EVP_MD *EVP_sha1(void); const EVP_MD *EVP_sha224(void); const EVP_MD *EVP_sha256(void); diff --git a/include/openssl/obj_mac.h b/include/openssl/obj_mac.h index 4725a6c574..28d9637735 100644 --- a/include/openssl/obj_mac.h +++ b/include/openssl/obj_mac.h @@ -2078,6 +2078,16 @@ #define NID_ripemd160WithRSA 119 #define OBJ_ripemd160WithRSA 1L,3L,36L,3L,3L,1L,2L +#define SN_blake2b "BLAKE2b" +#define LN_blake2b "blake2b" +#define NID_blake2b 1056 +#define OBJ_blake2b 1L,3L,6L,1L,4L,1L,1722L,12L,2L,1L,16L + +#define SN_blake2s "BLAKE2s" +#define LN_blake2s "blake2s" +#define NID_blake2s 1057 +#define OBJ_blake2s 1L,3L,6L,1L,4L,1L,1722L,12L,2L,2L,8L + #define SN_sxnet "SXNetID" #define LN_sxnet "Strong Extranet ID" #define NID_sxnet 143 diff --git a/include/openssl/objects.h b/include/openssl/objects.h index 05bc9b0248..7766f3a32f 100644 --- a/include/openssl/objects.h +++ b/include/openssl/objects.h @@ -642,6 +642,16 @@ # define NID_ripemd160WithRSA 119 # define OBJ_ripemd160WithRSA 1L,3L,36L,3L,3L,1L,2L +# define SN_blake2b "BLAKE2b" +# define LN_blake2b "blake2b" +# define NID_blake2b 1022 +# define OBJ_blake2b 1,3,6,1,4,1,1722,12,2,1,16 + +# define SN_blake2s "BLAKE2s" +# define LN_blake2s "blake2" +# define NID_blake2s 1023 +# define OBJ_blake2s 1,3,6,1,4,1,1722,12,2,2,8 + /*- * Taken from rfc2040 * RC5_CBC_Parameters ::= SEQUENCE { -- cgit v1.2.3