Skip to content

Commit

Permalink
Remove CFB mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
briansmith committed Aug 27, 2015
1 parent c08a037 commit 49c0ede
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 278 deletions.
7 changes: 0 additions & 7 deletions crypto/aes/mode_wrappers.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,3 @@ void AES_cbc_encrypt(const uint8_t *in, uint8_t *out, size_t len,
}

#endif /* OPENSSL_NO_ASM || (!OPENSSL_X86_64 && !OPENSSL_X86) */

void AES_cfb128_encrypt(const uint8_t *in, uint8_t *out, size_t length,
const AES_KEY *key, uint8_t *ivec, int *num,
int enc) {
CRYPTO_cfb128_encrypt(in, out, length, key, ivec, num, enc,
(block128_f)AES_encrypt);
}
4 changes: 0 additions & 4 deletions crypto/cipher/cipher.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,10 +199,6 @@ int EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
case EVP_CIPH_ECB_MODE:
break;

case EVP_CIPH_CFB_MODE:
ctx->num = 0;
/* fall-through */

case EVP_CIPH_CBC_MODE:
assert(EVP_CIPHER_CTX_iv_length(ctx) <= sizeof(ctx->iv));
if (iv) {
Expand Down
1 change: 0 additions & 1 deletion crypto/modes/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ add_library(

cbc.c
ctr.c
cfb.c
gcm.c

${MODES_ARCH_SOURCES}
Expand Down
230 changes: 0 additions & 230 deletions crypto/modes/cfb.c

This file was deleted.

7 changes: 0 additions & 7 deletions include/openssl/aes.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,6 @@ OPENSSL_EXPORT void AES_cbc_encrypt(const uint8_t *in, uint8_t *out, size_t len,
const AES_KEY *key, uint8_t *ivec,
const int enc);

/* AES_cfb128_encrypt encrypts (or decrypts, if |enc| == |AES_DECRYPT|) |len|
* bytes from |in| to |out|. The |num| parameter must be set to zero on the
* first call. */
OPENSSL_EXPORT void AES_cfb128_encrypt(const uint8_t *in, uint8_t *out,
size_t len, const AES_KEY *key,
uint8_t *ivec, int *num, int enc);


/* Android compatibility section.
*
Expand Down
2 changes: 1 addition & 1 deletion include/openssl/cipher.h
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ OPENSSL_EXPORT int EVP_BytesToKey(const EVP_CIPHER *type, const EVP_MD *md,
#define EVP_CIPH_STREAM_CIPHER 0x0
#define EVP_CIPH_ECB_MODE 0x1
#define EVP_CIPH_CBC_MODE 0x2
#define EVP_CIPH_CFB_MODE 0x3
/* EVP_CIPH_CFB_MODE 0x3 */
/* EVP_CIPH_OFB_MODE 0x4 */
#define EVP_CIPH_CTR_MODE 0x5
#define EVP_CIPH_GCM_MODE 0x6
Expand Down
28 changes: 0 additions & 28 deletions include/openssl/modes.h
Original file line number Diff line number Diff line change
Expand Up @@ -174,34 +174,6 @@ void CRYPTO_cbc128_encrypt(const uint8_t *in, uint8_t *out, size_t len,
void CRYPTO_cbc128_decrypt(const uint8_t *in, uint8_t *out, size_t len,
const void *key, uint8_t ivec[16], block128_f block);

/* CFB. */

/* CRYPTO_cfb128_encrypt encrypts (or decrypts, if |enc| is zero) |len| bytes
* from |in| to |out| using |block| in CFB mode. There's no requirement that
* |len| be a multiple of any value and any partial blocks are stored in |ivec|
* and |*num|, the latter must be zero before the initial call. */
void CRYPTO_cfb128_encrypt(const uint8_t *in, uint8_t *out, size_t len,
const void *key, uint8_t ivec[16], int *num, int enc,
block128_f block);

/* CRYPTO_cfb128_8_encrypt encrypts (or decrypts, if |enc| is zero) |len| bytes
* from |in| to |out| using |block| in CFB-8 mode. Prior to the first call
* |num| should be set to zero. */
void CRYPTO_cfb128_8_encrypt(const uint8_t *in, uint8_t *out, size_t len,
const void *key, uint8_t ivec[16], int *num,
int enc, block128_f block);

/* CRYPTO_cfb128_1_encrypt encrypts (or decrypts, if |enc| is zero) |len| bytes
* from |in| to |out| using |block| in CFB-1 mode. Prior to the first call
* |num| should be set to zero. */
void CRYPTO_cfb128_1_encrypt(const uint8_t *in, uint8_t *out, size_t bits,
const void *key, uint8_t ivec[16], int *num,
int enc, block128_f block);

size_t CRYPTO_cts128_encrypt_block(const uint8_t *in, uint8_t *out, size_t len,
const void *key, uint8_t ivec[16],
block128_f block);


#if defined(__cplusplus)
} /* extern C */
Expand Down

0 comments on commit 49c0ede

Please sign in to comment.