diff options
Diffstat (limited to 'src/lib/libcrypto/camellia/cmll_cfb.c')
| -rw-r--r-- | src/lib/libcrypto/camellia/cmll_cfb.c | 49 |
1 files changed, 27 insertions, 22 deletions
diff --git a/src/lib/libcrypto/camellia/cmll_cfb.c b/src/lib/libcrypto/camellia/cmll_cfb.c index 17e6cca332..755ab9f8bf 100644 --- a/src/lib/libcrypto/camellia/cmll_cfb.c +++ b/src/lib/libcrypto/camellia/cmll_cfb.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: cmll_cfb.c,v 1.3 2014/06/12 15:49:28 deraadt Exp $ */ | 1 | /* $OpenBSD: cmll_cfb.c,v 1.4 2014/11/13 20:01:58 miod Exp $ */ |
| 2 | /* ==================================================================== | 2 | /* ==================================================================== |
| 3 | * Copyright (c) 2006 The OpenSSL Project. All rights reserved. | 3 | * Copyright (c) 2006 The OpenSSL Project. All rights reserved. |
| 4 | * | 4 | * |
| @@ -109,31 +109,36 @@ | |||
| 109 | #include <openssl/modes.h> | 109 | #include <openssl/modes.h> |
| 110 | 110 | ||
| 111 | 111 | ||
| 112 | /* The input and output encrypted as though 128bit cfb mode is being | 112 | /* |
| 113 | * The input and output encrypted as though 128bit cfb mode is being | ||
| 113 | * used. The extra state information to record how much of the | 114 | * used. The extra state information to record how much of the |
| 114 | * 128bit block we have used is contained in *num; | 115 | * 128bit block we have used is contained in *num; |
| 115 | */ | 116 | */ |
| 116 | 117 | ||
| 117 | void Camellia_cfb128_encrypt(const unsigned char *in, unsigned char *out, | 118 | void |
| 118 | size_t length, const CAMELLIA_KEY *key, | 119 | Camellia_cfb128_encrypt(const unsigned char *in, unsigned char *out, |
| 119 | unsigned char *ivec, int *num, const int enc) | 120 | size_t length, const CAMELLIA_KEY *key, unsigned char *ivec, int *num, |
| 120 | { | 121 | const int enc) |
| 121 | 122 | { | |
| 122 | CRYPTO_cfb128_encrypt(in,out,length,key,ivec,num,enc,(block128_f)Camellia_encrypt); | 123 | CRYPTO_cfb128_encrypt(in, out, length, key, ivec, num, enc, |
| 123 | } | 124 | (block128_f)Camellia_encrypt); |
| 125 | } | ||
| 124 | 126 | ||
| 125 | /* N.B. This expects the input to be packed, MS bit first */ | 127 | /* N.B. This expects the input to be packed, MS bit first */ |
| 126 | void Camellia_cfb1_encrypt(const unsigned char *in, unsigned char *out, | 128 | void |
| 127 | size_t length, const CAMELLIA_KEY *key, | 129 | Camellia_cfb1_encrypt(const unsigned char *in, unsigned char *out, |
| 128 | unsigned char *ivec, int *num, const int enc) | 130 | size_t length, const CAMELLIA_KEY *key, unsigned char *ivec, int *num, |
| 129 | { | 131 | const int enc) |
| 130 | CRYPTO_cfb128_1_encrypt(in,out,length,key,ivec,num,enc,(block128_f)Camellia_encrypt); | 132 | { |
| 131 | } | 133 | CRYPTO_cfb128_1_encrypt(in, out, length, key, ivec, num, enc, |
| 132 | 134 | (block128_f)Camellia_encrypt); | |
| 133 | void Camellia_cfb8_encrypt(const unsigned char *in, unsigned char *out, | 135 | } |
| 134 | size_t length, const CAMELLIA_KEY *key, | ||
| 135 | unsigned char *ivec, int *num, const int enc) | ||
| 136 | { | ||
| 137 | CRYPTO_cfb128_8_encrypt(in,out,length,key,ivec,num,enc,(block128_f)Camellia_encrypt); | ||
| 138 | } | ||
| 139 | 136 | ||
| 137 | void | ||
| 138 | Camellia_cfb8_encrypt(const unsigned char *in, unsigned char *out, | ||
| 139 | size_t length, const CAMELLIA_KEY *key, unsigned char *ivec, int *num, | ||
| 140 | const int enc) | ||
| 141 | { | ||
| 142 | CRYPTO_cfb128_8_encrypt(in, out, length, key, ivec, num, enc, | ||
| 143 | (block128_f)Camellia_encrypt); | ||
| 144 | } | ||
