Commit f3ccc681 authored by Paul Bakker's avatar Paul Bakker
Browse files

- Fixed cipher interface for encrypt/decrypt functions

parent 4fc45522
......@@ -13,6 +13,8 @@ Changes
* Added const correctness for main code base
* X509 signature algorithm determination is now
in a function to allow easy future expansion
* Changed symmetric cipher functions to
identical interface (returning int result values)
Bug fixes
* Fixed bug resulting in failure to send the last
......
......@@ -27,6 +27,7 @@
#define AES_DECRYPT 0
#define POLARSSL_ERR_AES_INVALID_KEY_LENGTH -0x0800
#define POLARSSL_ERR_AES_INVALID_INPUT_LENGTH -0x0810
/**
* \brief AES context structure
......@@ -72,8 +73,10 @@ int aes_setkey_dec( aes_context *ctx, const unsigned char *key, int keysize );
* \param mode AES_ENCRYPT or AES_DECRYPT
* \param input 16-byte input block
* \param output 16-byte output block
*
* \return 0
*/
void aes_crypt_ecb( aes_context *ctx,
int aes_crypt_ecb( aes_context *ctx,
int mode,
const unsigned char input[16],
unsigned char output[16] );
......@@ -89,8 +92,10 @@ void aes_crypt_ecb( aes_context *ctx,
* \param iv initialization vector (updated after use)
* \param input buffer holding the input data
* \param output buffer holding the output data
*
* \return 0 if successful, or POLARSSL_ERR_AES_INVALID_INPUT_LENGTH
*/
void aes_crypt_cbc( aes_context *ctx,
int aes_crypt_cbc( aes_context *ctx,
int mode,
int length,
unsigned char iv[16],
......@@ -107,8 +112,10 @@ void aes_crypt_cbc( aes_context *ctx,
* \param iv initialization vector (updated after use)
* \param input buffer holding the input data
* \param output buffer holding the output data
*
* \return 0
*/
void aes_crypt_cfb128( aes_context *ctx,
int aes_crypt_cfb128( aes_context *ctx,
int mode,
int length,
int *iv_off,
......
......@@ -53,8 +53,10 @@ void arc4_setup( arc4_context *ctx, const unsigned char *key, int keylen );
* \param ctx ARC4 context
* \param buf buffer to be processed
* \param buflen amount of data in buf
*
* \return 0
*/
void arc4_crypt( arc4_context *ctx, unsigned char *buf, int buflen );
int arc4_crypt( arc4_context *ctx, unsigned char *buf, int buflen );
/*
* \brief Checkup routine
......
......@@ -32,6 +32,7 @@ typedef UINT32 uint32_t;
#define CAMELLIA_DECRYPT 0
#define POLARSSL_ERR_CAMELLIA_INVALID_KEY_LENGTH -0x0a00
#define POLARSSL_ERR_CAMELLIA_INVALID_INPUT_LENGTH -0x0a10
/**
* \brief CAMELLIA context structure
......@@ -76,8 +77,10 @@ int camellia_setkey_dec( camellia_context *ctx, const unsigned char *key, int ke
* \param mode CAMELLIA_ENCRYPT or CAMELLIA_DECRYPT
* \param input 16-byte input block
* \param output 16-byte output block
*
* \return 0
*/
void camellia_crypt_ecb( camellia_context *ctx,
int camellia_crypt_ecb( camellia_context *ctx,
int mode,
const unsigned char input[16],
unsigned char output[16] );
......@@ -93,8 +96,10 @@ void camellia_crypt_ecb( camellia_context *ctx,
* \param iv initialization vector (updated after use)
* \param input buffer holding the input data
* \param output buffer holding the output data
*
* \return 0 if successful, or POLARSSL_ERR_CAMELLIA_INVALID_INPUT_LENGTH
*/
void camellia_crypt_cbc( camellia_context *ctx,
int camellia_crypt_cbc( camellia_context *ctx,
int mode,
int length,
unsigned char iv[16],
......@@ -111,8 +116,10 @@ void camellia_crypt_cbc( camellia_context *ctx,
* \param iv initialization vector (updated after use)
* \param input buffer holding the input data
* \param output buffer holding the output data
*
* \return 0 if successful, or POLARSSL_ERR_CAMELLIA_INVALID_INPUT_LENGTH
*/
void camellia_crypt_cfb128( camellia_context *ctx,
int camellia_crypt_cfb128( camellia_context *ctx,
int mode,
int length,
int *iv_off,
......
......@@ -26,6 +26,8 @@
#define DES_ENCRYPT 1
#define DES_DECRYPT 0
#define POLARSSL_ERR_DES_INVALID_INPUT_LENGTH -0x0C00
/**
* \brief DES context structure
*/
......@@ -104,8 +106,10 @@ void des3_set3key_dec( des3_context *ctx, const unsigned char key[24] );
* \param ctx DES context
* \param input 64-bit input block
* \param output 64-bit output block
*
* \return 0
*/
void des_crypt_ecb( des_context *ctx,
int des_crypt_ecb( des_context *ctx,
const unsigned char input[8],
unsigned char output[8] );
......@@ -119,7 +123,7 @@ void des_crypt_ecb( des_context *ctx,
* \param input buffer holding the input data
* \param output buffer holding the output data
*/
void des_crypt_cbc( des_context *ctx,
int des_crypt_cbc( des_context *ctx,
int mode,
int length,
unsigned char iv[8],
......@@ -132,8 +136,10 @@ void des_crypt_cbc( des_context *ctx,
* \param ctx 3DES context
* \param input 64-bit input block
* \param output 64-bit output block
*
* \return 0
*/
void des3_crypt_ecb( des3_context *ctx,
int des3_crypt_ecb( des3_context *ctx,
const unsigned char input[8],
unsigned char output[8] );
......@@ -146,8 +152,10 @@ void des3_crypt_ecb( des3_context *ctx,
* \param iv initialization vector (updated after use)
* \param input buffer holding the input data
* \param output buffer holding the output data
*
* \return 0 if successful, or POLARSSL_ERR_DES_INVALID_INPUT_LENGTH
*/
void des3_crypt_cbc( des3_context *ctx,
int des3_crypt_cbc( des3_context *ctx,
int mode,
int length,
unsigned char iv[8],
......
......@@ -38,6 +38,8 @@
#define PADLOCK_ALIGN16(x) (unsigned long *) (16 + ((long) x & ~15))
#define POLARSSL_ERR_PADLOCK_DATA_MISALIGNED -0x08E0
#ifdef __cplusplus
extern "C" {
#endif
......
......@@ -60,8 +60,10 @@ void xtea_setup( xtea_context *ctx, unsigned char key[16] );
* \param mode XTEA_ENCRYPT or XTEA_DECRYPT
* \param input 8-byte input block
* \param output 8-byte output block
*
* \return 0
*/
void xtea_crypt_ecb( xtea_context *ctx,
int xtea_crypt_ecb( xtea_context *ctx,
int mode,
unsigned char input[8],
unsigned char output[8] );
......
......@@ -647,7 +647,7 @@ int aes_setkey_dec( aes_context *ctx, const unsigned char *key, int keysize )
/*
* AES-ECB block encryption/decryption
*/
void aes_crypt_ecb( aes_context *ctx,
int aes_crypt_ecb( aes_context *ctx,
int mode,
const unsigned char input[16],
unsigned char output[16] )
......@@ -659,7 +659,11 @@ void aes_crypt_ecb( aes_context *ctx,
if( padlock_supports( PADLOCK_ACE ) )
{
if( padlock_xcryptecb( ctx, mode, input, output ) == 0 )
return;
return( 0 );
// If padlock data misaligned, we just fall back to
// unaccelerated mode
//
}
#endif
......@@ -743,12 +747,14 @@ void aes_crypt_ecb( aes_context *ctx,
PUT_ULONG_LE( X1, output, 4 );
PUT_ULONG_LE( X2, output, 8 );
PUT_ULONG_LE( X3, output, 12 );
return( 0 );
}
/*
* AES-CBC buffer encryption/decryption
*/
void aes_crypt_cbc( aes_context *ctx,
int aes_crypt_cbc( aes_context *ctx,
int mode,
int length,
unsigned char iv[16],
......@@ -758,11 +764,18 @@ void aes_crypt_cbc( aes_context *ctx,
int i;
unsigned char temp[16];
if( length % 16 )
return( POLARSSL_ERR_AES_INVALID_INPUT_LENGTH );
#if defined(POLARSSL_PADLOCK_C) && defined(POLARSSL_HAVE_X86)
if( padlock_supports( PADLOCK_ACE ) )
{
if( padlock_xcryptcbc( ctx, mode, length, iv, input, output ) == 0 )
return;
return( 0 );
// If padlock data misaligned, we just fall back to
// unaccelerated mode
//
}
#endif
......@@ -798,12 +811,14 @@ void aes_crypt_cbc( aes_context *ctx,
length -= 16;
}
}
return( 0 );
}
/*
* AES-CFB128 buffer encryption/decryption
*/
void aes_crypt_cfb128( aes_context *ctx,
int aes_crypt_cfb128( aes_context *ctx,
int mode,
int length,
int *iv_off,
......@@ -841,6 +856,8 @@ void aes_crypt_cfb128( aes_context *ctx,
}
*iv_off = n;
return( 0 );
}
#if defined(POLARSSL_SELF_TEST)
......
......@@ -63,7 +63,7 @@ void arc4_setup( arc4_context *ctx, const unsigned char *key, int keylen )
/*
* ARC4 cipher function
*/
void arc4_crypt( arc4_context *ctx, unsigned char *buf, int buflen )
int arc4_crypt( arc4_context *ctx, unsigned char *buf, int buflen )
{
int i, x, y, a, b;
unsigned char *m;
......@@ -86,6 +86,8 @@ void arc4_crypt( arc4_context *ctx, unsigned char *buf, int buflen )
ctx->x = x;
ctx->y = y;
return( 0 );
}
#if defined(POLARSSL_SELF_TEST)
......
......@@ -458,7 +458,7 @@ int camellia_setkey_dec( camellia_context *ctx, const unsigned char *key, int ke
/*
* Camellia-ECB block encryption/decryption
*/
void camellia_crypt_ecb( camellia_context *ctx,
int camellia_crypt_ecb( camellia_context *ctx,
int mode,
const unsigned char input[16],
unsigned char output[16] )
......@@ -513,12 +513,14 @@ void camellia_crypt_ecb( camellia_context *ctx,
PUT_ULONG_BE( X[3], output, 4 );
PUT_ULONG_BE( X[0], output, 8 );
PUT_ULONG_BE( X[1], output, 12 );
return( 0 );
}
/*
* Camellia-CBC buffer encryption/decryption
*/
void camellia_crypt_cbc( camellia_context *ctx,
int camellia_crypt_cbc( camellia_context *ctx,
int mode,
int length,
unsigned char iv[16],
......@@ -528,6 +530,9 @@ void camellia_crypt_cbc( camellia_context *ctx,
int i;
unsigned char temp[16];
if( length % 16 )
return( POLARSSL_ERR_CAMELLIA_INVALID_INPUT_LENGTH );
if( mode == CAMELLIA_DECRYPT )
{
while( length > 0 )
......@@ -560,12 +565,14 @@ void camellia_crypt_cbc( camellia_context *ctx,
length -= 16;
}
}
return( 0 );
}
/*
* Camellia-CFB128 buffer encryption/decryption
*/
void camellia_crypt_cfb128( camellia_context *ctx,
int camellia_crypt_cfb128( camellia_context *ctx,
int mode,
int length,
int *iv_off,
......@@ -603,6 +610,8 @@ void camellia_crypt_cfb128( camellia_context *ctx,
}
*iv_off = n;
return( 0 );
}
#if defined(POLARSSL_SELF_TEST)
......
......@@ -476,7 +476,7 @@ void des3_set3key_dec( des3_context *ctx, const unsigned char key[24] )
/*
* DES-ECB block encryption/decryption
*/
void des_crypt_ecb( des_context *ctx,
int des_crypt_ecb( des_context *ctx,
const unsigned char input[8],
unsigned char output[8] )
{
......@@ -500,12 +500,14 @@ void des_crypt_ecb( des_context *ctx,
PUT_ULONG_BE( Y, output, 0 );
PUT_ULONG_BE( X, output, 4 );
return( 0 );
}
/*
* DES-CBC buffer encryption/decryption
*/
void des_crypt_cbc( des_context *ctx,
int des_crypt_cbc( des_context *ctx,
int mode,
int length,
unsigned char iv[8],
......@@ -515,6 +517,9 @@ void des_crypt_cbc( des_context *ctx,
int i;
unsigned char temp[8];
if( length % 8 )
return( POLARSSL_ERR_DES_INVALID_INPUT_LENGTH );
if( mode == DES_ENCRYPT )
{
while( length > 0 )
......@@ -547,12 +552,14 @@ void des_crypt_cbc( des_context *ctx,
length -= 8;
}
}
return( 0 );
}
/*
* 3DES-ECB block encryption/decryption
*/
void des3_crypt_ecb( des3_context *ctx,
int des3_crypt_ecb( des3_context *ctx,
const unsigned char input[8],
unsigned char output[8] )
{
......@@ -588,12 +595,14 @@ void des3_crypt_ecb( des3_context *ctx,
PUT_ULONG_BE( Y, output, 0 );
PUT_ULONG_BE( X, output, 4 );
return( 0 );
}
/*
* 3DES-CBC buffer encryption/decryption
*/
void des3_crypt_cbc( des3_context *ctx,
int des3_crypt_cbc( des3_context *ctx,
int mode,
int length,
unsigned char iv[8],
......@@ -603,6 +612,9 @@ void des3_crypt_cbc( des3_context *ctx,
int i;
unsigned char temp[8];
if( length % 8 )
return( POLARSSL_ERR_DES_INVALID_INPUT_LENGTH );
if( mode == DES_ENCRYPT )
{
while( length > 0 )
......@@ -635,6 +647,8 @@ void des3_crypt_cbc( des3_context *ctx,
length -= 8;
}
}
return( 0 );
}
#if defined(POLARSSL_SELF_TEST)
......
......@@ -126,7 +126,7 @@ int padlock_xcryptcbc( aes_context *ctx,
if( ( (long) input & 15 ) != 0 ||
( (long) output & 15 ) != 0 )
return( 1 );
return( POLARSSL_ERR_PADLOCK_DATA_MISALIGNED );
rk = ctx->rk;
iw = PADLOCK_ALIGN16( buf );
......
......@@ -68,7 +68,7 @@ void xtea_setup( xtea_context *ctx, unsigned char key[16] )
/*
* XTEA encrypt function
*/
void xtea_crypt_ecb( xtea_context *ctx, int mode, unsigned char input[8],
int xtea_crypt_ecb( xtea_context *ctx, int mode, unsigned char input[8],
unsigned char output[8])
{
uint32_t *k, v0, v1, i;
......@@ -103,6 +103,8 @@ void xtea_crypt_ecb( xtea_context *ctx, int mode, unsigned char input[8],
PUT_ULONG_BE( v0, output, 0 );
PUT_ULONG_BE( v1, output, 4 );
return( 0 );
}
#if defined(POLARSSL_SELF_TEST)
......
This diff is collapsed.
......@@ -23,7 +23,7 @@ aes_encrypt_ecb:hex_key_string:hex_src_string:hex_dst_string:setkey_result
TEST_ASSERT( aes_setkey_enc( &ctx, key_str, key_len * 8 ) == {setkey_result} );
if( {setkey_result} == 0 )
{
aes_crypt_ecb( &ctx, AES_ENCRYPT, src_str, output );
TEST_ASSERT( aes_crypt_ecb( &ctx, AES_ENCRYPT, src_str, output ) == 0 );
hexify( dst_str, output, 16 );
TEST_ASSERT( strcmp( (char *) dst_str, {hex_dst_string} ) == 0 );
......@@ -52,7 +52,7 @@ aes_decrypt_ecb:hex_key_string:hex_src_string:hex_dst_string:setkey_result
TEST_ASSERT( aes_setkey_dec( &ctx, key_str, key_len * 8 ) == {setkey_result} );
if( {setkey_result} == 0 )
{
aes_crypt_ecb( &ctx, AES_DECRYPT, src_str, output );
TEST_ASSERT( aes_crypt_ecb( &ctx, AES_DECRYPT, src_str, output ) == 0 );
hexify( dst_str, output, 16 );
TEST_ASSERT( strcmp( (char *) dst_str, {hex_dst_string} ) == 0 );
......@@ -61,7 +61,7 @@ aes_decrypt_ecb:hex_key_string:hex_src_string:hex_dst_string:setkey_result
END_CASE
BEGIN_CASE
aes_encrypt_cbc:hex_key_string:hex_iv_string:hex_src_string:hex_dst_string
aes_encrypt_cbc:hex_key_string:hex_iv_string:hex_src_string:hex_dst_string:cbc_result
{
unsigned char key_str[100];
unsigned char iv_str[100];
......@@ -69,7 +69,7 @@ aes_encrypt_cbc:hex_key_string:hex_iv_string:hex_src_string:hex_dst_string
unsigned char dst_str[100];
unsigned char output[100];
aes_context ctx;
int key_len;
int key_len, data_len;
memset(key_str, 0x00, 100);
memset(iv_str, 0x00, 100);
......@@ -79,18 +79,21 @@ aes_encrypt_cbc:hex_key_string:hex_iv_string:hex_src_string:hex_dst_string
key_len = unhexify( key_str, {hex_key_string} );
unhexify( iv_str, {hex_iv_string} );
unhexify( src_str, {hex_src_string} );
data_len = unhexify( src_str, {hex_src_string} );
aes_setkey_enc( &ctx, key_str, key_len * 8 );
aes_crypt_cbc( &ctx, AES_ENCRYPT, 16, iv_str, src_str, output );
hexify( dst_str, output, 16 );
TEST_ASSERT( aes_crypt_cbc( &ctx, AES_ENCRYPT, data_len, iv_str, src_str, output ) == {cbc_result} );
if( {cbc_result} == 0 )
{
hexify( dst_str, output, data_len );
TEST_ASSERT( strcmp( (char *) dst_str, {hex_dst_string} ) == 0 );
TEST_ASSERT( strcmp( (char *) dst_str, {hex_dst_string} ) == 0 );
}
}
END_CASE
BEGIN_CASE
aes_decrypt_cbc:hex_key_string:hex_iv_string:hex_src_string:hex_dst_string
aes_decrypt_cbc:hex_key_string:hex_iv_string:hex_src_string:hex_dst_string:cbc_result
{
unsigned char key_str[100];
unsigned char iv_str[100];
......@@ -98,7 +101,7 @@ aes_decrypt_cbc:hex_key_string:hex_iv_string:hex_src_string:hex_dst_string
unsigned char dst_str[100];
unsigned char output[100];
aes_context ctx;
int key_len;
int key_len, data_len;
memset(key_str, 0x00, 100);
memset(iv_str, 0x00, 100);
......@@ -108,13 +111,16 @@ aes_decrypt_cbc:hex_key_string:hex_iv_string:hex_src_string:hex_dst_string
key_len = unhexify( key_str, {hex_key_string} );
unhexify( iv_str, {hex_iv_string} );
unhexify( src_str, {hex_src_string} );
data_len = unhexify( src_str, {hex_src_string} );
aes_setkey_dec( &ctx, key_str, key_len * 8 );
aes_crypt_cbc( &ctx, AES_DECRYPT, 16, iv_str, src_str, output );
hexify( dst_str, output, 16 );
TEST_ASSERT( aes_crypt_cbc( &ctx, AES_DECRYPT, data_len, iv_str, src_str, output ) == {cbc_result} );
if( {cbc_result} == 0)
{
hexify( dst_str, output, data_len );
TEST_ASSERT( strcmp( (char *) dst_str, {hex_dst_string} ) == 0 );
TEST_ASSERT( strcmp( (char *) dst_str, {hex_dst_string} ) == 0 );
}
}
END_CASE
......@@ -141,7 +147,7 @@ aes_encrypt_cfb128:hex_key_string:hex_iv_string:hex_src_string:hex_dst_string
unhexify( src_str, {hex_src_string} );
aes_setkey_enc( &ctx, key_str, key_len * 8 );
aes_crypt_cfb128( &ctx, AES_ENCRYPT, 16, &iv_offset, iv_str, src_str, output );
TEST_ASSERT( aes_crypt_cfb128( &ctx, AES_ENCRYPT, 16, &iv_offset, iv_str, src_str, output ) == 0 );
hexify( dst_str, output, 16 );
TEST_ASSERT( strcmp( (char *) dst_str, {hex_dst_string} ) == 0 );
......@@ -171,7 +177,7 @@ aes_decrypt_cfb128:hex_key_string:hex_iv_string:hex_src_string:hex_dst_string
unhexify( src_str, {hex_src_string} );
aes_setkey_enc( &ctx, key_str, key_len * 8 );
aes_crypt_cfb128( &ctx, AES_DECRYPT, 16, &iv_offset, iv_str, src_str, output );
TEST_ASSERT( aes_crypt_cfb128( &ctx, AES_DECRYPT, 16, &iv_offset, iv_str, src_str, output ) == 0 );
hexify( dst_str, output, 16 );
TEST_ASSERT( strcmp( (char *) dst_str, {hex_dst_string} ) == 0 );
......
......@@ -19,7 +19,7 @@ arc4_crypt:hex_src_string:hex_key_string:hex_dst_string
key_len = unhexify( key_str, {hex_key_string} );
arc4_setup(&ctx, key_str, key_len);
arc4_crypt(&ctx, src_str, src_len);
TEST_ASSERT( arc4_crypt(&ctx, src_str, src_len) == 0 );
hexify( dst_str, src_str, src_len );
TEST_ASSERT( strcmp( (char *) dst_str, {hex_dst_string} ) == 0 );
......
......@@ -53,40 +53,40 @@ Camellia-256-ECB Encrypt Perl EVP #4
camellia_encrypt_ecb:"603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4":"F69F2445DF4F9B17AD2B417BE66C3710":"7960109FB6DC42947FCFE59EA3C5EB6B":0
Camellia-128-CBC Encrypt Perl EVP #1
camellia_encrypt_cbc:"2B7E151628AED2A6ABF7158809CF4F3C":"000102030405060708090A0B0C0D0E0F":"6BC1BEE22E409F96E93D7E117393172A":"1607CF494B36BBF00DAEB0B503C831AB"
camellia_encrypt_cbc:"2B7E151628AED2A6ABF7158809CF4F3C":"000102030405060708090A0B0C0D0E0F":"6BC1BEE22E409F96E93D7E117393172A":"1607CF494B36BBF00DAEB0B503C831AB":0
Camellia-128-CBC Encrypt Perl EVP #2
camellia_encrypt_cbc:"2B7E151628AED2A6ABF7158809CF4F3C":"1607CF494B36BBF00DAEB0B503C831AB":"AE2D8A571E03AC9C9EB76FAC45AF8E51":"A2F2CF671629EF7840C5A5DFB5074887"
camellia_encrypt_cbc:"2B7E151628AED2A6ABF7158809CF4F3C":"1607CF494B36BBF00DAEB0B503C831AB":"AE2D8A571E03AC9C9EB76FAC45AF8E51":"A2F2CF671629EF7840C5A5DFB5074887":0
Camellia-128-CBC Encrypt Perl EVP #3
camellia_encrypt_cbc:"2B7E151628AED2A6ABF7158809CF4F3C":"A2F2CF671629EF7840C5A5DFB5074887":"30C81C46A35CE411E5FBC1191A0A52EF":"0F06165008CF8B8B5A63586362543E54"
camellia_encrypt_cbc:"2B7E151628AED2A6ABF7158809CF4F3C":"A2F2CF671629EF7840C5A5DFB5074887":"30C81C46A35CE411E5FBC1191A0A52EF":"0F06165008CF8B8B5A63586362543E54":0
Camellia-128-CBC Encrypt Perl EVP #4
camellia_encrypt_cbc:"2B7E151628AED2A6ABF7158809CF4F3C":"36A84CDAFD5F9A85ADA0F0A993D6D577":"F69F2445DF4F9B17AD2B417BE66C3710":"74C64268CDB8B8FAF5B34E8AF3732980"
camellia_encrypt_cbc:"2B7E151628AED2A6ABF7158809CF4F3C":"36A84CDAFD5F9A85ADA0F0A993D6D577":"F69F2445DF4F9B17AD2B417BE66C3710":"74C64268CDB8B8FAF5B34E8AF3732980":0
Camellia-192-CBC Encrypt Perl EVP #1
camellia_encrypt_cbc:"8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B":"000102030405060708090A0B0C0D0E0F":"6BC1BEE22E409F96E93D7E117393172A":"2A4830AB5AC4A1A2405955FD2195CF93"
camellia_encrypt_cbc:"8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B":"000102030405060708090A0B0C0D0E0F":"6BC1BEE22E409F96E93D7E117393172A":"2A4830AB5AC4A1A2405955FD2195CF93":0
Camellia-192-CBC Encrypt Perl EVP #2
camellia_encrypt_cbc:"8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B":"2A4830AB5AC4A1A2405955FD2195CF93":"AE2D8A571E03AC9C9EB76FAC45AF8E51":"5D5A869BD14CE54264F892A6DD2EC3D5"
camellia_encrypt_cbc:"8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B":"2A4830AB5AC4A1A2405955FD2195CF93":"AE2D8A571E03AC9C9EB76FAC45AF8E51":"5D5A869BD14CE54264F892A6DD2EC3D5":0
Camellia-192-CBC Encrypt Perl EVP #3
camellia_encrypt_cbc:"8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B":"5D5A869BD14CE54264F892A6DD2EC3D5":"30C81C46A35CE411E5FBC1191A0A52EF":"37D359C3349836D884E310ADDF68C449"
camellia_encrypt_cbc:"8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B":"5D5A869BD14CE54264F892A6DD2EC3D5":"30C81C46A35CE411E5FBC1191A0A52EF":"37D359C3349836D884E310ADDF68C449":0
Camellia-192-CBC Encrypt Perl EVP #4
camellia_encrypt_cbc:"8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B":"37D359C3349836D884E310ADDF68C449":"F69F2445DF4F9B17AD2B417BE66C3710":"01FAAA930B4AB9916E9668E1428C6B08"
camellia_encrypt_cbc:"8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B":"37D359C3349836D884E310ADDF68C449":"F69F2445DF4F9B17AD2B417BE66C3710":"01FAAA930B4AB9916E9668E1428C6B08":0
Camellia-256-CBC Encrypt Perl EVP #1
camellia_encrypt_cbc:"603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4":"000102030405060708090A0B0C0D0E0F":"6BC1BEE22E409F96E93D7E117393172A":"E6CFA35FC02B134A4D2C0B6737AC3EDA"
camellia_encrypt_cbc:"603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4":"000102030405060708090A0B0C0D0E0F":"6BC1BEE22E409F96E93D7E117393172A":"E6CFA35FC02B134A4D2C0B6737AC3EDA":0
Camellia-256-CBC Encrypt Perl EVP #2
camellia_encrypt_cbc:"603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4":"E6CFA35FC02B134A4D2C0B6737AC3EDA":"AE2D8A571E03AC9C9EB76FAC45AF8E51":"36CBEB73BD504B4070B1B7DE2B21EB50"
camellia_encrypt_cbc:"603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4":"E6CFA35FC02B134A4D2C0B6737AC3EDA":"AE2D8A571E03AC9C9EB76FAC45AF8E51":"36CBEB73BD504B4070B1B7DE2B21EB50":0
Camellia-256-CBC Encrypt Perl EVP #3
camellia_encrypt_cbc:"603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4":"36CBEB73BD504B4070B1B7DE2B21EB50":"30C81C46A35CE411E5FBC1191A0A52EF":"E31A6055297D96CA3330CDF1B1860A83"
camellia_encrypt_cbc:"603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4":"36CBEB73BD504B4070B1B7DE2B21EB50":"30C81C46A35CE411E5FBC1191A0A52EF":"E31A6055297D96CA3330CDF1B1860A83":0
Camellia-256-CBC Encrypt Perl EVP #4
camellia_encrypt_cbc:"603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4":"E31A6055297D96CA3330CDF1B1860A83":"F69F2445DF4F9B17AD2B417BE66C3710":"5D563F6D1CCCF236051C0C5C1C58F28F"
camellia_encrypt_cbc:"603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4":"E31A6055297D96CA3330CDF1B1860A83":"F69F2445DF4F9B17AD2B417BE66C3710":"5D563F6D1CCCF236051C0C5C1C58F28F":0
Camellia-128-CFB128 Encrypt Perl EVP #1
camellia_encrypt_cfb128:"2B7E151628AED2A6ABF7158809CF4F3C":"000102030405060708090A0B0C0D0E0F":"6BC1BEE22E409F96E93D7E117393172A":"14F7646187817EB586599146B82BD719"
......@@ -166,5 +166,11 @@ camellia_encrypt_ecb:"0123456789abcdeffedcba98765432":"0123456789abcdeffedcba987
Camellia-ECB Decrypt (Invalid key length)
camellia_decrypt_ecb:"0123456789abcdeffedcba98765432":"0123456789abcdeffedcba9876543210":"67673138549669730857065648eabe43":POLARSSL_ERR_CAMELLIA_INVALID_KEY_LENGTH
Camellia-256-CBC Encrypt (Invalid input length)
camellia_encrypt_cbc:"0000000000000000000000000000000000000000000000000000000000000000":"00000000000000000000000000000000":"ffffffffffffffe000000000000000":"":POLARSSL_ERR_CAMELLIA_INVALID_INPUT_LENGTH
Camellia-256-CBC Decrypt (Invalid input length)
camellia_decrypt_cbc:"0000000000000000000000000000000000000000000000000000000000000000":"00000000000000000000000000000000":"623a52fcea5d443e48d9181ab32c74":"":POLARSSL_ERR_CAMELLIA_INVALID_INPUT_LENGTH
Camellia Selftest
camellia_selftest: