mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-08-08 17:42:09 +03:00
Make CBC an option, step 3: individual ciphers
This commit is contained in:
@@ -100,6 +100,7 @@ int aes_crypt_ecb( aes_context *ctx,
|
||||
const unsigned char input[16],
|
||||
unsigned char output[16] );
|
||||
|
||||
#if defined(POLARSSL_CIPHER_MODE_CBC)
|
||||
/**
|
||||
* \brief AES-CBC buffer encryption/decryption
|
||||
* Length should be a multiple of the block
|
||||
@@ -120,6 +121,7 @@ int aes_crypt_cbc( aes_context *ctx,
|
||||
unsigned char iv[16],
|
||||
const unsigned char *input,
|
||||
unsigned char *output );
|
||||
#endif /* POLARSSL_CIPHER_MODE_CBC */
|
||||
|
||||
/**
|
||||
* \brief AES-CFB128 buffer encryption/decryption.
|
||||
|
@@ -92,6 +92,7 @@ int blowfish_crypt_ecb( blowfish_context *ctx,
|
||||
const unsigned char input[BLOWFISH_BLOCKSIZE],
|
||||
unsigned char output[BLOWFISH_BLOCKSIZE] );
|
||||
|
||||
#if defined(POLARSSL_CIPHER_MODE_CBC)
|
||||
/**
|
||||
* \brief Blowfish-CBC buffer encryption/decryption
|
||||
* Length should be a multiple of the block
|
||||
@@ -112,7 +113,9 @@ int blowfish_crypt_cbc( blowfish_context *ctx,
|
||||
unsigned char iv[BLOWFISH_BLOCKSIZE],
|
||||
const unsigned char *input,
|
||||
unsigned char *output );
|
||||
#endif /* POLARSSL_CIPHER_MODE_CBC */
|
||||
|
||||
#if defined(POLARSSL_CIPHER_MODE_CFB)
|
||||
/**
|
||||
* \brief Blowfish CFB buffer encryption/decryption.
|
||||
*
|
||||
@@ -133,7 +136,9 @@ int blowfish_crypt_cfb64( blowfish_context *ctx,
|
||||
unsigned char iv[BLOWFISH_BLOCKSIZE],
|
||||
const unsigned char *input,
|
||||
unsigned char *output );
|
||||
#endif /*POLARSSL_CIPHER_MODE_CFB */
|
||||
|
||||
#if defined(POLARSSL_CIPHER_MODE_CTR)
|
||||
/**
|
||||
* \brief Blowfish-CTR buffer encryption/decryption
|
||||
*
|
||||
@@ -159,6 +164,7 @@ int blowfish_crypt_ctr( blowfish_context *ctx,
|
||||
unsigned char stream_block[BLOWFISH_BLOCKSIZE],
|
||||
const unsigned char *input,
|
||||
unsigned char *output );
|
||||
#endif /* POLARSSL_CIPHER_MODE_CTR */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@@ -99,6 +99,7 @@ int camellia_crypt_ecb( camellia_context *ctx,
|
||||
const unsigned char input[16],
|
||||
unsigned char output[16] );
|
||||
|
||||
#if defined(POLARSSL_CIPHER_MODE_CBC)
|
||||
/**
|
||||
* \brief CAMELLIA-CBC buffer encryption/decryption
|
||||
* Length should be a multiple of the block
|
||||
@@ -119,7 +120,9 @@ int camellia_crypt_cbc( camellia_context *ctx,
|
||||
unsigned char iv[16],
|
||||
const unsigned char *input,
|
||||
unsigned char *output );
|
||||
#endif /* POLARSSL_CIPHER_MODE_CBC */
|
||||
|
||||
#if defined(POLARSSL_CIPHER_MODE_CFB)
|
||||
/**
|
||||
* \brief CAMELLIA-CFB128 buffer encryption/decryption
|
||||
*
|
||||
@@ -144,7 +147,9 @@ int camellia_crypt_cfb128( camellia_context *ctx,
|
||||
unsigned char iv[16],
|
||||
const unsigned char *input,
|
||||
unsigned char *output );
|
||||
#endif /* POLARSSL_CIPHER_MODE_CFB */
|
||||
|
||||
#if defined(POLARSSL_CIPHER_MODE_CTR)
|
||||
/**
|
||||
* \brief CAMELLIA-CTR buffer encryption/decryption
|
||||
*
|
||||
@@ -174,6 +179,7 @@ int camellia_crypt_ctr( camellia_context *ctx,
|
||||
unsigned char stream_block[16],
|
||||
const unsigned char *input,
|
||||
unsigned char *output );
|
||||
#endif /* POLARSSL_CIPHER_MODE_CTR */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@@ -633,6 +633,7 @@
|
||||
*
|
||||
* Requires: POLARSSL_AES_C
|
||||
* POLARSSL_SHA256_C
|
||||
* POLARSSL_CIPHER_MODE_CBC
|
||||
*
|
||||
* Comment this macro to disable support for SSL session tickets
|
||||
*/
|
||||
@@ -1606,7 +1607,8 @@
|
||||
#endif
|
||||
|
||||
#if defined(POLARSSL_SSL_SESSION_TICKETS) && defined(POLARSSL_SSL_TLS_C) && \
|
||||
( !defined(POLARSSL_AES_C) || !defined(POLARSSL_SHA256_C) )
|
||||
( !defined(POLARSSL_AES_C) || !defined(POLARSSL_SHA256_C) || \
|
||||
!defined(POLARSSL_CIPHER_MODE_CBC) )
|
||||
#error "POLARSSL_SSL_SESSION_TICKETS_C defined, but not all prerequisites"
|
||||
#endif
|
||||
|
||||
|
@@ -177,6 +177,7 @@ int des_crypt_ecb( des_context *ctx,
|
||||
const unsigned char input[8],
|
||||
unsigned char output[8] );
|
||||
|
||||
#if defined(POLARSSL_CIPHER_MODE_CBC)
|
||||
/**
|
||||
* \brief DES-CBC buffer encryption/decryption
|
||||
*
|
||||
@@ -193,6 +194,7 @@ int des_crypt_cbc( des_context *ctx,
|
||||
unsigned char iv[8],
|
||||
const unsigned char *input,
|
||||
unsigned char *output );
|
||||
#endif /* POLARSSL_CIPHER_MODE_CBC */
|
||||
|
||||
/**
|
||||
* \brief 3DES-ECB block encryption/decryption
|
||||
@@ -207,6 +209,7 @@ int des3_crypt_ecb( des3_context *ctx,
|
||||
const unsigned char input[8],
|
||||
unsigned char output[8] );
|
||||
|
||||
#if defined(POLARSSL_CIPHER_MODE_CBC)
|
||||
/**
|
||||
* \brief 3DES-CBC buffer encryption/decryption
|
||||
*
|
||||
@@ -225,6 +228,7 @@ int des3_crypt_cbc( des3_context *ctx,
|
||||
unsigned char iv[8],
|
||||
const unsigned char *input,
|
||||
unsigned char *output );
|
||||
#endif /* POLARSSL_CIPHER_MODE_CBC */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@@ -83,6 +83,7 @@ int xtea_crypt_ecb( xtea_context *ctx,
|
||||
const unsigned char input[8],
|
||||
unsigned char output[8] );
|
||||
|
||||
#if defined(POLARSSL_CIPHER_MODE_CBC)
|
||||
/**
|
||||
* \brief XTEA CBC cipher function
|
||||
*
|
||||
@@ -102,6 +103,7 @@ int xtea_crypt_cbc( xtea_context *ctx,
|
||||
unsigned char iv[8],
|
||||
const unsigned char *input,
|
||||
unsigned char *output);
|
||||
#endif /* POLARSSL_CIPHER_MODE_CBC */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
Reference in New Issue
Block a user