Camellia low level API algorithm blocking.

This commit is contained in:
Dr. Stephen Henson 2008-09-21 11:21:43 +00:00
parent 7747c67861
commit 138f20433e
3 changed files with 19 additions and 0 deletions

View File

@ -87,6 +87,11 @@ struct camellia_key_st
typedef struct camellia_key_st CAMELLIA_KEY; typedef struct camellia_key_st CAMELLIA_KEY;
#ifdef OPENSSL_FIPS
int private_Camellia_set_key(const unsigned char *userKey, const int bits,
CAMELLIA_KEY *key);
#endif
int Camellia_set_key(const unsigned char *userKey, const int bits, int Camellia_set_key(const unsigned char *userKey, const int bits,
CAMELLIA_KEY *key); CAMELLIA_KEY *key);

View File

@ -52,11 +52,24 @@
#include <openssl/opensslv.h> #include <openssl/opensslv.h>
#include <openssl/camellia.h> #include <openssl/camellia.h>
#include "cmll_locl.h" #include "cmll_locl.h"
#include <openssl/crypto.h>
#ifdef OPENSSL_FIPS
#include <openssl/fips.h>
#endif
const char CAMELLIA_version[]="CAMELLIA" OPENSSL_VERSION_PTEXT; const char CAMELLIA_version[]="CAMELLIA" OPENSSL_VERSION_PTEXT;
int Camellia_set_key(const unsigned char *userKey, const int bits, int Camellia_set_key(const unsigned char *userKey, const int bits,
CAMELLIA_KEY *key) CAMELLIA_KEY *key)
#ifdef OPENSSL_FIPS
{
if (FIPS_mode())
FIPS_BAD_ABORT(CAMELLIA)
private_Camellia_set_key(userKey, bits, key);
}
int private_Camellia_set_key(const unsigned char *userKey, const int bits,
CAMELLIA_KEY *key)
#endif
{ {
if (!userKey || !key) if (!userKey || !key)
{ {

View File

@ -239,6 +239,7 @@ const EVP_CIPHER *EVP_##cname##_ecb(void) { return &cname##_ecb; }
#define CAST_set_key private_CAST_set_key #define CAST_set_key private_CAST_set_key
#define RC5_32_set_key private_RC5_32_set_key #define RC5_32_set_key private_RC5_32_set_key
#define BF_set_key private_BF_set_key #define BF_set_key private_BF_set_key
#define Camellia_set_key private_Camellia_set_key
#define idea_set_encrypt_key private_idea_set_encrypt_key #define idea_set_encrypt_key private_idea_set_encrypt_key
#define MD5_Init private_MD5_Init #define MD5_Init private_MD5_Init