diff options
| author | djm <> | 2012-10-13 21:23:50 +0000 |
|---|---|---|
| committer | djm <> | 2012-10-13 21:23:50 +0000 |
| commit | d56dbc3c72494d4b68c03f5bcc3ae1f9df7b17df (patch) | |
| tree | 10ebe51c3542099b0ab8325d8f322372375dc3b4 /src/lib/libcrypto/camellia | |
| parent | bc685bd401e5657f7fb51b4e1a62a7a5c5ea4098 (diff) | |
| parent | 228cae30b117c2493f69ad3c195341cd6ec8d430 (diff) | |
| download | openbsd-d56dbc3c72494d4b68c03f5bcc3ae1f9df7b17df.tar.gz openbsd-d56dbc3c72494d4b68c03f5bcc3ae1f9df7b17df.tar.bz2 openbsd-d56dbc3c72494d4b68c03f5bcc3ae1f9df7b17df.zip | |
This commit was generated by cvs2git to track changes on a CVS vendor
branch.
Diffstat (limited to 'src/lib/libcrypto/camellia')
| -rw-r--r-- | src/lib/libcrypto/camellia/asm/cmll-x86.pl | 6 | ||||
| -rw-r--r-- | src/lib/libcrypto/camellia/camellia.h | 4 | ||||
| -rw-r--r-- | src/lib/libcrypto/camellia/cmll_locl.h | 5 | ||||
| -rw-r--r-- | src/lib/libcrypto/camellia/cmll_misc.c | 3 |
4 files changed, 13 insertions, 5 deletions
diff --git a/src/lib/libcrypto/camellia/asm/cmll-x86.pl b/src/lib/libcrypto/camellia/asm/cmll-x86.pl index 027302ac86..c314d62312 100644 --- a/src/lib/libcrypto/camellia/asm/cmll-x86.pl +++ b/src/lib/libcrypto/camellia/asm/cmll-x86.pl | |||
| @@ -723,11 +723,11 @@ my $bias=int(@T[0])?shift(@T):0; | |||
| 723 | &function_end("Camellia_Ekeygen"); | 723 | &function_end("Camellia_Ekeygen"); |
| 724 | 724 | ||
| 725 | if ($OPENSSL) { | 725 | if ($OPENSSL) { |
| 726 | # int Camellia_set_key ( | 726 | # int private_Camellia_set_key ( |
| 727 | # const unsigned char *userKey, | 727 | # const unsigned char *userKey, |
| 728 | # int bits, | 728 | # int bits, |
| 729 | # CAMELLIA_KEY *key) | 729 | # CAMELLIA_KEY *key) |
| 730 | &function_begin_B("Camellia_set_key"); | 730 | &function_begin_B("private_Camellia_set_key"); |
| 731 | &push ("ebx"); | 731 | &push ("ebx"); |
| 732 | &mov ("ecx",&wparam(0)); # pull arguments | 732 | &mov ("ecx",&wparam(0)); # pull arguments |
| 733 | &mov ("ebx",&wparam(1)); | 733 | &mov ("ebx",&wparam(1)); |
| @@ -760,7 +760,7 @@ if ($OPENSSL) { | |||
| 760 | &set_label("done",4); | 760 | &set_label("done",4); |
| 761 | &pop ("ebx"); | 761 | &pop ("ebx"); |
| 762 | &ret (); | 762 | &ret (); |
| 763 | &function_end_B("Camellia_set_key"); | 763 | &function_end_B("private_Camellia_set_key"); |
| 764 | } | 764 | } |
| 765 | 765 | ||
| 766 | @SBOX=( | 766 | @SBOX=( |
diff --git a/src/lib/libcrypto/camellia/camellia.h b/src/lib/libcrypto/camellia/camellia.h index cf0457dd97..67911e0adf 100644 --- a/src/lib/libcrypto/camellia/camellia.h +++ b/src/lib/libcrypto/camellia/camellia.h | |||
| @@ -88,6 +88,10 @@ struct camellia_key_st | |||
| 88 | }; | 88 | }; |
| 89 | typedef struct camellia_key_st CAMELLIA_KEY; | 89 | typedef struct camellia_key_st CAMELLIA_KEY; |
| 90 | 90 | ||
| 91 | #ifdef OPENSSL_FIPS | ||
| 92 | int private_Camellia_set_key(const unsigned char *userKey, const int bits, | ||
| 93 | CAMELLIA_KEY *key); | ||
| 94 | #endif | ||
| 91 | int Camellia_set_key(const unsigned char *userKey, const int bits, | 95 | int Camellia_set_key(const unsigned char *userKey, const int bits, |
| 92 | CAMELLIA_KEY *key); | 96 | CAMELLIA_KEY *key); |
| 93 | 97 | ||
diff --git a/src/lib/libcrypto/camellia/cmll_locl.h b/src/lib/libcrypto/camellia/cmll_locl.h index 4a4d880d16..246b6ce1d8 100644 --- a/src/lib/libcrypto/camellia/cmll_locl.h +++ b/src/lib/libcrypto/camellia/cmll_locl.h | |||
| @@ -71,7 +71,8 @@ | |||
| 71 | typedef unsigned int u32; | 71 | typedef unsigned int u32; |
| 72 | typedef unsigned char u8; | 72 | typedef unsigned char u8; |
| 73 | 73 | ||
| 74 | int Camellia_Ekeygen(int keyBitLength, const u8 *rawKey, KEY_TABLE_TYPE keyTable); | 74 | int Camellia_Ekeygen(int keyBitLength, const u8 *rawKey, |
| 75 | KEY_TABLE_TYPE keyTable); | ||
| 75 | void Camellia_EncryptBlock_Rounds(int grandRounds, const u8 plaintext[], | 76 | void Camellia_EncryptBlock_Rounds(int grandRounds, const u8 plaintext[], |
| 76 | const KEY_TABLE_TYPE keyTable, u8 ciphertext[]); | 77 | const KEY_TABLE_TYPE keyTable, u8 ciphertext[]); |
| 77 | void Camellia_DecryptBlock_Rounds(int grandRounds, const u8 ciphertext[], | 78 | void Camellia_DecryptBlock_Rounds(int grandRounds, const u8 ciphertext[], |
| @@ -80,4 +81,6 @@ void Camellia_EncryptBlock(int keyBitLength, const u8 plaintext[], | |||
| 80 | const KEY_TABLE_TYPE keyTable, u8 ciphertext[]); | 81 | const KEY_TABLE_TYPE keyTable, u8 ciphertext[]); |
| 81 | void Camellia_DecryptBlock(int keyBitLength, const u8 ciphertext[], | 82 | void Camellia_DecryptBlock(int keyBitLength, const u8 ciphertext[], |
| 82 | const KEY_TABLE_TYPE keyTable, u8 plaintext[]); | 83 | const KEY_TABLE_TYPE keyTable, u8 plaintext[]); |
| 84 | int private_Camellia_set_key(const unsigned char *userKey, const int bits, | ||
| 85 | CAMELLIA_KEY *key); | ||
| 83 | #endif /* #ifndef HEADER_CAMELLIA_LOCL_H */ | 86 | #endif /* #ifndef HEADER_CAMELLIA_LOCL_H */ |
diff --git a/src/lib/libcrypto/camellia/cmll_misc.c b/src/lib/libcrypto/camellia/cmll_misc.c index f44689124b..f44d48564c 100644 --- a/src/lib/libcrypto/camellia/cmll_misc.c +++ b/src/lib/libcrypto/camellia/cmll_misc.c | |||
| @@ -50,12 +50,13 @@ | |||
| 50 | */ | 50 | */ |
| 51 | 51 | ||
| 52 | #include <openssl/opensslv.h> | 52 | #include <openssl/opensslv.h> |
| 53 | #include <openssl/crypto.h> | ||
| 53 | #include <openssl/camellia.h> | 54 | #include <openssl/camellia.h> |
| 54 | #include "cmll_locl.h" | 55 | #include "cmll_locl.h" |
| 55 | 56 | ||
| 56 | const char CAMELLIA_version[]="CAMELLIA" OPENSSL_VERSION_PTEXT; | 57 | const char CAMELLIA_version[]="CAMELLIA" OPENSSL_VERSION_PTEXT; |
| 57 | 58 | ||
| 58 | int Camellia_set_key(const unsigned char *userKey, const int bits, | 59 | int private_Camellia_set_key(const unsigned char *userKey, const int bits, |
| 59 | CAMELLIA_KEY *key) | 60 | CAMELLIA_KEY *key) |
| 60 | { | 61 | { |
| 61 | if(!userKey || !key) | 62 | if(!userKey || !key) |
