diff --git a/ChangeLog b/ChangeLog index 74872ad35..e0c1ec903 100644 --- a/ChangeLog +++ b/ChangeLog @@ -15,6 +15,8 @@ Features * Parsing Elliptic Curve certificates * Support for max_fragment_length extension (RFC 6066) * Support for truncated_hmac extension (RFC 6066) + * Support for zeros-and-length (ANSI X.923) padding, one-and-zeros + (ISO/IEC 7816-4) padding and zero padding in the cipher layer Changes * Introduced separate SSL Ciphersuites module that is based on diff --git a/include/polarssl/cipher.h b/include/polarssl/cipher.h index 8aa8cb090..13d714be9 100644 --- a/include/polarssl/cipher.h +++ b/include/polarssl/cipher.h @@ -104,6 +104,14 @@ typedef enum { POLARSSL_MODE_STREAM, } cipher_mode_t; +typedef enum { + POLARSSL_PADDING_PKCS7 = 0, /**< PKCS7 padding (default) */ + POLARSSL_PADDING_ONE_AND_ZEROS, /**< ISO/IEC 7816-4 padding */ + POLARSSL_PADDING_ZEROS_AND_LEN, /**< ANSI X.923 padding */ + POLARSSL_PADDING_ZEROS, /**< zero padding (not reversible!) */ + POLARSSL_PADDING_NONE, /**< never pad (full blocks only) */ +} cipher_padding_t; + typedef enum { POLARSSL_OPERATION_NONE = -1, POLARSSL_DECRYPT = 0, @@ -198,6 +206,10 @@ typedef struct { /** Operation that the context's key has been initialised for */ operation_t operation; + /** Padding functions to use, if relevant for cipher mode */ + void (*add_padding)( unsigned char *output, size_t olen, size_t data_len ); + int (*get_padding)( unsigned char *input, size_t ilen, size_t *data_len ); + /** Buffer for data that hasn't been encrypted yet */ unsigned char unprocessed_data[POLARSSL_MAX_IV_LENGTH]; @@ -398,6 +410,20 @@ static inline operation_t cipher_get_operation( const cipher_context_t *ctx ) int cipher_setkey( cipher_context_t *ctx, const unsigned char *key, int key_length, const operation_t operation ); +/** + * \brief Set padding mode, for cipher modes that use padding. + * (Default: PKCS7 padding.) + * + * \param ctx generic cipher context + * \param mode padding mode + * + * \returns 0 on success, POLARSSL_ERR_CIPHER_FEATURE_UNAVAILABLE + * if selected padding mode is not supported, or + * POLARSSL_ERR_CIPHER_BAD_INPUT_DATA if the cipher mode + * does not support padding. + */ +int cipher_set_padding_mode( cipher_context_t *ctx, cipher_padding_t mode ); + /** * \brief Reset the given context, setting the IV to iv * diff --git a/include/polarssl/config.h b/include/polarssl/config.h index 5742fe59b..6cabebb2f 100644 --- a/include/polarssl/config.h +++ b/include/polarssl/config.h @@ -193,6 +193,21 @@ #define POLARSSL_CIPHER_NULL_CIPHER */ +/** + * \def POLARSSL_CIPHER_PADDING_XXX + * + * Uncomment or comment macros to add support for specific padding modes + * in the cipher layer with cipher modes that support padding (e.g. CBC) + * + * If you disable all padding modes, only full blocks can be used with CBC. + * + * Enable padding modes in the cipher layer. + */ +#define POLARSSL_CIPHER_PADDING_PKCS7 +#define POLARSSL_CIPHER_PADDING_ONE_AND_ZEROS +#define POLARSSL_CIPHER_PADDING_ZEROS_AND_LEN +#define POLARSSL_CIPHER_PADDING_ZEROS + /** * \def POLARSSL_ENABLE_WEAK_CIPHERSUITES * diff --git a/library/cipher.c b/library/cipher.c index 2a2d78299..826d8fcd2 100644 --- a/library/cipher.c +++ b/library/cipher.c @@ -323,6 +323,15 @@ int cipher_init_ctx( cipher_context_t *ctx, const cipher_info_t *cipher_info ) ctx->cipher_info = cipher_info; + /* + * Ignore possible errors caused by a cipher mode that doesn't use padding + */ +#if defined(POLARSSL_CIPHER_PADDING_PKCS7) + (void) cipher_set_padding_mode( ctx, POLARSSL_PADDING_PKCS7 ); +#else + (void) cipher_set_padding_mode( ctx, POLARSSL_PADDING_NONE ); +#endif + return 0; } @@ -521,6 +530,10 @@ int cipher_update( cipher_context_t *ctx, const unsigned char *input, size_t ile return POLARSSL_ERR_CIPHER_FEATURE_UNAVAILABLE; } +#if defined(POLARSSL_CIPHER_PADDING_PKCS7) +/* + * PKCS7 (and PKCS5) padding: fill with ll bytes, with ll = padding_len + */ static void add_pkcs_padding( unsigned char *output, size_t output_len, size_t data_len ) { @@ -531,8 +544,8 @@ static void add_pkcs_padding( unsigned char *output, size_t output_len, output[data_len + i] = (unsigned char) padding_len; } -static int get_pkcs_padding( unsigned char *input, unsigned int input_len, - size_t *data_len) +static int get_pkcs_padding( unsigned char *input, size_t input_len, + size_t *data_len ) { unsigned int i, padding_len = 0; @@ -541,7 +554,7 @@ static int get_pkcs_padding( unsigned char *input, unsigned int input_len, padding_len = input[input_len - 1]; - if( padding_len > input_len ) + if( padding_len > input_len || padding_len == 0 ) return POLARSSL_ERR_CIPHER_INVALID_PADDING; for( i = input_len - padding_len; i < input_len; i++ ) @@ -552,6 +565,126 @@ static int get_pkcs_padding( unsigned char *input, unsigned int input_len, return 0; } +#endif /* POLARSSL_CIPHER_PADDING_PKCS7 */ + +#if defined(POLARSSL_CIPHER_PADDING_ONE_AND_ZEROS) +/* + * One and zeros padding: fill with 80 00 ... 00 + */ +static void add_one_and_zeros_padding( unsigned char *output, + size_t output_len, size_t data_len ) +{ + size_t padding_len = output_len - data_len; + unsigned char i = 0; + + output[data_len] = 0x80; + for( i = 1; i < padding_len; i++ ) + output[data_len + i] = 0x00; +} + +static int get_one_and_zeros_padding( unsigned char *input, size_t input_len, + size_t *data_len ) +{ + unsigned char *p = input + input_len - 1; + + if( NULL == input || NULL == data_len ) + return POLARSSL_ERR_CIPHER_BAD_INPUT_DATA; + + while( *p == 0x00 && p > input ) + --p; + + if( *p != 0x80 ) + return POLARSSL_ERR_CIPHER_INVALID_PADDING; + + *data_len = p - input; + + return 0; +} +#endif /* POLARSSL_CIPHER_PADDING_ONE_AND_ZEROS */ + +#if defined(POLARSSL_CIPHER_PADDING_ZEROS_AND_LEN) +/* + * Zeros and len padding: fill with 00 ... 00 ll, where ll is padding length + */ +static void add_zeros_and_len_padding( unsigned char *output, + size_t output_len, size_t data_len ) +{ + size_t padding_len = output_len - data_len; + unsigned char i = 0; + + for( i = 1; i < padding_len; i++ ) + output[data_len + i - 1] = 0x00; + output[output_len - 1] = (unsigned char) padding_len; +} + +static int get_zeros_and_len_padding( unsigned char *input, size_t input_len, + size_t *data_len ) +{ + unsigned int i, padding_len = 0; + + if( NULL == input || NULL == data_len ) + return POLARSSL_ERR_CIPHER_BAD_INPUT_DATA; + + padding_len = input[input_len - 1]; + + if( padding_len > input_len || padding_len == 0 ) + return POLARSSL_ERR_CIPHER_INVALID_PADDING; + + for( i = input_len - padding_len; i < input_len - 1; i++ ) + if( input[i] != 0x00 ) + return POLARSSL_ERR_CIPHER_INVALID_PADDING; + + *data_len = input_len - padding_len; + + return 0; +} +#endif /* POLARSSL_CIPHER_PADDING_ZEROS_AND_LEN */ + +#if defined(POLARSSL_CIPHER_PADDING_ZEROS) +/* + * Zero padding: fill with 00 ... 00 + */ +static void add_zeros_padding( unsigned char *output, + size_t output_len, size_t data_len ) +{ + unsigned char i; + + for( i = data_len; i < output_len; i++ ) + output[i] = 0x00; +} + +static int get_zeros_padding( unsigned char *input, size_t input_len, + size_t *data_len ) +{ + unsigned char *p = input + input_len - 1; + if( NULL == input || NULL == data_len ) + return POLARSSL_ERR_CIPHER_BAD_INPUT_DATA; + + while( *p == 0x00 && p > input ) + --p; + + *data_len = *p == 0x00 ? 0 : p - input + 1; + + return 0; +} +#endif /* POLARSSL_CIPHER_PADDING_ZEROS */ + +/* + * No padding: don't pad :) + * + * There is no add_padding function (check for NULL in cipher_finish) + * but a trivial get_padding function + */ +static int get_no_padding( unsigned char *input, size_t input_len, + size_t *data_len ) +{ + if( NULL == input || NULL == data_len ) + return POLARSSL_ERR_CIPHER_BAD_INPUT_DATA; + + *data_len = input_len; + + return 0; +} int cipher_finish( cipher_context_t *ctx, unsigned char *output, size_t *olen) { @@ -573,12 +706,27 @@ int cipher_finish( cipher_context_t *ctx, unsigned char *output, size_t *olen) { if( POLARSSL_ENCRYPT == ctx->operation ) { - add_pkcs_padding( ctx->unprocessed_data, cipher_get_iv_size( ctx ), + /* check for 'no padding' mode */ + if( NULL == ctx->add_padding ) + { + if( 0 != ctx->unprocessed_len ) + return POLARSSL_ERR_CIPHER_FULL_BLOCK_EXPECTED; + + return 0; + } + + ctx->add_padding( ctx->unprocessed_data, cipher_get_iv_size( ctx ), ctx->unprocessed_len ); } else if ( cipher_get_block_size( ctx ) != ctx->unprocessed_len ) { - /* For decrypt operations, expect a full block */ + /* + * For decrypt operations, expect a full block, + * or an empty block if no padding + */ + if( NULL == ctx->add_padding && 0 == ctx->unprocessed_len ) + return 0; + return POLARSSL_ERR_CIPHER_FULL_BLOCK_EXPECTED; } @@ -592,7 +740,8 @@ int cipher_finish( cipher_context_t *ctx, unsigned char *output, size_t *olen) /* Set output size for decryption */ if( POLARSSL_DECRYPT == ctx->operation ) - return get_pkcs_padding( output, cipher_get_block_size( ctx ), olen ); + return ctx->get_padding( output, cipher_get_block_size( ctx ), + olen ); /* Set output size for encryption */ *olen = cipher_get_block_size( ctx ); @@ -602,6 +751,52 @@ int cipher_finish( cipher_context_t *ctx, unsigned char *output, size_t *olen) return POLARSSL_ERR_CIPHER_FEATURE_UNAVAILABLE; } +int cipher_set_padding_mode( cipher_context_t *ctx, cipher_padding_t mode ) +{ + if( NULL == ctx || + POLARSSL_MODE_CBC != ctx->cipher_info->mode ) + { + return POLARSSL_ERR_CIPHER_BAD_INPUT_DATA; + } + + switch( mode ) + { +#if defined(POLARSSL_CIPHER_PADDING_PKCS7) + case POLARSSL_PADDING_PKCS7: + ctx->add_padding = add_pkcs_padding; + ctx->get_padding = get_pkcs_padding; + break; +#endif +#if defined(POLARSSL_CIPHER_PADDING_ONE_AND_ZEROS) + case POLARSSL_PADDING_ONE_AND_ZEROS: + ctx->add_padding = add_one_and_zeros_padding; + ctx->get_padding = get_one_and_zeros_padding; + break; +#endif +#if defined(POLARSSL_CIPHER_PADDING_ZEROS_AND_LEN) + case POLARSSL_PADDING_ZEROS_AND_LEN: + ctx->add_padding = add_zeros_and_len_padding; + ctx->get_padding = get_zeros_and_len_padding; + break; +#endif +#if defined(POLARSSL_CIPHER_PADDING_ZEROS) + case POLARSSL_PADDING_ZEROS: + ctx->add_padding = add_zeros_padding; + ctx->get_padding = get_zeros_padding; + break; +#endif + case POLARSSL_PADDING_NONE: + ctx->add_padding = NULL; + ctx->get_padding = get_no_padding; + break; + + default: + return POLARSSL_ERR_CIPHER_FEATURE_UNAVAILABLE; + } + + return 0; +} + #if defined(POLARSSL_SELF_TEST) #include diff --git a/tests/.gitignore b/tests/.gitignore index 084f664cc..0d59058dc 100644 --- a/tests/.gitignore +++ b/tests/.gitignore @@ -1,2 +1,2 @@ -test_suite* +/test_suite* data_files/mpi_write diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 7c01f392c..17d31e951 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -44,6 +44,7 @@ add_test_suite(cipher cipher.blowfish) add_test_suite(cipher cipher.camellia) add_test_suite(cipher cipher.des) add_test_suite(cipher cipher.null) +add_test_suite(cipher cipher.padding) add_test_suite(ctr_drbg) add_test_suite(debug) add_test_suite(des) diff --git a/tests/Makefile b/tests/Makefile index 243563487..b78062c55 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -30,6 +30,7 @@ APPS = test_suite_aes.ecb test_suite_aes.cbc \ test_suite_cipher.blowfish \ test_suite_cipher.camellia \ test_suite_cipher.des test_suite_cipher.null \ + test_suite_cipher.padding \ test_suite_ctr_drbg test_suite_debug \ test_suite_des test_suite_dhm \ test_suite_ecdh test_suite_ecdsa \ @@ -89,6 +90,10 @@ test_suite_cipher.null.c : suites/test_suite_cipher.function suites/test_suite_c echo " Generate $@" scripts/generate_code.pl suites test_suite_cipher test_suite_cipher.null +test_suite_cipher.padding.c : suites/test_suite_cipher.function suites/test_suite_cipher.padding.data scripts/generate_code.pl suites/helpers.function + echo " Generate $@" + scripts/generate_code.pl suites test_suite_cipher test_suite_cipher.padding + test_suite_gcm.decrypt_128.c : suites/test_suite_gcm.function suites/test_suite_gcm.decrypt_128.data scripts/generate_code.pl suites/helpers.function echo " Generate $@" scripts/generate_code.pl suites test_suite_gcm test_suite_gcm.decrypt_128 @@ -169,6 +174,10 @@ test_suite_cipher.null: test_suite_cipher.null.c ../library/libpolarssl.a echo " CC $@.c" $(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@ +test_suite_cipher.padding: test_suite_cipher.padding.c ../library/libpolarssl.a + echo " CC $@.c" + $(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@ + test_suite_ctr_drbg: test_suite_ctr_drbg.c ../library/libpolarssl.a echo " CC $@.c" $(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@ diff --git a/tests/suites/test_suite_cipher.aes.data b/tests/suites/test_suite_cipher.aes.data index 2c4d272c6..b987abeb0 100644 --- a/tests/suites/test_suite_cipher.aes.data +++ b/tests/suites/test_suite_cipher.aes.data @@ -7,63 +7,303 @@ dec_empty_buf: AES Encrypt and decrypt 0 bytes depends_on:POLARSSL_AES_C -enc_dec_buf:POLARSSL_CIPHER_AES_128_CBC:AES-128-CBC:128:0 +enc_dec_buf:POLARSSL_CIPHER_AES_128_CBC:AES-128-CBC:128:0:-1:-1 AES Encrypt and decrypt 1 byte depends_on:POLARSSL_AES_C -enc_dec_buf:POLARSSL_CIPHER_AES_128_CBC:AES-128-CBC:128:1 +enc_dec_buf:POLARSSL_CIPHER_AES_128_CBC:AES-128-CBC:128:1:-1 AES Encrypt and decrypt 2 bytes depends_on:POLARSSL_AES_C -enc_dec_buf:POLARSSL_CIPHER_AES_128_CBC:AES-128-CBC:128:2 +enc_dec_buf:POLARSSL_CIPHER_AES_128_CBC:AES-128-CBC:128:2:-1 AES Encrypt and decrypt 7 bytes depends_on:POLARSSL_AES_C -enc_dec_buf:POLARSSL_CIPHER_AES_128_CBC:AES-128-CBC:128:7 +enc_dec_buf:POLARSSL_CIPHER_AES_128_CBC:AES-128-CBC:128:7:-1 AES Encrypt and decrypt 8 bytes depends_on:POLARSSL_AES_C -enc_dec_buf:POLARSSL_CIPHER_AES_128_CBC:AES-128-CBC:128:8 +enc_dec_buf:POLARSSL_CIPHER_AES_128_CBC:AES-128-CBC:128:8:-1 AES Encrypt and decrypt 9 bytes depends_on:POLARSSL_AES_C -enc_dec_buf:POLARSSL_CIPHER_AES_128_CBC:AES-128-CBC:128:9 +enc_dec_buf:POLARSSL_CIPHER_AES_128_CBC:AES-128-CBC:128:9:-1 AES Encrypt and decrypt 15 bytes depends_on:POLARSSL_AES_C -enc_dec_buf:POLARSSL_CIPHER_AES_128_CBC:AES-128-CBC:128:15 +enc_dec_buf:POLARSSL_CIPHER_AES_128_CBC:AES-128-CBC:128:15:-1 AES Encrypt and decrypt 16 bytes depends_on:POLARSSL_AES_C -enc_dec_buf:POLARSSL_CIPHER_AES_128_CBC:AES-128-CBC:128:16 +enc_dec_buf:POLARSSL_CIPHER_AES_128_CBC:AES-128-CBC:128:16:-1 AES Encrypt and decrypt 17 bytes depends_on:POLARSSL_AES_C -enc_dec_buf:POLARSSL_CIPHER_AES_128_CBC:AES-128-CBC:128:17 +enc_dec_buf:POLARSSL_CIPHER_AES_128_CBC:AES-128-CBC:128:17:-1 AES Encrypt and decrypt 31 bytes depends_on:POLARSSL_AES_C -enc_dec_buf:POLARSSL_CIPHER_AES_128_CBC:AES-128-CBC:128:31 +enc_dec_buf:POLARSSL_CIPHER_AES_128_CBC:AES-128-CBC:128:31:-1 AES Encrypt and decrypt 32 bytes depends_on:POLARSSL_AES_C -enc_dec_buf:POLARSSL_CIPHER_AES_128_CBC:AES-128-CBC:128:32 +enc_dec_buf:POLARSSL_CIPHER_AES_128_CBC:AES-128-CBC:128:32:-1 AES Encrypt and decrypt 32 bytes depends_on:POLARSSL_AES_C -enc_dec_buf:POLARSSL_CIPHER_AES_128_CBC:AES-128-CBC:128:33 +enc_dec_buf:POLARSSL_CIPHER_AES_128_CBC:AES-128-CBC:128:33:-1 AES Encrypt and decrypt 47 bytes depends_on:POLARSSL_AES_C -enc_dec_buf:POLARSSL_CIPHER_AES_128_CBC:AES-128-CBC:128:47 +enc_dec_buf:POLARSSL_CIPHER_AES_128_CBC:AES-128-CBC:128:47:-1 AES Encrypt and decrypt 48 bytes depends_on:POLARSSL_AES_C -enc_dec_buf:POLARSSL_CIPHER_AES_128_CBC:AES-128-CBC:128:48 +enc_dec_buf:POLARSSL_CIPHER_AES_128_CBC:AES-128-CBC:128:48:-1 AES Encrypt and decrypt 49 bytes depends_on:POLARSSL_AES_C -enc_dec_buf:POLARSSL_CIPHER_AES_128_CBC:AES-128-CBC:128:49 +enc_dec_buf:POLARSSL_CIPHER_AES_128_CBC:AES-128-CBC:128:49:-1 + +AES Encrypt and decrypt 0 bytes with one and zeros padding +depends_on:POLARSSL_AES_C +enc_dec_buf:POLARSSL_CIPHER_AES_128_CBC:AES-128-CBC:128:0:POLARSSL_PADDING_ONE_AND_ZEROS + +AES Encrypt and decrypt 1 byte with one and zeros padding +depends_on:POLARSSL_AES_C +enc_dec_buf:POLARSSL_CIPHER_AES_128_CBC:AES-128-CBC:128:1:POLARSSL_PADDING_ONE_AND_ZEROS + +AES Encrypt and decrypt 2 bytes with one and zeros padding +depends_on:POLARSSL_AES_C +enc_dec_buf:POLARSSL_CIPHER_AES_128_CBC:AES-128-CBC:128:2:POLARSSL_PADDING_ONE_AND_ZEROS + +AES Encrypt and decrypt 7 bytes with one and zeros padding +depends_on:POLARSSL_AES_C +enc_dec_buf:POLARSSL_CIPHER_AES_128_CBC:AES-128-CBC:128:7:POLARSSL_PADDING_ONE_AND_ZEROS + +AES Encrypt and decrypt 8 bytes with one and zeros padding +depends_on:POLARSSL_AES_C +enc_dec_buf:POLARSSL_CIPHER_AES_128_CBC:AES-128-CBC:128:8:POLARSSL_PADDING_ONE_AND_ZEROS + +AES Encrypt and decrypt 9 bytes with one and zeros padding +depends_on:POLARSSL_AES_C +enc_dec_buf:POLARSSL_CIPHER_AES_128_CBC:AES-128-CBC:128:9:POLARSSL_PADDING_ONE_AND_ZEROS + +AES Encrypt and decrypt 15 bytes with one and zeros padding +depends_on:POLARSSL_AES_C +enc_dec_buf:POLARSSL_CIPHER_AES_128_CBC:AES-128-CBC:128:15:POLARSSL_PADDING_ONE_AND_ZEROS + +AES Encrypt and decrypt 16 bytes with one and zeros padding +depends_on:POLARSSL_AES_C +enc_dec_buf:POLARSSL_CIPHER_AES_128_CBC:AES-128-CBC:128:16:POLARSSL_PADDING_ONE_AND_ZEROS + +AES Encrypt and decrypt 17 bytes with one and zeros padding +depends_on:POLARSSL_AES_C +enc_dec_buf:POLARSSL_CIPHER_AES_128_CBC:AES-128-CBC:128:17:POLARSSL_PADDING_ONE_AND_ZEROS + +AES Encrypt and decrypt 31 bytes with one and zeros padding +depends_on:POLARSSL_AES_C +enc_dec_buf:POLARSSL_CIPHER_AES_128_CBC:AES-128-CBC:128:31:POLARSSL_PADDING_ONE_AND_ZEROS + +AES Encrypt and decrypt 32 bytes with one and zeros padding +depends_on:POLARSSL_AES_C +enc_dec_buf:POLARSSL_CIPHER_AES_128_CBC:AES-128-CBC:128:32:POLARSSL_PADDING_ONE_AND_ZEROS + +AES Encrypt and decrypt 33 bytes with one and zeros padding +depends_on:POLARSSL_AES_C +enc_dec_buf:POLARSSL_CIPHER_AES_128_CBC:AES-128-CBC:128:33:POLARSSL_PADDING_ONE_AND_ZEROS + +AES Encrypt and decrypt 47 bytes with one and zeros padding +depends_on:POLARSSL_AES_C +enc_dec_buf:POLARSSL_CIPHER_AES_128_CBC:AES-128-CBC:128:47:POLARSSL_PADDING_ONE_AND_ZEROS + +AES Encrypt and decrypt 48 bytes with one and zeros padding +depends_on:POLARSSL_AES_C +enc_dec_buf:POLARSSL_CIPHER_AES_128_CBC:AES-128-CBC:128:48:POLARSSL_PADDING_ONE_AND_ZEROS + +AES Encrypt and decrypt 49 bytes with one and zeros padding +depends_on:POLARSSL_AES_C +enc_dec_buf:POLARSSL_CIPHER_AES_128_CBC:AES-128-CBC:128:49:POLARSSL_PADDING_ONE_AND_ZEROS + +AES Encrypt and decrypt 0 bytes with zeros and len padding +depends_on:POLARSSL_AES_C +enc_dec_buf:POLARSSL_CIPHER_AES_128_CBC:AES-128-CBC:128:0:POLARSSL_PADDING_ZEROS_AND_LEN + +AES Encrypt and decrypt 1 byte with zeros and len padding +depends_on:POLARSSL_AES_C +enc_dec_buf:POLARSSL_CIPHER_AES_128_CBC:AES-128-CBC:128:1:POLARSSL_PADDING_ZEROS_AND_LEN + +AES Encrypt and decrypt 2 bytes with zeros and len padding +depends_on:POLARSSL_AES_C +enc_dec_buf:POLARSSL_CIPHER_AES_128_CBC:AES-128-CBC:128:2:POLARSSL_PADDING_ZEROS_AND_LEN + +AES Encrypt and decrypt 7 bytes with zeros and len padding +depends_on:POLARSSL_AES_C +enc_dec_buf:POLARSSL_CIPHER_AES_128_CBC:AES-128-CBC:128:7:POLARSSL_PADDING_ZEROS_AND_LEN + +AES Encrypt and decrypt 8 bytes with zeros and len padding +depends_on:POLARSSL_AES_C +enc_dec_buf:POLARSSL_CIPHER_AES_128_CBC:AES-128-CBC:128:8:POLARSSL_PADDING_ZEROS_AND_LEN + +AES Encrypt and decrypt 9 bytes with zeros and len padding +depends_on:POLARSSL_AES_C +enc_dec_buf:POLARSSL_CIPHER_AES_128_CBC:AES-128-CBC:128:9:POLARSSL_PADDING_ZEROS_AND_LEN + +AES Encrypt and decrypt 15 bytes with zeros and len padding +depends_on:POLARSSL_AES_C +enc_dec_buf:POLARSSL_CIPHER_AES_128_CBC:AES-128-CBC:128:15:POLARSSL_PADDING_ZEROS_AND_LEN + +AES Encrypt and decrypt 16 bytes with zeros and len padding +depends_on:POLARSSL_AES_C +enc_dec_buf:POLARSSL_CIPHER_AES_128_CBC:AES-128-CBC:128:16:POLARSSL_PADDING_ZEROS_AND_LEN + +AES Encrypt and decrypt 17 bytes with zeros and len padding +depends_on:POLARSSL_AES_C +enc_dec_buf:POLARSSL_CIPHER_AES_128_CBC:AES-128-CBC:128:17:POLARSSL_PADDING_ZEROS_AND_LEN + +AES Encrypt and decrypt 31 bytes with zeros and len padding +depends_on:POLARSSL_AES_C +enc_dec_buf:POLARSSL_CIPHER_AES_128_CBC:AES-128-CBC:128:31:POLARSSL_PADDING_ZEROS_AND_LEN + +AES Encrypt and decrypt 32 bytes with zeros and len padding +depends_on:POLARSSL_AES_C +enc_dec_buf:POLARSSL_CIPHER_AES_128_CBC:AES-128-CBC:128:32:POLARSSL_PADDING_ZEROS_AND_LEN + +AES Encrypt and decrypt 33 bytes with zeros and len padding +depends_on:POLARSSL_AES_C +enc_dec_buf:POLARSSL_CIPHER_AES_128_CBC:AES-128-CBC:128:33:POLARSSL_PADDING_ZEROS_AND_LEN + +AES Encrypt and decrypt 47 bytes with zeros and len padding +depends_on:POLARSSL_AES_C +enc_dec_buf:POLARSSL_CIPHER_AES_128_CBC:AES-128-CBC:128:47:POLARSSL_PADDING_ZEROS_AND_LEN + +AES Encrypt and decrypt 48 bytes with zeros and len padding +depends_on:POLARSSL_AES_C +enc_dec_buf:POLARSSL_CIPHER_AES_128_CBC:AES-128-CBC:128:48:POLARSSL_PADDING_ZEROS_AND_LEN + +AES Encrypt and decrypt 49 bytes with zeros and len padding +depends_on:POLARSSL_AES_C +enc_dec_buf:POLARSSL_CIPHER_AES_128_CBC:AES-128-CBC:128:49:POLARSSL_PADDING_ZEROS_AND_LEN + +AES Encrypt and decrypt 0 bytes with zeros padding +depends_on:POLARSSL_AES_C +enc_dec_buf:POLARSSL_CIPHER_AES_128_CBC:AES-128-CBC:128:0:POLARSSL_PADDING_ZEROS + +AES Encrypt and decrypt 1 byte with zeros padding +depends_on:POLARSSL_AES_C +enc_dec_buf:POLARSSL_CIPHER_AES_128_CBC:AES-128-CBC:128:1:POLARSSL_PADDING_ZEROS + +AES Encrypt and decrypt 2 bytes with zeros padding +depends_on:POLARSSL_AES_C +enc_dec_buf:POLARSSL_CIPHER_AES_128_CBC:AES-128-CBC:128:2:POLARSSL_PADDING_ZEROS + +AES Encrypt and decrypt 7 bytes with zeros padding +depends_on:POLARSSL_AES_C +enc_dec_buf:POLARSSL_CIPHER_AES_128_CBC:AES-128-CBC:128:7:POLARSSL_PADDING_ZEROS + +AES Encrypt and decrypt 8 bytes with zeros padding +depends_on:POLARSSL_AES_C +enc_dec_buf:POLARSSL_CIPHER_AES_128_CBC:AES-128-CBC:128:8:POLARSSL_PADDING_ZEROS + +AES Encrypt and decrypt 9 bytes with zeros padding +depends_on:POLARSSL_AES_C +enc_dec_buf:POLARSSL_CIPHER_AES_128_CBC:AES-128-CBC:128:9:POLARSSL_PADDING_ZEROS + +AES Encrypt and decrypt 15 bytes with zeros padding +depends_on:POLARSSL_AES_C +enc_dec_buf:POLARSSL_CIPHER_AES_128_CBC:AES-128-CBC:128:15:POLARSSL_PADDING_ZEROS + +AES Encrypt and decrypt 16 bytes with zeros padding +depends_on:POLARSSL_AES_C +enc_dec_buf:POLARSSL_CIPHER_AES_128_CBC:AES-128-CBC:128:16:POLARSSL_PADDING_ZEROS + +AES Encrypt and decrypt 17 bytes with zeros padding +depends_on:POLARSSL_AES_C +enc_dec_buf:POLARSSL_CIPHER_AES_128_CBC:AES-128-CBC:128:17:POLARSSL_PADDING_ZEROS + +AES Encrypt and decrypt 31 bytes with zeros padding +depends_on:POLARSSL_AES_C +enc_dec_buf:POLARSSL_CIPHER_AES_128_CBC:AES-128-CBC:128:31:POLARSSL_PADDING_ZEROS + +AES Encrypt and decrypt 32 bytes with zeros padding +depends_on:POLARSSL_AES_C +enc_dec_buf:POLARSSL_CIPHER_AES_128_CBC:AES-128-CBC:128:32:POLARSSL_PADDING_ZEROS + +AES Encrypt and decrypt 33 bytes with zeros padding +depends_on:POLARSSL_AES_C +enc_dec_buf:POLARSSL_CIPHER_AES_128_CBC:AES-128-CBC:128:33:POLARSSL_PADDING_ZEROS + +AES Encrypt and decrypt 47 bytes with zeros padding +depends_on:POLARSSL_AES_C +enc_dec_buf:POLARSSL_CIPHER_AES_128_CBC:AES-128-CBC:128:47:POLARSSL_PADDING_ZEROS + +AES Encrypt and decrypt 48 bytes with zeros padding +depends_on:POLARSSL_AES_C +enc_dec_buf:POLARSSL_CIPHER_AES_128_CBC:AES-128-CBC:128:48:POLARSSL_PADDING_ZEROS + +AES Encrypt and decrypt 49 bytes with zeros padding +depends_on:POLARSSL_AES_C +enc_dec_buf:POLARSSL_CIPHER_AES_128_CBC:AES-128-CBC:128:49:POLARSSL_PADDING_ZEROS + +AES Encrypt and decrypt 0 bytes with no padding +depends_on:POLARSSL_AES_C +enc_dec_buf:POLARSSL_CIPHER_AES_128_CBC:AES-128-CBC:128:0:POLARSSL_PADDING_NONE + +AES Encrypt and decrypt 16 bytes with no padding +depends_on:POLARSSL_AES_C +enc_dec_buf:POLARSSL_CIPHER_AES_128_CBC:AES-128-CBC:128:16:POLARSSL_PADDING_NONE + +AES Encrypt and decrypt 32 bytes with no padding +depends_on:POLARSSL_AES_C +enc_dec_buf:POLARSSL_CIPHER_AES_128_CBC:AES-128-CBC:128:32:POLARSSL_PADDING_NONE + +AES Encrypt and decrypt 48 bytes with no padding +depends_on:POLARSSL_AES_C +enc_dec_buf:POLARSSL_CIPHER_AES_128_CBC:AES-128-CBC:128:48:POLARSSL_PADDING_NONE + +AES Try encrypting 1 bytes with no padding +depends_on:POLARSSL_AES_C +enc_fail:POLARSSL_CIPHER_AES_128_CBC:POLARSSL_PADDING_NONE:128:1:POLARSSL_ERR_CIPHER_FULL_BLOCK_EXPECTED + +AES Try encrypting 2 bytes with no padding +depends_on:POLARSSL_AES_C +enc_fail:POLARSSL_CIPHER_AES_128_CBC:POLARSSL_PADDING_NONE:128:2:POLARSSL_ERR_CIPHER_FULL_BLOCK_EXPECTED + +AES Try encrypting 7 bytes with no padding +depends_on:POLARSSL_AES_C +enc_fail:POLARSSL_CIPHER_AES_128_CBC:POLARSSL_PADDING_NONE:128:7:POLARSSL_ERR_CIPHER_FULL_BLOCK_EXPECTED + +AES Try encrypting 8 bytes with no padding +depends_on:POLARSSL_AES_C +enc_fail:POLARSSL_CIPHER_AES_128_CBC:POLARSSL_PADDING_NONE:128:8:POLARSSL_ERR_CIPHER_FULL_BLOCK_EXPECTED + +AES Try encrypting 9 bytes with no padding +depends_on:POLARSSL_AES_C +enc_fail:POLARSSL_CIPHER_AES_128_CBC:POLARSSL_PADDING_NONE:128:9:POLARSSL_ERR_CIPHER_FULL_BLOCK_EXPECTED + +AES Try encrypting 15 bytes with no padding +depends_on:POLARSSL_AES_C +enc_fail:POLARSSL_CIPHER_AES_128_CBC:POLARSSL_PADDING_NONE:128:15:POLARSSL_ERR_CIPHER_FULL_BLOCK_EXPECTED + +AES Try encrypting 17 bytes with no padding +depends_on:POLARSSL_AES_C +enc_fail:POLARSSL_CIPHER_AES_128_CBC:POLARSSL_PADDING_NONE:128:17:POLARSSL_ERR_CIPHER_FULL_BLOCK_EXPECTED + +AES Try encrypting 31 bytes with no padding +depends_on:POLARSSL_AES_C +enc_fail:POLARSSL_CIPHER_AES_128_CBC:POLARSSL_PADDING_NONE:128:31:POLARSSL_ERR_CIPHER_FULL_BLOCK_EXPECTED + +AES Try encrypting 33 bytes with no padding +depends_on:POLARSSL_AES_C +enc_fail:POLARSSL_CIPHER_AES_128_CBC:POLARSSL_PADDING_NONE:128:33:POLARSSL_ERR_CIPHER_FULL_BLOCK_EXPECTED + +AES Try encrypting 47 bytes with no padding +depends_on:POLARSSL_AES_C +enc_fail:POLARSSL_CIPHER_AES_128_CBC:POLARSSL_PADDING_NONE:128:47:POLARSSL_ERR_CIPHER_FULL_BLOCK_EXPECTED + +AES Try encrypting 49 bytes with no padding +depends_on:POLARSSL_AES_C +enc_fail:POLARSSL_CIPHER_AES_128_CBC:POLARSSL_PADDING_NONE:128:49:POLARSSL_ERR_CIPHER_FULL_BLOCK_EXPECTED AES Encrypt and decrypt 0 bytes in multiple parts depends_on:POLARSSL_AES_C @@ -111,63 +351,63 @@ enc_dec_buf_multipart:POLARSSL_CIPHER_AES_128_CBC:128:16:16: AES Encrypt and decrypt 0 bytes depends_on:POLARSSL_AES_C:POLARSSL_CIPHER_MODE_CFB -enc_dec_buf:POLARSSL_CIPHER_AES_128_CFB128:AES-128-CFB128:128:0 +enc_dec_buf:POLARSSL_CIPHER_AES_128_CFB128:AES-128-CFB128:128:0:-1 AES Encrypt and decrypt 1 byte depends_on:POLARSSL_AES_C:POLARSSL_CIPHER_MODE_CFB -enc_dec_buf:POLARSSL_CIPHER_AES_128_CFB128:AES-128-CFB128:128:1 +enc_dec_buf:POLARSSL_CIPHER_AES_128_CFB128:AES-128-CFB128:128:1:-1 AES Encrypt and decrypt 2 bytes depends_on:POLARSSL_AES_C:POLARSSL_CIPHER_MODE_CFB -enc_dec_buf:POLARSSL_CIPHER_AES_128_CFB128:AES-128-CFB128:128:2 +enc_dec_buf:POLARSSL_CIPHER_AES_128_CFB128:AES-128-CFB128:128:2:-1 AES Encrypt and decrypt 7 bytes depends_on:POLARSSL_AES_C:POLARSSL_CIPHER_MODE_CFB -enc_dec_buf:POLARSSL_CIPHER_AES_128_CFB128:AES-128-CFB128:128:7 +enc_dec_buf:POLARSSL_CIPHER_AES_128_CFB128:AES-128-CFB128:128:7:-1 AES Encrypt and decrypt 8 bytes depends_on:POLARSSL_AES_C:POLARSSL_CIPHER_MODE_CFB -enc_dec_buf:POLARSSL_CIPHER_AES_128_CFB128:AES-128-CFB128:128:8 +enc_dec_buf:POLARSSL_CIPHER_AES_128_CFB128:AES-128-CFB128:128:8:-1 AES Encrypt and decrypt 9 bytes depends_on:POLARSSL_AES_C:POLARSSL_CIPHER_MODE_CFB -enc_dec_buf:POLARSSL_CIPHER_AES_128_CFB128:AES-128-CFB128:128:9 +enc_dec_buf:POLARSSL_CIPHER_AES_128_CFB128:AES-128-CFB128:128:9:-1 AES Encrypt and decrypt 15 bytes depends_on:POLARSSL_AES_C:POLARSSL_CIPHER_MODE_CFB -enc_dec_buf:POLARSSL_CIPHER_AES_128_CFB128:AES-128-CFB128:128:15 +enc_dec_buf:POLARSSL_CIPHER_AES_128_CFB128:AES-128-CFB128:128:15:-1 AES Encrypt and decrypt 16 bytes depends_on:POLARSSL_AES_C:POLARSSL_CIPHER_MODE_CFB -enc_dec_buf:POLARSSL_CIPHER_AES_128_CFB128:AES-128-CFB128:128:16 +enc_dec_buf:POLARSSL_CIPHER_AES_128_CFB128:AES-128-CFB128:128:16:-1 AES Encrypt and decrypt 17 bytes depends_on:POLARSSL_AES_C:POLARSSL_CIPHER_MODE_CFB -enc_dec_buf:POLARSSL_CIPHER_AES_128_CFB128:AES-128-CFB128:128:17 +enc_dec_buf:POLARSSL_CIPHER_AES_128_CFB128:AES-128-CFB128:128:17:-1 AES Encrypt and decrypt 31 bytes depends_on:POLARSSL_AES_C:POLARSSL_CIPHER_MODE_CFB -enc_dec_buf:POLARSSL_CIPHER_AES_128_CFB128:AES-128-CFB128:128:31 +enc_dec_buf:POLARSSL_CIPHER_AES_128_CFB128:AES-128-CFB128:128:31:-1 AES Encrypt and decrypt 32 bytes depends_on:POLARSSL_AES_C:POLARSSL_CIPHER_MODE_CFB -enc_dec_buf:POLARSSL_CIPHER_AES_128_CFB128:AES-128-CFB128:128:32 +enc_dec_buf:POLARSSL_CIPHER_AES_128_CFB128:AES-128-CFB128:128:32:-1 AES Encrypt and decrypt 32 bytes depends_on:POLARSSL_AES_C:POLARSSL_CIPHER_MODE_CFB -enc_dec_buf:POLARSSL_CIPHER_AES_128_CFB128:AES-128-CFB128:128:33 +enc_dec_buf:POLARSSL_CIPHER_AES_128_CFB128:AES-128-CFB128:128:33:-1 AES Encrypt and decrypt 47 bytes depends_on:POLARSSL_AES_C:POLARSSL_CIPHER_MODE_CFB -enc_dec_buf:POLARSSL_CIPHER_AES_128_CFB128:AES-128-CFB128:128:47 +enc_dec_buf:POLARSSL_CIPHER_AES_128_CFB128:AES-128-CFB128:128:47:-1 AES Encrypt and decrypt 48 bytes depends_on:POLARSSL_AES_C:POLARSSL_CIPHER_MODE_CFB -enc_dec_buf:POLARSSL_CIPHER_AES_128_CFB128:AES-128-CFB128:128:48 +enc_dec_buf:POLARSSL_CIPHER_AES_128_CFB128:AES-128-CFB128:128:48:-1 AES Encrypt and decrypt 49 bytes depends_on:POLARSSL_AES_C:POLARSSL_CIPHER_MODE_CFB -enc_dec_buf:POLARSSL_CIPHER_AES_128_CFB128:AES-128-CFB128:128:49 +enc_dec_buf:POLARSSL_CIPHER_AES_128_CFB128:AES-128-CFB128:128:49:-1 AES Encrypt and decrypt 0 bytes in multiple parts depends_on:POLARSSL_AES_C:POLARSSL_CIPHER_MODE_CFB @@ -215,63 +455,63 @@ enc_dec_buf_multipart:POLARSSL_CIPHER_AES_128_CFB128:128:16:16: AES Encrypt and decrypt 0 bytes depends_on:POLARSSL_AES_C:POLARSSL_CIPHER_MODE_CTR -enc_dec_buf:POLARSSL_CIPHER_AES_128_CTR:AES-128-CTR:128:0 +enc_dec_buf:POLARSSL_CIPHER_AES_128_CTR:AES-128-CTR:128:0:-1 AES Encrypt and decrypt 1 byte depends_on:POLARSSL_AES_C:POLARSSL_CIPHER_MODE_CTR -enc_dec_buf:POLARSSL_CIPHER_AES_128_CTR:AES-128-CTR:128:1 +enc_dec_buf:POLARSSL_CIPHER_AES_128_CTR:AES-128-CTR:128:1:-1 AES Encrypt and decrypt 2 bytes depends_on:POLARSSL_AES_C:POLARSSL_CIPHER_MODE_CTR -enc_dec_buf:POLARSSL_CIPHER_AES_128_CTR:AES-128-CTR:128:2 +enc_dec_buf:POLARSSL_CIPHER_AES_128_CTR:AES-128-CTR:128:2:-1 AES Encrypt and decrypt 7 bytes depends_on:POLARSSL_AES_C:POLARSSL_CIPHER_MODE_CTR -enc_dec_buf:POLARSSL_CIPHER_AES_128_CTR:AES-128-CTR:128:7 +enc_dec_buf:POLARSSL_CIPHER_AES_128_CTR:AES-128-CTR:128:7:-1 AES Encrypt and decrypt 8 bytes depends_on:POLARSSL_AES_C:POLARSSL_CIPHER_MODE_CTR -enc_dec_buf:POLARSSL_CIPHER_AES_128_CTR:AES-128-CTR:128:8 +enc_dec_buf:POLARSSL_CIPHER_AES_128_CTR:AES-128-CTR:128:8:-1 AES Encrypt and decrypt 9 bytes depends_on:POLARSSL_AES_C:POLARSSL_CIPHER_MODE_CTR -enc_dec_buf:POLARSSL_CIPHER_AES_128_CTR:AES-128-CTR:128:9 +enc_dec_buf:POLARSSL_CIPHER_AES_128_CTR:AES-128-CTR:128:9:-1 AES Encrypt and decrypt 15 bytes depends_on:POLARSSL_AES_C:POLARSSL_CIPHER_MODE_CTR -enc_dec_buf:POLARSSL_CIPHER_AES_128_CTR:AES-128-CTR:128:15 +enc_dec_buf:POLARSSL_CIPHER_AES_128_CTR:AES-128-CTR:128:15:-1 AES Encrypt and decrypt 16 bytes depends_on:POLARSSL_AES_C:POLARSSL_CIPHER_MODE_CTR -enc_dec_buf:POLARSSL_CIPHER_AES_128_CTR:AES-128-CTR:128:16 +enc_dec_buf:POLARSSL_CIPHER_AES_128_CTR:AES-128-CTR:128:16:-1 AES Encrypt and decrypt 17 bytes depends_on:POLARSSL_AES_C:POLARSSL_CIPHER_MODE_CTR -enc_dec_buf:POLARSSL_CIPHER_AES_128_CTR:AES-128-CTR:128:17 +enc_dec_buf:POLARSSL_CIPHER_AES_128_CTR:AES-128-CTR:128:17:-1 AES Encrypt and decrypt 31 bytes depends_on:POLARSSL_AES_C:POLARSSL_CIPHER_MODE_CTR -enc_dec_buf:POLARSSL_CIPHER_AES_128_CTR:AES-128-CTR:128:31 +enc_dec_buf:POLARSSL_CIPHER_AES_128_CTR:AES-128-CTR:128:31:-1 AES Encrypt and decrypt 32 bytes depends_on:POLARSSL_AES_C:POLARSSL_CIPHER_MODE_CTR -enc_dec_buf:POLARSSL_CIPHER_AES_128_CTR:AES-128-CTR:128:32 +enc_dec_buf:POLARSSL_CIPHER_AES_128_CTR:AES-128-CTR:128:32:-1 AES Encrypt and decrypt 32 bytes depends_on:POLARSSL_AES_C:POLARSSL_CIPHER_MODE_CTR -enc_dec_buf:POLARSSL_CIPHER_AES_128_CTR:AES-128-CTR:128:33 +enc_dec_buf:POLARSSL_CIPHER_AES_128_CTR:AES-128-CTR:128:33:-1 AES Encrypt and decrypt 47 bytes depends_on:POLARSSL_AES_C:POLARSSL_CIPHER_MODE_CTR -enc_dec_buf:POLARSSL_CIPHER_AES_128_CTR:AES-128-CTR:128:47 +enc_dec_buf:POLARSSL_CIPHER_AES_128_CTR:AES-128-CTR:128:47:-1 AES Encrypt and decrypt 48 bytes depends_on:POLARSSL_AES_C:POLARSSL_CIPHER_MODE_CTR -enc_dec_buf:POLARSSL_CIPHER_AES_128_CTR:AES-128-CTR:128:48 +enc_dec_buf:POLARSSL_CIPHER_AES_128_CTR:AES-128-CTR:128:48:-1 AES Encrypt and decrypt 49 bytes depends_on:POLARSSL_AES_C:POLARSSL_CIPHER_MODE_CTR -enc_dec_buf:POLARSSL_CIPHER_AES_128_CTR:AES-128-CTR:128:49 +enc_dec_buf:POLARSSL_CIPHER_AES_128_CTR:AES-128-CTR:128:49:-1 AES Encrypt and decrypt 0 bytes in multiple parts depends_on:POLARSSL_AES_C:POLARSSL_CIPHER_MODE_CTR @@ -319,63 +559,63 @@ enc_dec_buf_multipart:POLARSSL_CIPHER_AES_128_CTR:128:16:16: AES Encrypt and decrypt 0 bytes depends_on:POLARSSL_AES_C -enc_dec_buf:POLARSSL_CIPHER_AES_192_CBC:AES-192-CBC:192:0 +enc_dec_buf:POLARSSL_CIPHER_AES_192_CBC:AES-192-CBC:192:0:-1 AES Encrypt and decrypt 1 byte depends_on:POLARSSL_AES_C -enc_dec_buf:POLARSSL_CIPHER_AES_192_CBC:AES-192-CBC:192:1 +enc_dec_buf:POLARSSL_CIPHER_AES_192_CBC:AES-192-CBC:192:1:-1 AES Encrypt and decrypt 2 bytes depends_on:POLARSSL_AES_C -enc_dec_buf:POLARSSL_CIPHER_AES_192_CBC:AES-192-CBC:192:2 +enc_dec_buf:POLARSSL_CIPHER_AES_192_CBC:AES-192-CBC:192:2:-1 AES Encrypt and decrypt 7 bytes depends_on:POLARSSL_AES_C -enc_dec_buf:POLARSSL_CIPHER_AES_192_CBC:AES-192-CBC:192:7 +enc_dec_buf:POLARSSL_CIPHER_AES_192_CBC:AES-192-CBC:192:7:-1 AES Encrypt and decrypt 8 bytes depends_on:POLARSSL_AES_C -enc_dec_buf:POLARSSL_CIPHER_AES_192_CBC:AES-192-CBC:192:8 +enc_dec_buf:POLARSSL_CIPHER_AES_192_CBC:AES-192-CBC:192:8:-1 AES Encrypt and decrypt 9 bytes depends_on:POLARSSL_AES_C -enc_dec_buf:POLARSSL_CIPHER_AES_192_CBC:AES-192-CBC:192:9 +enc_dec_buf:POLARSSL_CIPHER_AES_192_CBC:AES-192-CBC:192:9:-1 AES Encrypt and decrypt 15 bytes depends_on:POLARSSL_AES_C -enc_dec_buf:POLARSSL_CIPHER_AES_192_CBC:AES-192-CBC:192:15 +enc_dec_buf:POLARSSL_CIPHER_AES_192_CBC:AES-192-CBC:192:15:-1 AES Encrypt and decrypt 16 bytes depends_on:POLARSSL_AES_C -enc_dec_buf:POLARSSL_CIPHER_AES_192_CBC:AES-192-CBC:192:16 +enc_dec_buf:POLARSSL_CIPHER_AES_192_CBC:AES-192-CBC:192:16:-1 AES Encrypt and decrypt 17 bytes depends_on:POLARSSL_AES_C -enc_dec_buf:POLARSSL_CIPHER_AES_192_CBC:AES-192-CBC:192:17 +enc_dec_buf:POLARSSL_CIPHER_AES_192_CBC:AES-192-CBC:192:17:-1 AES Encrypt and decrypt 31 bytes depends_on:POLARSSL_AES_C -enc_dec_buf:POLARSSL_CIPHER_AES_192_CBC:AES-192-CBC:192:31 +enc_dec_buf:POLARSSL_CIPHER_AES_192_CBC:AES-192-CBC:192:31:-1 AES Encrypt and decrypt 32 bytes depends_on:POLARSSL_AES_C -enc_dec_buf:POLARSSL_CIPHER_AES_192_CBC:AES-192-CBC:192:32 +enc_dec_buf:POLARSSL_CIPHER_AES_192_CBC:AES-192-CBC:192:32:-1 AES Encrypt and decrypt 32 bytes depends_on:POLARSSL_AES_C -enc_dec_buf:POLARSSL_CIPHER_AES_192_CBC:AES-192-CBC:192:33 +enc_dec_buf:POLARSSL_CIPHER_AES_192_CBC:AES-192-CBC:192:33:-1 AES Encrypt and decrypt 47 bytes depends_on:POLARSSL_AES_C -enc_dec_buf:POLARSSL_CIPHER_AES_192_CBC:AES-192-CBC:192:47 +enc_dec_buf:POLARSSL_CIPHER_AES_192_CBC:AES-192-CBC:192:47:-1 AES Encrypt and decrypt 48 bytes depends_on:POLARSSL_AES_C -enc_dec_buf:POLARSSL_CIPHER_AES_192_CBC:AES-192-CBC:192:48 +enc_dec_buf:POLARSSL_CIPHER_AES_192_CBC:AES-192-CBC:192:48:-1 AES Encrypt and decrypt 49 bytes depends_on:POLARSSL_AES_C -enc_dec_buf:POLARSSL_CIPHER_AES_192_CBC:AES-192-CBC:192:49 +enc_dec_buf:POLARSSL_CIPHER_AES_192_CBC:AES-192-CBC:192:49:-1 AES Encrypt and decrypt 0 bytes in multiple parts depends_on:POLARSSL_AES_C @@ -423,63 +663,63 @@ enc_dec_buf_multipart:POLARSSL_CIPHER_AES_192_CBC:192:16:16: AES Encrypt and decrypt 0 bytes depends_on:POLARSSL_AES_C -enc_dec_buf:POLARSSL_CIPHER_AES_256_CBC:AES-256-CBC:256:0 +enc_dec_buf:POLARSSL_CIPHER_AES_256_CBC:AES-256-CBC:256:0:-1 AES Encrypt and decrypt 1 byte depends_on:POLARSSL_AES_C -enc_dec_buf:POLARSSL_CIPHER_AES_256_CBC:AES-256-CBC:256:1 +enc_dec_buf:POLARSSL_CIPHER_AES_256_CBC:AES-256-CBC:256:1:-1 AES Encrypt and decrypt 2 bytes depends_on:POLARSSL_AES_C -enc_dec_buf:POLARSSL_CIPHER_AES_256_CBC:AES-256-CBC:256:2 +enc_dec_buf:POLARSSL_CIPHER_AES_256_CBC:AES-256-CBC:256:2:-1 AES Encrypt and decrypt 7 bytes depends_on:POLARSSL_AES_C -enc_dec_buf:POLARSSL_CIPHER_AES_256_CBC:AES-256-CBC:256:7 +enc_dec_buf:POLARSSL_CIPHER_AES_256_CBC:AES-256-CBC:256:7:-1 AES Encrypt and decrypt 8 bytes depends_on:POLARSSL_AES_C -enc_dec_buf:POLARSSL_CIPHER_AES_256_CBC:AES-256-CBC:256:8 +enc_dec_buf:POLARSSL_CIPHER_AES_256_CBC:AES-256-CBC:256:8:-1 AES Encrypt and decrypt 9 bytes depends_on:POLARSSL_AES_C -enc_dec_buf:POLARSSL_CIPHER_AES_256_CBC:AES-256-CBC:256:9 +enc_dec_buf:POLARSSL_CIPHER_AES_256_CBC:AES-256-CBC:256:9:-1 AES Encrypt and decrypt 15 bytes depends_on:POLARSSL_AES_C -enc_dec_buf:POLARSSL_CIPHER_AES_256_CBC:AES-256-CBC:256:15 +enc_dec_buf:POLARSSL_CIPHER_AES_256_CBC:AES-256-CBC:256:15:-1 AES Encrypt and decrypt 16 bytes depends_on:POLARSSL_AES_C -enc_dec_buf:POLARSSL_CIPHER_AES_256_CBC:AES-256-CBC:256:16 +enc_dec_buf:POLARSSL_CIPHER_AES_256_CBC:AES-256-CBC:256:16:-1 AES Encrypt and decrypt 17 bytes depends_on:POLARSSL_AES_C -enc_dec_buf:POLARSSL_CIPHER_AES_256_CBC:AES-256-CBC:256:17 +enc_dec_buf:POLARSSL_CIPHER_AES_256_CBC:AES-256-CBC:256:17:-1 AES Encrypt and decrypt 31 bytes depends_on:POLARSSL_AES_C -enc_dec_buf:POLARSSL_CIPHER_AES_256_CBC:AES-256-CBC:256:31 +enc_dec_buf:POLARSSL_CIPHER_AES_256_CBC:AES-256-CBC:256:31:-1 AES Encrypt and decrypt 32 bytes depends_on:POLARSSL_AES_C -enc_dec_buf:POLARSSL_CIPHER_AES_256_CBC:AES-256-CBC:256:32 +enc_dec_buf:POLARSSL_CIPHER_AES_256_CBC:AES-256-CBC:256:32:-1 AES Encrypt and decrypt 32 bytes depends_on:POLARSSL_AES_C -enc_dec_buf:POLARSSL_CIPHER_AES_256_CBC:AES-256-CBC:256:33 +enc_dec_buf:POLARSSL_CIPHER_AES_256_CBC:AES-256-CBC:256:33:-1 AES Encrypt and decrypt 47 bytes depends_on:POLARSSL_AES_C -enc_dec_buf:POLARSSL_CIPHER_AES_256_CBC:AES-256-CBC:256:47 +enc_dec_buf:POLARSSL_CIPHER_AES_256_CBC:AES-256-CBC:256:47:-1 AES Encrypt and decrypt 48 bytes depends_on:POLARSSL_AES_C -enc_dec_buf:POLARSSL_CIPHER_AES_256_CBC:AES-256-CBC:256:48 +enc_dec_buf:POLARSSL_CIPHER_AES_256_CBC:AES-256-CBC:256:48:-1 AES Encrypt and decrypt 49 bytes depends_on:POLARSSL_AES_C -enc_dec_buf:POLARSSL_CIPHER_AES_256_CBC:AES-256-CBC:256:49 +enc_dec_buf:POLARSSL_CIPHER_AES_256_CBC:AES-256-CBC:256:49:-1 AES Encrypt and decrypt 0 bytes in multiple parts depends_on:POLARSSL_AES_C diff --git a/tests/suites/test_suite_cipher.blowfish.data b/tests/suites/test_suite_cipher.blowfish.data index e3209a0d2..4ecf77408 100644 --- a/tests/suites/test_suite_cipher.blowfish.data +++ b/tests/suites/test_suite_cipher.blowfish.data @@ -7,63 +7,303 @@ dec_empty_buf: BLOWFISH Encrypt and decrypt 0 bytes depends_on:POLARSSL_BLOWFISH_C -enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:0 +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:0:-1 BLOWFISH Encrypt and decrypt 1 byte depends_on:POLARSSL_BLOWFISH_C -enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:1 +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:1:-1 BLOWFISH Encrypt and decrypt 2 bytes depends_on:POLARSSL_BLOWFISH_C -enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:2 +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:2:-1 BLOWFISH Encrypt and decrypt 7 bytes depends_on:POLARSSL_BLOWFISH_C -enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:7 +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:7:-1 BLOWFISH Encrypt and decrypt 8 bytes depends_on:POLARSSL_BLOWFISH_C -enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:8 +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:8:-1 BLOWFISH Encrypt and decrypt 9 bytes depends_on:POLARSSL_BLOWFISH_C -enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:9 +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:9:-1 BLOWFISH Encrypt and decrypt 15 bytes depends_on:POLARSSL_BLOWFISH_C -enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:15 +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:15:-1 BLOWFISH Encrypt and decrypt 16 bytes depends_on:POLARSSL_BLOWFISH_C -enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:16 +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:16:-1 BLOWFISH Encrypt and decrypt 17 bytes depends_on:POLARSSL_BLOWFISH_C -enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:17 +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:17:-1 BLOWFISH Encrypt and decrypt 31 bytes depends_on:POLARSSL_BLOWFISH_C -enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:31 +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:31:-1 BLOWFISH Encrypt and decrypt 32 bytes depends_on:POLARSSL_BLOWFISH_C -enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:32 +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:32:-1 BLOWFISH Encrypt and decrypt 32 bytes depends_on:POLARSSL_BLOWFISH_C -enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:33 +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:33:-1 BLOWFISH Encrypt and decrypt 47 bytes depends_on:POLARSSL_BLOWFISH_C -enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:47 +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:47:-1 BLOWFISH Encrypt and decrypt 48 bytes depends_on:POLARSSL_BLOWFISH_C -enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:48 +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:48:-1 BLOWFISH Encrypt and decrypt 49 bytes depends_on:POLARSSL_BLOWFISH_C -enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:49 +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:49:-1 + +BLOWFISH Encrypt and decrypt 0 bytes with one and zeros padding +depends_on:POLARSSL_BLOWFISH_C +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:0:POLARSSL_PADDING_ONE_AND_ZEROS + +BLOWFISH Encrypt and decrypt 1 byte with one and zeros padding +depends_on:POLARSSL_BLOWFISH_C +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:1:POLARSSL_PADDING_ONE_AND_ZEROS + +BLOWFISH Encrypt and decrypt 2 bytes with one and zeros padding +depends_on:POLARSSL_BLOWFISH_C +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:2:POLARSSL_PADDING_ONE_AND_ZEROS + +BLOWFISH Encrypt and decrypt 7 bytes with one and zeros padding +depends_on:POLARSSL_BLOWFISH_C +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:7:POLARSSL_PADDING_ONE_AND_ZEROS + +BLOWFISH Encrypt and decrypt 8 bytes with one and zeros padding +depends_on:POLARSSL_BLOWFISH_C +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:8:POLARSSL_PADDING_ONE_AND_ZEROS + +BLOWFISH Encrypt and decrypt 9 bytes with one and zeros padding +depends_on:POLARSSL_BLOWFISH_C +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:9:POLARSSL_PADDING_ONE_AND_ZEROS + +BLOWFISH Encrypt and decrypt 15 bytes with one and zeros padding +depends_on:POLARSSL_BLOWFISH_C +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:15:POLARSSL_PADDING_ONE_AND_ZEROS + +BLOWFISH Encrypt and decrypt 16 bytes with one and zeros padding +depends_on:POLARSSL_BLOWFISH_C +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:16:POLARSSL_PADDING_ONE_AND_ZEROS + +BLOWFISH Encrypt and decrypt 17 bytes with one and zeros padding +depends_on:POLARSSL_BLOWFISH_C +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:17:POLARSSL_PADDING_ONE_AND_ZEROS + +BLOWFISH Encrypt and decrypt 31 bytes with one and zeros padding +depends_on:POLARSSL_BLOWFISH_C +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:31:POLARSSL_PADDING_ONE_AND_ZEROS + +BLOWFISH Encrypt and decrypt 32 bytes with one and zeros padding +depends_on:POLARSSL_BLOWFISH_C +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:32:POLARSSL_PADDING_ONE_AND_ZEROS + +BLOWFISH Encrypt and decrypt 32 bytes with one and zeros padding +depends_on:POLARSSL_BLOWFISH_C +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:33:POLARSSL_PADDING_ONE_AND_ZEROS + +BLOWFISH Encrypt and decrypt 47 bytes with one and zeros padding +depends_on:POLARSSL_BLOWFISH_C +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:47:POLARSSL_PADDING_ONE_AND_ZEROS + +BLOWFISH Encrypt and decrypt 48 bytes with one and zeros padding +depends_on:POLARSSL_BLOWFISH_C +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:48:POLARSSL_PADDING_ONE_AND_ZEROS + +BLOWFISH Encrypt and decrypt 49 bytes with one and zeros padding +depends_on:POLARSSL_BLOWFISH_C +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:49:POLARSSL_PADDING_ONE_AND_ZEROS + +BLOWFISH Encrypt and decrypt 0 bytes with zeros and len padding +depends_on:POLARSSL_BLOWFISH_C +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:0:POLARSSL_PADDING_ZEROS_AND_LEN + +BLOWFISH Encrypt and decrypt 1 byte with zeros and len padding +depends_on:POLARSSL_BLOWFISH_C +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:1:POLARSSL_PADDING_ZEROS_AND_LEN + +BLOWFISH Encrypt and decrypt 2 bytes with zeros and len padding +depends_on:POLARSSL_BLOWFISH_C +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:2:POLARSSL_PADDING_ZEROS_AND_LEN + +BLOWFISH Encrypt and decrypt 7 bytes with zeros and len padding +depends_on:POLARSSL_BLOWFISH_C +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:7:POLARSSL_PADDING_ZEROS_AND_LEN + +BLOWFISH Encrypt and decrypt 8 bytes with zeros and len padding +depends_on:POLARSSL_BLOWFISH_C +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:8:POLARSSL_PADDING_ZEROS_AND_LEN + +BLOWFISH Encrypt and decrypt 9 bytes with zeros and len padding +depends_on:POLARSSL_BLOWFISH_C +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:9:POLARSSL_PADDING_ZEROS_AND_LEN + +BLOWFISH Encrypt and decrypt 15 bytes with zeros and len padding +depends_on:POLARSSL_BLOWFISH_C +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:15:POLARSSL_PADDING_ZEROS_AND_LEN + +BLOWFISH Encrypt and decrypt 16 bytes with zeros and len padding +depends_on:POLARSSL_BLOWFISH_C +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:16:POLARSSL_PADDING_ZEROS_AND_LEN + +BLOWFISH Encrypt and decrypt 17 bytes with zeros and len padding +depends_on:POLARSSL_BLOWFISH_C +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:17:POLARSSL_PADDING_ZEROS_AND_LEN + +BLOWFISH Encrypt and decrypt 31 bytes with zeros and len padding +depends_on:POLARSSL_BLOWFISH_C +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:31:POLARSSL_PADDING_ZEROS_AND_LEN + +BLOWFISH Encrypt and decrypt 32 bytes with zeros and len padding +depends_on:POLARSSL_BLOWFISH_C +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:32:POLARSSL_PADDING_ZEROS_AND_LEN + +BLOWFISH Encrypt and decrypt 32 bytes with zeros and len padding +depends_on:POLARSSL_BLOWFISH_C +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:33:POLARSSL_PADDING_ZEROS_AND_LEN + +BLOWFISH Encrypt and decrypt 47 bytes with zeros and len padding +depends_on:POLARSSL_BLOWFISH_C +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:47:POLARSSL_PADDING_ZEROS_AND_LEN + +BLOWFISH Encrypt and decrypt 48 bytes with zeros and len padding +depends_on:POLARSSL_BLOWFISH_C +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:48:POLARSSL_PADDING_ZEROS_AND_LEN + +BLOWFISH Encrypt and decrypt 49 bytes with zeros and len padding +depends_on:POLARSSL_BLOWFISH_C +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:49:POLARSSL_PADDING_ZEROS_AND_LEN + +BLOWFISH Encrypt and decrypt 0 bytes with zeros padding +depends_on:POLARSSL_BLOWFISH_C +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:0:POLARSSL_PADDING_ZEROS + +BLOWFISH Encrypt and decrypt 1 byte with zeros padding +depends_on:POLARSSL_BLOWFISH_C +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:1:POLARSSL_PADDING_ZEROS + +BLOWFISH Encrypt and decrypt 2 bytes with zeros padding +depends_on:POLARSSL_BLOWFISH_C +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:2:POLARSSL_PADDING_ZEROS + +BLOWFISH Encrypt and decrypt 7 bytes with zeros padding +depends_on:POLARSSL_BLOWFISH_C +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:7:POLARSSL_PADDING_ZEROS + +BLOWFISH Encrypt and decrypt 8 bytes with zeros padding +depends_on:POLARSSL_BLOWFISH_C +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:8:POLARSSL_PADDING_ZEROS + +BLOWFISH Encrypt and decrypt 9 bytes with zeros padding +depends_on:POLARSSL_BLOWFISH_C +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:9:POLARSSL_PADDING_ZEROS + +BLOWFISH Encrypt and decrypt 15 bytes with zeros padding +depends_on:POLARSSL_BLOWFISH_C +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:15:POLARSSL_PADDING_ZEROS + +BLOWFISH Encrypt and decrypt 16 bytes with zeros padding +depends_on:POLARSSL_BLOWFISH_C +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:16:POLARSSL_PADDING_ZEROS + +BLOWFISH Encrypt and decrypt 17 bytes with zeros padding +depends_on:POLARSSL_BLOWFISH_C +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:17:POLARSSL_PADDING_ZEROS + +BLOWFISH Encrypt and decrypt 31 bytes with zeros padding +depends_on:POLARSSL_BLOWFISH_C +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:31:POLARSSL_PADDING_ZEROS + +BLOWFISH Encrypt and decrypt 32 bytes with zeros padding +depends_on:POLARSSL_BLOWFISH_C +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:32:POLARSSL_PADDING_ZEROS + +BLOWFISH Encrypt and decrypt 32 bytes with zeros padding +depends_on:POLARSSL_BLOWFISH_C +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:33:POLARSSL_PADDING_ZEROS + +BLOWFISH Encrypt and decrypt 47 bytes with zeros padding +depends_on:POLARSSL_BLOWFISH_C +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:47:POLARSSL_PADDING_ZEROS + +BLOWFISH Encrypt and decrypt 48 bytes with zeros padding +depends_on:POLARSSL_BLOWFISH_C +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:48:POLARSSL_PADDING_ZEROS + +BLOWFISH Encrypt and decrypt 49 bytes with zeros padding +depends_on:POLARSSL_BLOWFISH_C +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:49:POLARSSL_PADDING_ZEROS + +BLOWFISH Encrypt and decrypt 0 bytes with no padding +depends_on:POLARSSL_BLOWFISH_C +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:0:POLARSSL_PADDING_NONE + +BLOWFISH Encrypt and decrypt 8 bytes with no padding +depends_on:POLARSSL_BLOWFISH_C +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:8:POLARSSL_PADDING_NONE + +BLOWFISH Encrypt and decrypt 16 bytes with no padding +depends_on:POLARSSL_BLOWFISH_C +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:16:POLARSSL_PADDING_NONE + +BLOWFISH Encrypt and decrypt 32 bytes with no padding +depends_on:POLARSSL_BLOWFISH_C +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:32:POLARSSL_PADDING_NONE + +BLOWFISH Encrypt and decrypt 48 bytes with no padding +depends_on:POLARSSL_BLOWFISH_C +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CBC:BLOWFISH-CBC:128:48:POLARSSL_PADDING_NONE + +BLOWFISH Try encrypting 1 bytes with no padding +depends_on:POLARSSL_BLOWFISH_C +enc_fail:POLARSSL_CIPHER_BLOWFISH_CBC:POLARSSL_PADDING_NONE:128:1:POLARSSL_ERR_CIPHER_FULL_BLOCK_EXPECTED + +BLOWFISH Try encrypting 2 bytes with no padding +depends_on:POLARSSL_BLOWFISH_C +enc_fail:POLARSSL_CIPHER_BLOWFISH_CBC:POLARSSL_PADDING_NONE:128:2:POLARSSL_ERR_CIPHER_FULL_BLOCK_EXPECTED + +BLOWFISH Try encrypting 7 bytes with no padding +depends_on:POLARSSL_BLOWFISH_C +enc_fail:POLARSSL_CIPHER_BLOWFISH_CBC:POLARSSL_PADDING_NONE:128:7:POLARSSL_ERR_CIPHER_FULL_BLOCK_EXPECTED + +BLOWFISH Try encrypting 9 bytes with no padding +depends_on:POLARSSL_BLOWFISH_C +enc_fail:POLARSSL_CIPHER_BLOWFISH_CBC:POLARSSL_PADDING_NONE:128:9:POLARSSL_ERR_CIPHER_FULL_BLOCK_EXPECTED + +BLOWFISH Try encrypting 15 bytes with no padding +depends_on:POLARSSL_BLOWFISH_C +enc_fail:POLARSSL_CIPHER_BLOWFISH_CBC:POLARSSL_PADDING_NONE:128:15:POLARSSL_ERR_CIPHER_FULL_BLOCK_EXPECTED + +BLOWFISH Try encrypting 17 bytes with no padding +depends_on:POLARSSL_BLOWFISH_C +enc_fail:POLARSSL_CIPHER_BLOWFISH_CBC:POLARSSL_PADDING_NONE:128:17:POLARSSL_ERR_CIPHER_FULL_BLOCK_EXPECTED + +BLOWFISH Try encrypting 31 bytes with no padding +depends_on:POLARSSL_BLOWFISH_C +enc_fail:POLARSSL_CIPHER_BLOWFISH_CBC:POLARSSL_PADDING_NONE:128:31:POLARSSL_ERR_CIPHER_FULL_BLOCK_EXPECTED + +BLOWFISH Try encrypting 33 bytes with no padding +depends_on:POLARSSL_BLOWFISH_C +enc_fail:POLARSSL_CIPHER_BLOWFISH_CBC:POLARSSL_PADDING_NONE:128:33:POLARSSL_ERR_CIPHER_FULL_BLOCK_EXPECTED + +BLOWFISH Try encrypting 47 bytes with no padding +depends_on:POLARSSL_BLOWFISH_C +enc_fail:POLARSSL_CIPHER_BLOWFISH_CBC:POLARSSL_PADDING_NONE:128:47:POLARSSL_ERR_CIPHER_FULL_BLOCK_EXPECTED + +BLOWFISH Try encrypting 49 bytes with no padding +depends_on:POLARSSL_BLOWFISH_C +enc_fail:POLARSSL_CIPHER_BLOWFISH_CBC:POLARSSL_PADDING_NONE:128:49:POLARSSL_ERR_CIPHER_FULL_BLOCK_EXPECTED BLOWFISH Encrypt and decrypt 0 bytes in multiple parts depends_on:POLARSSL_BLOWFISH_C @@ -111,63 +351,63 @@ enc_dec_buf_multipart:POLARSSL_CIPHER_BLOWFISH_CBC:128:16:16: BLOWFISH Encrypt and decrypt 0 bytes depends_on:POLARSSL_BLOWFISH_C:POLARSSL_CIPHER_MODE_CFB -enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CFB64:BLOWFISH-CFB64:128:0 +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CFB64:BLOWFISH-CFB64:128:0:-1 BLOWFISH Encrypt and decrypt 1 byte depends_on:POLARSSL_BLOWFISH_C:POLARSSL_CIPHER_MODE_CFB -enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CFB64:BLOWFISH-CFB64:128:1 +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CFB64:BLOWFISH-CFB64:128:1:-1 BLOWFISH Encrypt and decrypt 2 bytes depends_on:POLARSSL_BLOWFISH_C:POLARSSL_CIPHER_MODE_CFB -enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CFB64:BLOWFISH-CFB64:128:2 +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CFB64:BLOWFISH-CFB64:128:2:-1 BLOWFISH Encrypt and decrypt 7 bytes depends_on:POLARSSL_BLOWFISH_C:POLARSSL_CIPHER_MODE_CFB -enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CFB64:BLOWFISH-CFB64:128:7 +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CFB64:BLOWFISH-CFB64:128:7:-1 BLOWFISH Encrypt and decrypt 8 bytes depends_on:POLARSSL_BLOWFISH_C:POLARSSL_CIPHER_MODE_CFB -enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CFB64:BLOWFISH-CFB64:128:8 +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CFB64:BLOWFISH-CFB64:128:8:-1 BLOWFISH Encrypt and decrypt 9 bytes depends_on:POLARSSL_BLOWFISH_C:POLARSSL_CIPHER_MODE_CFB -enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CFB64:BLOWFISH-CFB64:128:9 +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CFB64:BLOWFISH-CFB64:128:9:-1 BLOWFISH Encrypt and decrypt 15 bytes depends_on:POLARSSL_BLOWFISH_C:POLARSSL_CIPHER_MODE_CFB -enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CFB64:BLOWFISH-CFB64:128:15 +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CFB64:BLOWFISH-CFB64:128:15:-1 BLOWFISH Encrypt and decrypt 16 bytes depends_on:POLARSSL_BLOWFISH_C:POLARSSL_CIPHER_MODE_CFB -enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CFB64:BLOWFISH-CFB64:128:16 +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CFB64:BLOWFISH-CFB64:128:16:-1 BLOWFISH Encrypt and decrypt 17 bytes depends_on:POLARSSL_BLOWFISH_C:POLARSSL_CIPHER_MODE_CFB -enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CFB64:BLOWFISH-CFB64:128:17 +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CFB64:BLOWFISH-CFB64:128:17:-1 BLOWFISH Encrypt and decrypt 31 bytes depends_on:POLARSSL_BLOWFISH_C:POLARSSL_CIPHER_MODE_CFB -enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CFB64:BLOWFISH-CFB64:128:31 +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CFB64:BLOWFISH-CFB64:128:31:-1 BLOWFISH Encrypt and decrypt 32 bytes depends_on:POLARSSL_BLOWFISH_C:POLARSSL_CIPHER_MODE_CFB -enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CFB64:BLOWFISH-CFB64:128:32 +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CFB64:BLOWFISH-CFB64:128:32:-1 BLOWFISH Encrypt and decrypt 32 bytes depends_on:POLARSSL_BLOWFISH_C:POLARSSL_CIPHER_MODE_CFB -enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CFB64:BLOWFISH-CFB64:128:33 +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CFB64:BLOWFISH-CFB64:128:33:-1 BLOWFISH Encrypt and decrypt 47 bytes depends_on:POLARSSL_BLOWFISH_C:POLARSSL_CIPHER_MODE_CFB -enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CFB64:BLOWFISH-CFB64:128:47 +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CFB64:BLOWFISH-CFB64:128:47:-1 BLOWFISH Encrypt and decrypt 48 bytes depends_on:POLARSSL_BLOWFISH_C:POLARSSL_CIPHER_MODE_CFB -enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CFB64:BLOWFISH-CFB64:128:48 +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CFB64:BLOWFISH-CFB64:128:48:-1 BLOWFISH Encrypt and decrypt 49 bytes depends_on:POLARSSL_BLOWFISH_C:POLARSSL_CIPHER_MODE_CFB -enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CFB64:BLOWFISH-CFB64:128:49 +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CFB64:BLOWFISH-CFB64:128:49:-1 BLOWFISH Encrypt and decrypt 0 bytes in multiple parts depends_on:POLARSSL_BLOWFISH_C:POLARSSL_CIPHER_MODE_CFB @@ -215,63 +455,63 @@ enc_dec_buf_multipart:POLARSSL_CIPHER_BLOWFISH_CFB64:128:16:16: BLOWFISH Encrypt and decrypt 0 bytes depends_on:POLARSSL_BLOWFISH_C:POLARSSL_CIPHER_MODE_CTR -enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CTR:BLOWFISH-CTR:128:0 +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CTR:BLOWFISH-CTR:128:0:-1 BLOWFISH Encrypt and decrypt 1 byte depends_on:POLARSSL_BLOWFISH_C:POLARSSL_CIPHER_MODE_CTR -enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CTR:BLOWFISH-CTR:128:1 +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CTR:BLOWFISH-CTR:128:1:-1 BLOWFISH Encrypt and decrypt 2 bytes depends_on:POLARSSL_BLOWFISH_C:POLARSSL_CIPHER_MODE_CTR -enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CTR:BLOWFISH-CTR:128:2 +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CTR:BLOWFISH-CTR:128:2:-1 BLOWFISH Encrypt and decrypt 7 bytes depends_on:POLARSSL_BLOWFISH_C:POLARSSL_CIPHER_MODE_CTR -enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CTR:BLOWFISH-CTR:128:7 +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CTR:BLOWFISH-CTR:128:7:-1 BLOWFISH Encrypt and decrypt 8 bytes depends_on:POLARSSL_BLOWFISH_C:POLARSSL_CIPHER_MODE_CTR -enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CTR:BLOWFISH-CTR:128:8 +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CTR:BLOWFISH-CTR:128:8:-1 BLOWFISH Encrypt and decrypt 9 bytes depends_on:POLARSSL_BLOWFISH_C:POLARSSL_CIPHER_MODE_CTR -enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CTR:BLOWFISH-CTR:128:9 +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CTR:BLOWFISH-CTR:128:9:-1 BLOWFISH Encrypt and decrypt 15 bytes depends_on:POLARSSL_BLOWFISH_C:POLARSSL_CIPHER_MODE_CTR -enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CTR:BLOWFISH-CTR:128:15 +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CTR:BLOWFISH-CTR:128:15:-1 BLOWFISH Encrypt and decrypt 16 bytes depends_on:POLARSSL_BLOWFISH_C:POLARSSL_CIPHER_MODE_CTR -enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CTR:BLOWFISH-CTR:128:16 +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CTR:BLOWFISH-CTR:128:16:-1 BLOWFISH Encrypt and decrypt 17 bytes depends_on:POLARSSL_BLOWFISH_C:POLARSSL_CIPHER_MODE_CTR -enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CTR:BLOWFISH-CTR:128:17 +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CTR:BLOWFISH-CTR:128:17:-1 BLOWFISH Encrypt and decrypt 31 bytes depends_on:POLARSSL_BLOWFISH_C:POLARSSL_CIPHER_MODE_CTR -enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CTR:BLOWFISH-CTR:128:31 +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CTR:BLOWFISH-CTR:128:31:-1 BLOWFISH Encrypt and decrypt 32 bytes depends_on:POLARSSL_BLOWFISH_C:POLARSSL_CIPHER_MODE_CTR -enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CTR:BLOWFISH-CTR:128:32 +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CTR:BLOWFISH-CTR:128:32:-1 BLOWFISH Encrypt and decrypt 32 bytes depends_on:POLARSSL_BLOWFISH_C:POLARSSL_CIPHER_MODE_CTR -enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CTR:BLOWFISH-CTR:128:33 +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CTR:BLOWFISH-CTR:128:33:-1 BLOWFISH Encrypt and decrypt 47 bytes depends_on:POLARSSL_BLOWFISH_C:POLARSSL_CIPHER_MODE_CTR -enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CTR:BLOWFISH-CTR:128:47 +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CTR:BLOWFISH-CTR:128:47:-1 BLOWFISH Encrypt and decrypt 48 bytes depends_on:POLARSSL_BLOWFISH_C:POLARSSL_CIPHER_MODE_CTR -enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CTR:BLOWFISH-CTR:128:48 +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CTR:BLOWFISH-CTR:128:48:-1 BLOWFISH Encrypt and decrypt 49 bytes depends_on:POLARSSL_BLOWFISH_C:POLARSSL_CIPHER_MODE_CTR -enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CTR:BLOWFISH-CTR:128:49 +enc_dec_buf:POLARSSL_CIPHER_BLOWFISH_CTR:BLOWFISH-CTR:128:49:-1 BLOWFISH Encrypt and decrypt 0 bytes in multiple parts depends_on:POLARSSL_BLOWFISH_C:POLARSSL_CIPHER_MODE_CTR diff --git a/tests/suites/test_suite_cipher.camellia.data b/tests/suites/test_suite_cipher.camellia.data index f250b1906..ecf1b9118 100644 --- a/tests/suites/test_suite_cipher.camellia.data +++ b/tests/suites/test_suite_cipher.camellia.data @@ -7,63 +7,303 @@ dec_empty_buf: CAMELLIA Encrypt and decrypt 0 bytes depends_on:POLARSSL_CAMELLIA_C -enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CBC:CAMELLIA-128-CBC:128:0 +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CBC:CAMELLIA-128-CBC:128:0:-1 CAMELLIA Encrypt and decrypt 1 byte depends_on:POLARSSL_CAMELLIA_C -enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CBC:CAMELLIA-128-CBC:128:1 +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CBC:CAMELLIA-128-CBC:128:1:-1 CAMELLIA Encrypt and decrypt 2 bytes depends_on:POLARSSL_CAMELLIA_C -enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CBC:CAMELLIA-128-CBC:128:2 +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CBC:CAMELLIA-128-CBC:128:2:-1 CAMELLIA Encrypt and decrypt 7 bytes depends_on:POLARSSL_CAMELLIA_C -enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CBC:CAMELLIA-128-CBC:128:7 +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CBC:CAMELLIA-128-CBC:128:7:-1 CAMELLIA Encrypt and decrypt 8 bytes depends_on:POLARSSL_CAMELLIA_C -enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CBC:CAMELLIA-128-CBC:128:8 +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CBC:CAMELLIA-128-CBC:128:8:-1 CAMELLIA Encrypt and decrypt 9 bytes depends_on:POLARSSL_CAMELLIA_C -enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CBC:CAMELLIA-128-CBC:128:9 +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CBC:CAMELLIA-128-CBC:128:9:-1 CAMELLIA Encrypt and decrypt 15 bytes depends_on:POLARSSL_CAMELLIA_C -enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CBC:CAMELLIA-128-CBC:128:15 +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CBC:CAMELLIA-128-CBC:128:15:-1 CAMELLIA Encrypt and decrypt 16 bytes depends_on:POLARSSL_CAMELLIA_C -enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CBC:CAMELLIA-128-CBC:128:16 +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CBC:CAMELLIA-128-CBC:128:16:-1 CAMELLIA Encrypt and decrypt 17 bytes depends_on:POLARSSL_CAMELLIA_C -enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CBC:CAMELLIA-128-CBC:128:17 +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CBC:CAMELLIA-128-CBC:128:17:-1 CAMELLIA Encrypt and decrypt 31 bytes depends_on:POLARSSL_CAMELLIA_C -enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CBC:CAMELLIA-128-CBC:128:31 +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CBC:CAMELLIA-128-CBC:128:31:-1 CAMELLIA Encrypt and decrypt 32 bytes depends_on:POLARSSL_CAMELLIA_C -enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CBC:CAMELLIA-128-CBC:128:32 +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CBC:CAMELLIA-128-CBC:128:32:-1 CAMELLIA Encrypt and decrypt 32 bytes depends_on:POLARSSL_CAMELLIA_C -enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CBC:CAMELLIA-128-CBC:128:33 +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CBC:CAMELLIA-128-CBC:128:33:-1 CAMELLIA Encrypt and decrypt 47 bytes depends_on:POLARSSL_CAMELLIA_C -enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CBC:CAMELLIA-128-CBC:128:47 +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CBC:CAMELLIA-128-CBC:128:47:-1 CAMELLIA Encrypt and decrypt 48 bytes depends_on:POLARSSL_CAMELLIA_C -enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CBC:CAMELLIA-128-CBC:128:48 +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CBC:CAMELLIA-128-CBC:128:48:-1 CAMELLIA Encrypt and decrypt 49 bytes depends_on:POLARSSL_CAMELLIA_C -enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CBC:CAMELLIA-128-CBC:128:49 +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CBC:CAMELLIA-128-CBC:128:49:-1 + +CAMELLIA Encrypt and decrypt 0 bytes with one and zeros padding +depends_on:POLARSSL_CAMELLIA_C +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CBC:CAMELLIA-128-CBC:128:0:POLARSSL_PADDING_ONE_AND_ZEROS + +CAMELLIA Encrypt and decrypt 1 byte with one and zeros padding +depends_on:POLARSSL_CAMELLIA_C +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CBC:CAMELLIA-128-CBC:128:1:POLARSSL_PADDING_ONE_AND_ZEROS + +CAMELLIA Encrypt and decrypt 2 bytes with one and zeros padding +depends_on:POLARSSL_CAMELLIA_C +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CBC:CAMELLIA-128-CBC:128:2:POLARSSL_PADDING_ONE_AND_ZEROS + +CAMELLIA Encrypt and decrypt 7 bytes with one and zeros padding +depends_on:POLARSSL_CAMELLIA_C +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CBC:CAMELLIA-128-CBC:128:7:POLARSSL_PADDING_ONE_AND_ZEROS + +CAMELLIA Encrypt and decrypt 8 bytes with one and zeros padding +depends_on:POLARSSL_CAMELLIA_C +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CBC:CAMELLIA-128-CBC:128:8:POLARSSL_PADDING_ONE_AND_ZEROS + +CAMELLIA Encrypt and decrypt 9 bytes with one and zeros padding +depends_on:POLARSSL_CAMELLIA_C +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CBC:CAMELLIA-128-CBC:128:9:POLARSSL_PADDING_ONE_AND_ZEROS + +CAMELLIA Encrypt and decrypt 15 bytes with one and zeros padding +depends_on:POLARSSL_CAMELLIA_C +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CBC:CAMELLIA-128-CBC:128:15:POLARSSL_PADDING_ONE_AND_ZEROS + +CAMELLIA Encrypt and decrypt 16 bytes with one and zeros padding +depends_on:POLARSSL_CAMELLIA_C +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CBC:CAMELLIA-128-CBC:128:16:POLARSSL_PADDING_ONE_AND_ZEROS + +CAMELLIA Encrypt and decrypt 17 bytes with one and zeros padding +depends_on:POLARSSL_CAMELLIA_C +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CBC:CAMELLIA-128-CBC:128:17:POLARSSL_PADDING_ONE_AND_ZEROS + +CAMELLIA Encrypt and decrypt 31 bytes with one and zeros padding +depends_on:POLARSSL_CAMELLIA_C +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CBC:CAMELLIA-128-CBC:128:31:POLARSSL_PADDING_ONE_AND_ZEROS + +CAMELLIA Encrypt and decrypt 32 bytes with one and zeros padding +depends_on:POLARSSL_CAMELLIA_C +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CBC:CAMELLIA-128-CBC:128:32:POLARSSL_PADDING_ONE_AND_ZEROS + +CAMELLIA Encrypt and decrypt 32 bytes with one and zeros padding +depends_on:POLARSSL_CAMELLIA_C +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CBC:CAMELLIA-128-CBC:128:33:POLARSSL_PADDING_ONE_AND_ZEROS + +CAMELLIA Encrypt and decrypt 47 bytes with one and zeros padding +depends_on:POLARSSL_CAMELLIA_C +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CBC:CAMELLIA-128-CBC:128:47:POLARSSL_PADDING_ONE_AND_ZEROS + +CAMELLIA Encrypt and decrypt 48 bytes with one and zeros padding +depends_on:POLARSSL_CAMELLIA_C +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CBC:CAMELLIA-128-CBC:128:48:POLARSSL_PADDING_ONE_AND_ZEROS + +CAMELLIA Encrypt and decrypt 49 bytes with one and zeros padding +depends_on:POLARSSL_CAMELLIA_C +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CBC:CAMELLIA-128-CBC:128:49:POLARSSL_PADDING_ONE_AND_ZEROS + +CAMELLIA Encrypt and decrypt 0 bytes with zeros and len padding +depends_on:POLARSSL_CAMELLIA_C +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CBC:CAMELLIA-128-CBC:128:0:POLARSSL_PADDING_ZEROS_AND_LEN + +CAMELLIA Encrypt and decrypt 1 byte with zeros and len padding +depends_on:POLARSSL_CAMELLIA_C +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CBC:CAMELLIA-128-CBC:128:1:POLARSSL_PADDING_ZEROS_AND_LEN + +CAMELLIA Encrypt and decrypt 2 bytes with zeros and len padding +depends_on:POLARSSL_CAMELLIA_C +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CBC:CAMELLIA-128-CBC:128:2:POLARSSL_PADDING_ZEROS_AND_LEN + +CAMELLIA Encrypt and decrypt 7 bytes with zeros and len padding +depends_on:POLARSSL_CAMELLIA_C +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CBC:CAMELLIA-128-CBC:128:7:POLARSSL_PADDING_ZEROS_AND_LEN + +CAMELLIA Encrypt and decrypt 8 bytes with zeros and len padding +depends_on:POLARSSL_CAMELLIA_C +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CBC:CAMELLIA-128-CBC:128:8:POLARSSL_PADDING_ZEROS_AND_LEN + +CAMELLIA Encrypt and decrypt 9 bytes with zeros and len padding +depends_on:POLARSSL_CAMELLIA_C +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CBC:CAMELLIA-128-CBC:128:9:POLARSSL_PADDING_ZEROS_AND_LEN + +CAMELLIA Encrypt and decrypt 15 bytes with zeros and len padding +depends_on:POLARSSL_CAMELLIA_C +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CBC:CAMELLIA-128-CBC:128:15:POLARSSL_PADDING_ZEROS_AND_LEN + +CAMELLIA Encrypt and decrypt 16 bytes with zeros and len padding +depends_on:POLARSSL_CAMELLIA_C +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CBC:CAMELLIA-128-CBC:128:16:POLARSSL_PADDING_ZEROS_AND_LEN + +CAMELLIA Encrypt and decrypt 17 bytes with zeros and len padding +depends_on:POLARSSL_CAMELLIA_C +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CBC:CAMELLIA-128-CBC:128:17:POLARSSL_PADDING_ZEROS_AND_LEN + +CAMELLIA Encrypt and decrypt 31 bytes with zeros and len padding +depends_on:POLARSSL_CAMELLIA_C +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CBC:CAMELLIA-128-CBC:128:31:POLARSSL_PADDING_ZEROS_AND_LEN + +CAMELLIA Encrypt and decrypt 32 bytes with zeros and len padding +depends_on:POLARSSL_CAMELLIA_C +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CBC:CAMELLIA-128-CBC:128:32:POLARSSL_PADDING_ZEROS_AND_LEN + +CAMELLIA Encrypt and decrypt 32 bytes with zeros and len padding +depends_on:POLARSSL_CAMELLIA_C +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CBC:CAMELLIA-128-CBC:128:33:POLARSSL_PADDING_ZEROS_AND_LEN + +CAMELLIA Encrypt and decrypt 47 bytes with zeros and len padding +depends_on:POLARSSL_CAMELLIA_C +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CBC:CAMELLIA-128-CBC:128:47:POLARSSL_PADDING_ZEROS_AND_LEN + +CAMELLIA Encrypt and decrypt 48 bytes with zeros and len padding +depends_on:POLARSSL_CAMELLIA_C +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CBC:CAMELLIA-128-CBC:128:48:POLARSSL_PADDING_ZEROS_AND_LEN + +CAMELLIA Encrypt and decrypt 49 bytes with zeros and len padding +depends_on:POLARSSL_CAMELLIA_C +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CBC:CAMELLIA-128-CBC:128:49:POLARSSL_PADDING_ZEROS_AND_LEN + +CAMELLIA Encrypt and decrypt 0 bytes with zeros padding +depends_on:POLARSSL_CAMELLIA_C +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CBC:CAMELLIA-128-CBC:128:0:POLARSSL_PADDING_ZEROS + +CAMELLIA Encrypt and decrypt 1 byte with zeros padding +depends_on:POLARSSL_CAMELLIA_C +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CBC:CAMELLIA-128-CBC:128:1:POLARSSL_PADDING_ZEROS + +CAMELLIA Encrypt and decrypt 2 bytes with zeros padding +depends_on:POLARSSL_CAMELLIA_C +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CBC:CAMELLIA-128-CBC:128:2:POLARSSL_PADDING_ZEROS + +CAMELLIA Encrypt and decrypt 7 bytes with zeros padding +depends_on:POLARSSL_CAMELLIA_C +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CBC:CAMELLIA-128-CBC:128:7:POLARSSL_PADDING_ZEROS + +CAMELLIA Encrypt and decrypt 8 bytes with zeros padding +depends_on:POLARSSL_CAMELLIA_C +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CBC:CAMELLIA-128-CBC:128:8:POLARSSL_PADDING_ZEROS + +CAMELLIA Encrypt and decrypt 9 bytes with zeros padding +depends_on:POLARSSL_CAMELLIA_C +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CBC:CAMELLIA-128-CBC:128:9:POLARSSL_PADDING_ZEROS + +CAMELLIA Encrypt and decrypt 15 bytes with zeros padding +depends_on:POLARSSL_CAMELLIA_C +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CBC:CAMELLIA-128-CBC:128:15:POLARSSL_PADDING_ZEROS + +CAMELLIA Encrypt and decrypt 16 bytes with zeros padding +depends_on:POLARSSL_CAMELLIA_C +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CBC:CAMELLIA-128-CBC:128:16:POLARSSL_PADDING_ZEROS + +CAMELLIA Encrypt and decrypt 17 bytes with zeros padding +depends_on:POLARSSL_CAMELLIA_C +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CBC:CAMELLIA-128-CBC:128:17:POLARSSL_PADDING_ZEROS + +CAMELLIA Encrypt and decrypt 31 bytes with zeros padding +depends_on:POLARSSL_CAMELLIA_C +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CBC:CAMELLIA-128-CBC:128:31:POLARSSL_PADDING_ZEROS + +CAMELLIA Encrypt and decrypt 32 bytes with zeros padding +depends_on:POLARSSL_CAMELLIA_C +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CBC:CAMELLIA-128-CBC:128:32:POLARSSL_PADDING_ZEROS + +CAMELLIA Encrypt and decrypt 32 bytes with zeros padding +depends_on:POLARSSL_CAMELLIA_C +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CBC:CAMELLIA-128-CBC:128:33:POLARSSL_PADDING_ZEROS + +CAMELLIA Encrypt and decrypt 47 bytes with zeros padding +depends_on:POLARSSL_CAMELLIA_C +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CBC:CAMELLIA-128-CBC:128:47:POLARSSL_PADDING_ZEROS + +CAMELLIA Encrypt and decrypt 48 bytes with zeros padding +depends_on:POLARSSL_CAMELLIA_C +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CBC:CAMELLIA-128-CBC:128:48:POLARSSL_PADDING_ZEROS + +CAMELLIA Encrypt and decrypt 49 bytes with zeros padding +depends_on:POLARSSL_CAMELLIA_C +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CBC:CAMELLIA-128-CBC:128:49:POLARSSL_PADDING_ZEROS + +CAMELLIA Encrypt and decrypt 0 bytes with no padding +depends_on:POLARSSL_CAMELLIA_C +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CBC:CAMELLIA-128-CBC:128:0:POLARSSL_PADDING_NONE + +CAMELLIA Encrypt and decrypt 16 bytes with no padding +depends_on:POLARSSL_CAMELLIA_C +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CBC:CAMELLIA-128-CBC:128:16:POLARSSL_PADDING_NONE + +CAMELLIA Encrypt and decrypt 32 bytes with no padding +depends_on:POLARSSL_CAMELLIA_C +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CBC:CAMELLIA-128-CBC:128:32:POLARSSL_PADDING_NONE + +CAMELLIA Encrypt and decrypt 48 bytes with no padding +depends_on:POLARSSL_CAMELLIA_C +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CBC:CAMELLIA-128-CBC:128:48:POLARSSL_PADDING_NONE + +CAMELLIA Try encrypting 1 bytes with no padding +depends_on:POLARSSL_CAMELLIA_C +enc_fail:POLARSSL_CIPHER_CAMELLIA_128_CBC:POLARSSL_PADDING_NONE:128:1:POLARSSL_ERR_CIPHER_FULL_BLOCK_EXPECTED + +CAMELLIA Try encrypting 2 bytes with no padding +depends_on:POLARSSL_CAMELLIA_C +enc_fail:POLARSSL_CIPHER_CAMELLIA_128_CBC:POLARSSL_PADDING_NONE:128:2:POLARSSL_ERR_CIPHER_FULL_BLOCK_EXPECTED + +CAMELLIA Try encrypting 7 bytes with no padding +depends_on:POLARSSL_CAMELLIA_C +enc_fail:POLARSSL_CIPHER_CAMELLIA_128_CBC:POLARSSL_PADDING_NONE:128:7:POLARSSL_ERR_CIPHER_FULL_BLOCK_EXPECTED + +CAMELLIA Try encrypting 8 bytes with no padding +depends_on:POLARSSL_CAMELLIA_C +enc_fail:POLARSSL_CIPHER_CAMELLIA_128_CBC:POLARSSL_PADDING_NONE:128:8:POLARSSL_ERR_CIPHER_FULL_BLOCK_EXPECTED + +CAMELLIA Try encrypting 9 bytes with no padding +depends_on:POLARSSL_CAMELLIA_C +enc_fail:POLARSSL_CIPHER_CAMELLIA_128_CBC:POLARSSL_PADDING_NONE:128:9:POLARSSL_ERR_CIPHER_FULL_BLOCK_EXPECTED + +CAMELLIA Try encrypting 15 bytes with no padding +depends_on:POLARSSL_CAMELLIA_C +enc_fail:POLARSSL_CIPHER_CAMELLIA_128_CBC:POLARSSL_PADDING_NONE:128:15:POLARSSL_ERR_CIPHER_FULL_BLOCK_EXPECTED + +CAMELLIA Try encrypting 17 bytes with no padding +depends_on:POLARSSL_CAMELLIA_C +enc_fail:POLARSSL_CIPHER_CAMELLIA_128_CBC:POLARSSL_PADDING_NONE:128:17:POLARSSL_ERR_CIPHER_FULL_BLOCK_EXPECTED + +CAMELLIA Try encrypting 31 bytes with no padding +depends_on:POLARSSL_CAMELLIA_C +enc_fail:POLARSSL_CIPHER_CAMELLIA_128_CBC:POLARSSL_PADDING_NONE:128:31:POLARSSL_ERR_CIPHER_FULL_BLOCK_EXPECTED + +CAMELLIA Try encrypting 33 bytes with no padding +depends_on:POLARSSL_CAMELLIA_C +enc_fail:POLARSSL_CIPHER_CAMELLIA_128_CBC:POLARSSL_PADDING_NONE:128:33:POLARSSL_ERR_CIPHER_FULL_BLOCK_EXPECTED + +CAMELLIA Try encrypting 47 bytes with no padding +depends_on:POLARSSL_CAMELLIA_C +enc_fail:POLARSSL_CIPHER_CAMELLIA_128_CBC:POLARSSL_PADDING_NONE:128:47:POLARSSL_ERR_CIPHER_FULL_BLOCK_EXPECTED + +CAMELLIA Try encrypting 49 bytes with no padding +depends_on:POLARSSL_CAMELLIA_C +enc_fail:POLARSSL_CIPHER_CAMELLIA_128_CBC:POLARSSL_PADDING_NONE:128:49:POLARSSL_ERR_CIPHER_FULL_BLOCK_EXPECTED CAMELLIA Encrypt and decrypt 0 bytes in multiple parts depends_on:POLARSSL_CAMELLIA_C @@ -111,63 +351,63 @@ enc_dec_buf_multipart:POLARSSL_CIPHER_CAMELLIA_128_CBC:128:16:16: CAMELLIA Encrypt and decrypt 0 bytes depends_on:POLARSSL_CAMELLIA_C:POLARSSL_CIPHER_MODE_CFB -enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CFB128:CAMELLIA-128-CFB128:128:0 +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CFB128:CAMELLIA-128-CFB128:128:0:-1 CAMELLIA Encrypt and decrypt 1 byte depends_on:POLARSSL_CAMELLIA_C:POLARSSL_CIPHER_MODE_CFB -enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CFB128:CAMELLIA-128-CFB128:128:1 +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CFB128:CAMELLIA-128-CFB128:128:1:-1 CAMELLIA Encrypt and decrypt 2 bytes depends_on:POLARSSL_CAMELLIA_C:POLARSSL_CIPHER_MODE_CFB -enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CFB128:CAMELLIA-128-CFB128:128:2 +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CFB128:CAMELLIA-128-CFB128:128:2:-1 CAMELLIA Encrypt and decrypt 7 bytes depends_on:POLARSSL_CAMELLIA_C:POLARSSL_CIPHER_MODE_CFB -enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CFB128:CAMELLIA-128-CFB128:128:7 +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CFB128:CAMELLIA-128-CFB128:128:7:-1 CAMELLIA Encrypt and decrypt 8 bytes depends_on:POLARSSL_CAMELLIA_C:POLARSSL_CIPHER_MODE_CFB -enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CFB128:CAMELLIA-128-CFB128:128:8 +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CFB128:CAMELLIA-128-CFB128:128:8:-1 CAMELLIA Encrypt and decrypt 9 bytes depends_on:POLARSSL_CAMELLIA_C:POLARSSL_CIPHER_MODE_CFB -enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CFB128:CAMELLIA-128-CFB128:128:9 +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CFB128:CAMELLIA-128-CFB128:128:9:-1 CAMELLIA Encrypt and decrypt 15 bytes depends_on:POLARSSL_CAMELLIA_C:POLARSSL_CIPHER_MODE_CFB -enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CFB128:CAMELLIA-128-CFB128:128:15 +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CFB128:CAMELLIA-128-CFB128:128:15:-1 CAMELLIA Encrypt and decrypt 16 bytes depends_on:POLARSSL_CAMELLIA_C:POLARSSL_CIPHER_MODE_CFB -enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CFB128:CAMELLIA-128-CFB128:128:16 +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CFB128:CAMELLIA-128-CFB128:128:16:-1 CAMELLIA Encrypt and decrypt 17 bytes depends_on:POLARSSL_CAMELLIA_C:POLARSSL_CIPHER_MODE_CFB -enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CFB128:CAMELLIA-128-CFB128:128:17 +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CFB128:CAMELLIA-128-CFB128:128:17:-1 CAMELLIA Encrypt and decrypt 31 bytes depends_on:POLARSSL_CAMELLIA_C:POLARSSL_CIPHER_MODE_CFB -enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CFB128:CAMELLIA-128-CFB128:128:31 +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CFB128:CAMELLIA-128-CFB128:128:31:-1 CAMELLIA Encrypt and decrypt 32 bytes depends_on:POLARSSL_CAMELLIA_C:POLARSSL_CIPHER_MODE_CFB -enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CFB128:CAMELLIA-128-CFB128:128:32 +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CFB128:CAMELLIA-128-CFB128:128:32:-1 CAMELLIA Encrypt and decrypt 32 bytes depends_on:POLARSSL_CAMELLIA_C:POLARSSL_CIPHER_MODE_CFB -enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CFB128:CAMELLIA-128-CFB128:128:33 +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CFB128:CAMELLIA-128-CFB128:128:33:-1 CAMELLIA Encrypt and decrypt 47 bytes depends_on:POLARSSL_CAMELLIA_C:POLARSSL_CIPHER_MODE_CFB -enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CFB128:CAMELLIA-128-CFB128:128:47 +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CFB128:CAMELLIA-128-CFB128:128:47:-1 CAMELLIA Encrypt and decrypt 48 bytes depends_on:POLARSSL_CAMELLIA_C:POLARSSL_CIPHER_MODE_CFB -enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CFB128:CAMELLIA-128-CFB128:128:48 +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CFB128:CAMELLIA-128-CFB128:128:48:-1 CAMELLIA Encrypt and decrypt 49 bytes depends_on:POLARSSL_CAMELLIA_C:POLARSSL_CIPHER_MODE_CFB -enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CFB128:CAMELLIA-128-CFB128:128:49 +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CFB128:CAMELLIA-128-CFB128:128:49:-1 CAMELLIA Encrypt and decrypt 0 bytes in multiple parts depends_on:POLARSSL_CAMELLIA_C:POLARSSL_CIPHER_MODE_CFB @@ -215,63 +455,63 @@ enc_dec_buf_multipart:POLARSSL_CIPHER_CAMELLIA_128_CFB128:128:16:16: CAMELLIA Encrypt and decrypt 0 bytes depends_on:POLARSSL_CAMELLIA_C:POLARSSL_CIPHER_MODE_CTR -enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CTR:CAMELLIA-128-CTR:128:0 +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CTR:CAMELLIA-128-CTR:128:0:-1 CAMELLIA Encrypt and decrypt 1 byte depends_on:POLARSSL_CAMELLIA_C:POLARSSL_CIPHER_MODE_CTR -enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CTR:CAMELLIA-128-CTR:128:1 +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CTR:CAMELLIA-128-CTR:128:1:-1 CAMELLIA Encrypt and decrypt 2 bytes depends_on:POLARSSL_CAMELLIA_C:POLARSSL_CIPHER_MODE_CTR -enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CTR:CAMELLIA-128-CTR:128:2 +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CTR:CAMELLIA-128-CTR:128:2:-1 CAMELLIA Encrypt and decrypt 7 bytes depends_on:POLARSSL_CAMELLIA_C:POLARSSL_CIPHER_MODE_CTR -enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CTR:CAMELLIA-128-CTR:128:7 +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CTR:CAMELLIA-128-CTR:128:7:-1 CAMELLIA Encrypt and decrypt 8 bytes depends_on:POLARSSL_CAMELLIA_C:POLARSSL_CIPHER_MODE_CTR -enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CTR:CAMELLIA-128-CTR:128:8 +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CTR:CAMELLIA-128-CTR:128:8:-1 CAMELLIA Encrypt and decrypt 9 bytes depends_on:POLARSSL_CAMELLIA_C:POLARSSL_CIPHER_MODE_CTR -enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CTR:CAMELLIA-128-CTR:128:9 +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CTR:CAMELLIA-128-CTR:128:9:-1 CAMELLIA Encrypt and decrypt 15 bytes depends_on:POLARSSL_CAMELLIA_C:POLARSSL_CIPHER_MODE_CTR -enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CTR:CAMELLIA-128-CTR:128:15 +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CTR:CAMELLIA-128-CTR:128:15:-1 CAMELLIA Encrypt and decrypt 16 bytes depends_on:POLARSSL_CAMELLIA_C:POLARSSL_CIPHER_MODE_CTR -enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CTR:CAMELLIA-128-CTR:128:16 +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CTR:CAMELLIA-128-CTR:128:16:-1 CAMELLIA Encrypt and decrypt 17 bytes depends_on:POLARSSL_CAMELLIA_C:POLARSSL_CIPHER_MODE_CTR -enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CTR:CAMELLIA-128-CTR:128:17 +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CTR:CAMELLIA-128-CTR:128:17:-1 CAMELLIA Encrypt and decrypt 31 bytes depends_on:POLARSSL_CAMELLIA_C:POLARSSL_CIPHER_MODE_CTR -enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CTR:CAMELLIA-128-CTR:128:31 +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CTR:CAMELLIA-128-CTR:128:31:-1 CAMELLIA Encrypt and decrypt 32 bytes depends_on:POLARSSL_CAMELLIA_C:POLARSSL_CIPHER_MODE_CTR -enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CTR:CAMELLIA-128-CTR:128:32 +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CTR:CAMELLIA-128-CTR:128:32:-1 CAMELLIA Encrypt and decrypt 32 bytes depends_on:POLARSSL_CAMELLIA_C:POLARSSL_CIPHER_MODE_CTR -enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CTR:CAMELLIA-128-CTR:128:33 +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CTR:CAMELLIA-128-CTR:128:33:-1 CAMELLIA Encrypt and decrypt 47 bytes depends_on:POLARSSL_CAMELLIA_C:POLARSSL_CIPHER_MODE_CTR -enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CTR:CAMELLIA-128-CTR:128:47 +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CTR:CAMELLIA-128-CTR:128:47:-1 CAMELLIA Encrypt and decrypt 48 bytes depends_on:POLARSSL_CAMELLIA_C:POLARSSL_CIPHER_MODE_CTR -enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CTR:CAMELLIA-128-CTR:128:48 +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CTR:CAMELLIA-128-CTR:128:48:-1 CAMELLIA Encrypt and decrypt 49 bytes depends_on:POLARSSL_CAMELLIA_C:POLARSSL_CIPHER_MODE_CTR -enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CTR:CAMELLIA-128-CTR:128:49 +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_128_CTR:CAMELLIA-128-CTR:128:49:-1 CAMELLIA Encrypt and decrypt 0 bytes in multiple parts depends_on:POLARSSL_CAMELLIA_C:POLARSSL_CIPHER_MODE_CTR @@ -319,63 +559,63 @@ enc_dec_buf_multipart:POLARSSL_CIPHER_CAMELLIA_128_CTR:128:16:16: CAMELLIA Encrypt and decrypt 0 bytes depends_on:POLARSSL_CAMELLIA_C -enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_192_CBC:CAMELLIA-192-CBC:192:0 +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_192_CBC:CAMELLIA-192-CBC:192:0:-1 CAMELLIA Encrypt and decrypt 1 byte depends_on:POLARSSL_CAMELLIA_C -enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_192_CBC:CAMELLIA-192-CBC:192:1 +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_192_CBC:CAMELLIA-192-CBC:192:1:-1 CAMELLIA Encrypt and decrypt 2 bytes depends_on:POLARSSL_CAMELLIA_C -enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_192_CBC:CAMELLIA-192-CBC:192:2 +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_192_CBC:CAMELLIA-192-CBC:192:2:-1 CAMELLIA Encrypt and decrypt 7 bytes depends_on:POLARSSL_CAMELLIA_C -enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_192_CBC:CAMELLIA-192-CBC:192:7 +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_192_CBC:CAMELLIA-192-CBC:192:7:-1 CAMELLIA Encrypt and decrypt 8 bytes depends_on:POLARSSL_CAMELLIA_C -enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_192_CBC:CAMELLIA-192-CBC:192:8 +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_192_CBC:CAMELLIA-192-CBC:192:8:-1 CAMELLIA Encrypt and decrypt 9 bytes depends_on:POLARSSL_CAMELLIA_C -enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_192_CBC:CAMELLIA-192-CBC:192:9 +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_192_CBC:CAMELLIA-192-CBC:192:9:-1 CAMELLIA Encrypt and decrypt 15 bytes depends_on:POLARSSL_CAMELLIA_C -enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_192_CBC:CAMELLIA-192-CBC:192:15 +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_192_CBC:CAMELLIA-192-CBC:192:15:-1 CAMELLIA Encrypt and decrypt 16 bytes depends_on:POLARSSL_CAMELLIA_C -enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_192_CBC:CAMELLIA-192-CBC:192:16 +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_192_CBC:CAMELLIA-192-CBC:192:16:-1 CAMELLIA Encrypt and decrypt 17 bytes depends_on:POLARSSL_CAMELLIA_C -enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_192_CBC:CAMELLIA-192-CBC:192:17 +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_192_CBC:CAMELLIA-192-CBC:192:17:-1 CAMELLIA Encrypt and decrypt 31 bytes depends_on:POLARSSL_CAMELLIA_C -enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_192_CBC:CAMELLIA-192-CBC:192:31 +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_192_CBC:CAMELLIA-192-CBC:192:31:-1 CAMELLIA Encrypt and decrypt 32 bytes depends_on:POLARSSL_CAMELLIA_C -enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_192_CBC:CAMELLIA-192-CBC:192:32 +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_192_CBC:CAMELLIA-192-CBC:192:32:-1 CAMELLIA Encrypt and decrypt 32 bytes depends_on:POLARSSL_CAMELLIA_C -enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_192_CBC:CAMELLIA-192-CBC:192:33 +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_192_CBC:CAMELLIA-192-CBC:192:33:-1 CAMELLIA Encrypt and decrypt 47 bytes depends_on:POLARSSL_CAMELLIA_C -enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_192_CBC:CAMELLIA-192-CBC:192:47 +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_192_CBC:CAMELLIA-192-CBC:192:47:-1 CAMELLIA Encrypt and decrypt 48 bytes depends_on:POLARSSL_CAMELLIA_C -enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_192_CBC:CAMELLIA-192-CBC:192:48 +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_192_CBC:CAMELLIA-192-CBC:192:48:-1 CAMELLIA Encrypt and decrypt 49 bytes depends_on:POLARSSL_CAMELLIA_C -enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_192_CBC:CAMELLIA-192-CBC:192:49 +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_192_CBC:CAMELLIA-192-CBC:192:49:-1 CAMELLIA Encrypt and decrypt 0 bytes in multiple parts depends_on:POLARSSL_CAMELLIA_C @@ -423,63 +663,63 @@ enc_dec_buf_multipart:POLARSSL_CIPHER_CAMELLIA_192_CBC:192:16:16: CAMELLIA Encrypt and decrypt 0 bytes depends_on:POLARSSL_CAMELLIA_C -enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_256_CBC:CAMELLIA-256-CBC:256:0 +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_256_CBC:CAMELLIA-256-CBC:256:0:-1 CAMELLIA Encrypt and decrypt 1 byte depends_on:POLARSSL_CAMELLIA_C -enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_256_CBC:CAMELLIA-256-CBC:256:1 +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_256_CBC:CAMELLIA-256-CBC:256:1:-1 CAMELLIA Encrypt and decrypt 2 bytes depends_on:POLARSSL_CAMELLIA_C -enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_256_CBC:CAMELLIA-256-CBC:256:2 +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_256_CBC:CAMELLIA-256-CBC:256:2:-1 CAMELLIA Encrypt and decrypt 7 bytes depends_on:POLARSSL_CAMELLIA_C -enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_256_CBC:CAMELLIA-256-CBC:256:7 +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_256_CBC:CAMELLIA-256-CBC:256:7:-1 CAMELLIA Encrypt and decrypt 8 bytes depends_on:POLARSSL_CAMELLIA_C -enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_256_CBC:CAMELLIA-256-CBC:256:8 +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_256_CBC:CAMELLIA-256-CBC:256:8:-1 CAMELLIA Encrypt and decrypt 9 bytes depends_on:POLARSSL_CAMELLIA_C -enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_256_CBC:CAMELLIA-256-CBC:256:9 +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_256_CBC:CAMELLIA-256-CBC:256:9:-1 CAMELLIA Encrypt and decrypt 15 bytes depends_on:POLARSSL_CAMELLIA_C -enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_256_CBC:CAMELLIA-256-CBC:256:15 +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_256_CBC:CAMELLIA-256-CBC:256:15:-1 CAMELLIA Encrypt and decrypt 16 bytes depends_on:POLARSSL_CAMELLIA_C -enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_256_CBC:CAMELLIA-256-CBC:256:16 +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_256_CBC:CAMELLIA-256-CBC:256:16:-1 CAMELLIA Encrypt and decrypt 17 bytes depends_on:POLARSSL_CAMELLIA_C -enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_256_CBC:CAMELLIA-256-CBC:256:17 +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_256_CBC:CAMELLIA-256-CBC:256:17:-1 CAMELLIA Encrypt and decrypt 31 bytes depends_on:POLARSSL_CAMELLIA_C -enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_256_CBC:CAMELLIA-256-CBC:256:31 +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_256_CBC:CAMELLIA-256-CBC:256:31:-1 CAMELLIA Encrypt and decrypt 32 bytes depends_on:POLARSSL_CAMELLIA_C -enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_256_CBC:CAMELLIA-256-CBC:256:32 +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_256_CBC:CAMELLIA-256-CBC:256:32:-1 CAMELLIA Encrypt and decrypt 32 bytes depends_on:POLARSSL_CAMELLIA_C -enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_256_CBC:CAMELLIA-256-CBC:256:33 +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_256_CBC:CAMELLIA-256-CBC:256:33:-1 CAMELLIA Encrypt and decrypt 47 bytes depends_on:POLARSSL_CAMELLIA_C -enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_256_CBC:CAMELLIA-256-CBC:256:47 +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_256_CBC:CAMELLIA-256-CBC:256:47:-1 CAMELLIA Encrypt and decrypt 48 bytes depends_on:POLARSSL_CAMELLIA_C -enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_256_CBC:CAMELLIA-256-CBC:256:48 +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_256_CBC:CAMELLIA-256-CBC:256:48:-1 CAMELLIA Encrypt and decrypt 49 bytes depends_on:POLARSSL_CAMELLIA_C -enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_256_CBC:CAMELLIA-256-CBC:256:49 +enc_dec_buf:POLARSSL_CIPHER_CAMELLIA_256_CBC:CAMELLIA-256-CBC:256:49:-1 CAMELLIA Encrypt and decrypt 0 bytes in multiple parts depends_on:POLARSSL_CAMELLIA_C diff --git a/tests/suites/test_suite_cipher.des.data b/tests/suites/test_suite_cipher.des.data index 7dd89a189..65ec3d16a 100644 --- a/tests/suites/test_suite_cipher.des.data +++ b/tests/suites/test_suite_cipher.des.data @@ -7,63 +7,303 @@ dec_empty_buf: DES Encrypt and decrypt 0 bytes depends_on:POLARSSL_DES_C -enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:0 +enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:0:-1 DES Encrypt and decrypt 1 byte depends_on:POLARSSL_DES_C -enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:1 +enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:1:-1 DES Encrypt and decrypt 2 bytes depends_on:POLARSSL_DES_C -enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:2 +enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:2:-1 DES Encrypt and decrypt 7 bytes depends_on:POLARSSL_DES_C -enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:7 +enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:7:-1 DES Encrypt and decrypt 8 bytes depends_on:POLARSSL_DES_C -enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:8 +enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:8:-1 DES Encrypt and decrypt 9 bytes depends_on:POLARSSL_DES_C -enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:9 +enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:9:-1 DES Encrypt and decrypt 15 bytes depends_on:POLARSSL_DES_C -enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:15 +enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:15:-1 DES Encrypt and decrypt 16 bytes depends_on:POLARSSL_DES_C -enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:16 +enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:16:-1 DES Encrypt and decrypt 17 bytes depends_on:POLARSSL_DES_C -enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:17 +enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:17:-1 DES Encrypt and decrypt 31 bytes depends_on:POLARSSL_DES_C -enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:31 +enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:31:-1 DES Encrypt and decrypt 32 bytes depends_on:POLARSSL_DES_C -enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:32 +enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:32:-1 DES Encrypt and decrypt 32 bytes depends_on:POLARSSL_DES_C -enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:33 +enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:33:-1 DES Encrypt and decrypt 47 bytes depends_on:POLARSSL_DES_C -enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:47 +enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:47:-1 DES Encrypt and decrypt 48 bytes depends_on:POLARSSL_DES_C -enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:48 +enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:48:-1 DES Encrypt and decrypt 49 bytes depends_on:POLARSSL_DES_C -enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:49 +enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:49:-1 + +DES Encrypt and decrypt 0 bytes with one and zeros padding +depends_on:POLARSSL_DES_C +enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:0:POLARSSL_PADDING_ONE_AND_ZEROS + +DES Encrypt and decrypt 1 byte with one and zeros padding +depends_on:POLARSSL_DES_C +enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:1:POLARSSL_PADDING_ONE_AND_ZEROS + +DES Encrypt and decrypt 2 bytes with one and zeros padding +depends_on:POLARSSL_DES_C +enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:2:POLARSSL_PADDING_ONE_AND_ZEROS + +DES Encrypt and decrypt 7 bytes with one and zeros padding +depends_on:POLARSSL_DES_C +enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:7:POLARSSL_PADDING_ONE_AND_ZEROS + +DES Encrypt and decrypt 8 bytes with one and zeros padding +depends_on:POLARSSL_DES_C +enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:8:POLARSSL_PADDING_ONE_AND_ZEROS + +DES Encrypt and decrypt 9 bytes with one and zeros padding +depends_on:POLARSSL_DES_C +enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:9:POLARSSL_PADDING_ONE_AND_ZEROS + +DES Encrypt and decrypt 15 bytes with one and zeros padding +depends_on:POLARSSL_DES_C +enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:15:POLARSSL_PADDING_ONE_AND_ZEROS + +DES Encrypt and decrypt 16 bytes with one and zeros padding +depends_on:POLARSSL_DES_C +enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:16:POLARSSL_PADDING_ONE_AND_ZEROS + +DES Encrypt and decrypt 17 bytes with one and zeros padding +depends_on:POLARSSL_DES_C +enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:17:POLARSSL_PADDING_ONE_AND_ZEROS + +DES Encrypt and decrypt 31 bytes with one and zeros padding +depends_on:POLARSSL_DES_C +enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:31:POLARSSL_PADDING_ONE_AND_ZEROS + +DES Encrypt and decrypt 32 bytes with one and zeros padding +depends_on:POLARSSL_DES_C +enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:32:POLARSSL_PADDING_ONE_AND_ZEROS + +DES Encrypt and decrypt 32 bytes with one and zeros padding +depends_on:POLARSSL_DES_C +enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:33:POLARSSL_PADDING_ONE_AND_ZEROS + +DES Encrypt and decrypt 47 bytes with one and zeros padding +depends_on:POLARSSL_DES_C +enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:47:POLARSSL_PADDING_ONE_AND_ZEROS + +DES Encrypt and decrypt 48 bytes with one and zeros padding +depends_on:POLARSSL_DES_C +enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:48:POLARSSL_PADDING_ONE_AND_ZEROS + +DES Encrypt and decrypt 49 bytes with one and zeros padding +depends_on:POLARSSL_DES_C +enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:49:POLARSSL_PADDING_ONE_AND_ZEROS + +DES Encrypt and decrypt 0 bytes with zeros and len padding +depends_on:POLARSSL_DES_C +enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:0:POLARSSL_PADDING_ZEROS_AND_LEN + +DES Encrypt and decrypt 1 byte with zeros and len padding +depends_on:POLARSSL_DES_C +enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:1:POLARSSL_PADDING_ZEROS_AND_LEN + +DES Encrypt and decrypt 2 bytes with zeros and len padding +depends_on:POLARSSL_DES_C +enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:2:POLARSSL_PADDING_ZEROS_AND_LEN + +DES Encrypt and decrypt 7 bytes with zeros and len padding +depends_on:POLARSSL_DES_C +enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:7:POLARSSL_PADDING_ZEROS_AND_LEN + +DES Encrypt and decrypt 8 bytes with zeros and len padding +depends_on:POLARSSL_DES_C +enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:8:POLARSSL_PADDING_ZEROS_AND_LEN + +DES Encrypt and decrypt 9 bytes with zeros and len padding +depends_on:POLARSSL_DES_C +enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:9:POLARSSL_PADDING_ZEROS_AND_LEN + +DES Encrypt and decrypt 15 bytes with zeros and len padding +depends_on:POLARSSL_DES_C +enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:15:POLARSSL_PADDING_ZEROS_AND_LEN + +DES Encrypt and decrypt 16 bytes with zeros and len padding +depends_on:POLARSSL_DES_C +enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:16:POLARSSL_PADDING_ZEROS_AND_LEN + +DES Encrypt and decrypt 17 bytes with zeros and len padding +depends_on:POLARSSL_DES_C +enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:17:POLARSSL_PADDING_ZEROS_AND_LEN + +DES Encrypt and decrypt 31 bytes with zeros and len padding +depends_on:POLARSSL_DES_C +enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:31:POLARSSL_PADDING_ZEROS_AND_LEN + +DES Encrypt and decrypt 32 bytes with zeros and len padding +depends_on:POLARSSL_DES_C +enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:32:POLARSSL_PADDING_ZEROS_AND_LEN + +DES Encrypt and decrypt 32 bytes with zeros and len padding +depends_on:POLARSSL_DES_C +enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:33:POLARSSL_PADDING_ZEROS_AND_LEN + +DES Encrypt and decrypt 47 bytes with zeros and len padding +depends_on:POLARSSL_DES_C +enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:47:POLARSSL_PADDING_ZEROS_AND_LEN + +DES Encrypt and decrypt 48 bytes with zeros and len padding +depends_on:POLARSSL_DES_C +enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:48:POLARSSL_PADDING_ZEROS_AND_LEN + +DES Encrypt and decrypt 49 bytes with zeros and len padding +depends_on:POLARSSL_DES_C +enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:49:POLARSSL_PADDING_ZEROS_AND_LEN + +DES Encrypt and decrypt 0 bytes with zeros padding +depends_on:POLARSSL_DES_C +enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:0:POLARSSL_PADDING_ZEROS + +DES Encrypt and decrypt 1 byte with zeros padding +depends_on:POLARSSL_DES_C +enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:1:POLARSSL_PADDING_ZEROS + +DES Encrypt and decrypt 2 bytes with zeros padding +depends_on:POLARSSL_DES_C +enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:2:POLARSSL_PADDING_ZEROS + +DES Encrypt and decrypt 7 bytes with zeros padding +depends_on:POLARSSL_DES_C +enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:7:POLARSSL_PADDING_ZEROS + +DES Encrypt and decrypt 8 bytes with zeros padding +depends_on:POLARSSL_DES_C +enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:8:POLARSSL_PADDING_ZEROS + +DES Encrypt and decrypt 9 bytes with zeros padding +depends_on:POLARSSL_DES_C +enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:9:POLARSSL_PADDING_ZEROS + +DES Encrypt and decrypt 15 bytes with zeros padding +depends_on:POLARSSL_DES_C +enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:15:POLARSSL_PADDING_ZEROS + +DES Encrypt and decrypt 16 bytes with zeros padding +depends_on:POLARSSL_DES_C +enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:16:POLARSSL_PADDING_ZEROS + +DES Encrypt and decrypt 17 bytes with zeros padding +depends_on:POLARSSL_DES_C +enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:17:POLARSSL_PADDING_ZEROS + +DES Encrypt and decrypt 31 bytes with zeros padding +depends_on:POLARSSL_DES_C +enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:31:POLARSSL_PADDING_ZEROS + +DES Encrypt and decrypt 32 bytes with zeros padding +depends_on:POLARSSL_DES_C +enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:32:POLARSSL_PADDING_ZEROS + +DES Encrypt and decrypt 32 bytes with zeros padding +depends_on:POLARSSL_DES_C +enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:33:POLARSSL_PADDING_ZEROS + +DES Encrypt and decrypt 47 bytes with zeros padding +depends_on:POLARSSL_DES_C +enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:47:POLARSSL_PADDING_ZEROS + +DES Encrypt and decrypt 48 bytes with zeros padding +depends_on:POLARSSL_DES_C +enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:48:POLARSSL_PADDING_ZEROS + +DES Encrypt and decrypt 49 bytes with zeros padding +depends_on:POLARSSL_DES_C +enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:49:POLARSSL_PADDING_ZEROS + +DES Encrypt and decrypt 0 bytes with no padding +depends_on:POLARSSL_DES_C +enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:0:POLARSSL_PADDING_NONE + +DES Encrypt and decrypt 8 bytes with no padding +depends_on:POLARSSL_DES_C +enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:8:POLARSSL_PADDING_NONE + +DES Encrypt and decrypt 16 bytes with no padding +depends_on:POLARSSL_DES_C +enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:16:POLARSSL_PADDING_NONE + +DES Encrypt and decrypt 32 bytes with no padding +depends_on:POLARSSL_DES_C +enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:32:POLARSSL_PADDING_NONE + +DES Encrypt and decrypt 48 bytes with no padding +depends_on:POLARSSL_DES_C +enc_dec_buf:POLARSSL_CIPHER_DES_CBC:DES-CBC:56:48:POLARSSL_PADDING_NONE + +DES Try encrypting 1 bytes with no padding +depends_on:POLARSSL_DES_C +enc_fail:POLARSSL_CIPHER_DES_CBC:POLARSSL_PADDING_NONE:56:1:POLARSSL_ERR_CIPHER_FULL_BLOCK_EXPECTED + +DES Try encrypting 2 bytes with no padding +depends_on:POLARSSL_DES_C +enc_fail:POLARSSL_CIPHER_DES_CBC:POLARSSL_PADDING_NONE:56:2:POLARSSL_ERR_CIPHER_FULL_BLOCK_EXPECTED + +DES Try encrypting 7 bytes with no padding +depends_on:POLARSSL_DES_C +enc_fail:POLARSSL_CIPHER_DES_CBC:POLARSSL_PADDING_NONE:56:7:POLARSSL_ERR_CIPHER_FULL_BLOCK_EXPECTED + +DES Try encrypting 9 bytes with no padding +depends_on:POLARSSL_DES_C +enc_fail:POLARSSL_CIPHER_DES_CBC:POLARSSL_PADDING_NONE:56:9:POLARSSL_ERR_CIPHER_FULL_BLOCK_EXPECTED + +DES Try encrypting 15 bytes with no padding +depends_on:POLARSSL_DES_C +enc_fail:POLARSSL_CIPHER_DES_CBC:POLARSSL_PADDING_NONE:56:15:POLARSSL_ERR_CIPHER_FULL_BLOCK_EXPECTED + +DES Try encrypting 17 bytes with no padding +depends_on:POLARSSL_DES_C +enc_fail:POLARSSL_CIPHER_DES_CBC:POLARSSL_PADDING_NONE:56:17:POLARSSL_ERR_CIPHER_FULL_BLOCK_EXPECTED + +DES Try encrypting 31 bytes with no padding +depends_on:POLARSSL_DES_C +enc_fail:POLARSSL_CIPHER_DES_CBC:POLARSSL_PADDING_NONE:56:31:POLARSSL_ERR_CIPHER_FULL_BLOCK_EXPECTED + +DES Try encrypting 33 bytes with no padding +depends_on:POLARSSL_DES_C +enc_fail:POLARSSL_CIPHER_DES_CBC:POLARSSL_PADDING_NONE:56:33:POLARSSL_ERR_CIPHER_FULL_BLOCK_EXPECTED + +DES Try encrypting 47 bytes with no padding +depends_on:POLARSSL_DES_C +enc_fail:POLARSSL_CIPHER_DES_CBC:POLARSSL_PADDING_NONE:56:47:POLARSSL_ERR_CIPHER_FULL_BLOCK_EXPECTED + +DES Try encrypting 49 bytes with no padding +depends_on:POLARSSL_DES_C +enc_fail:POLARSSL_CIPHER_DES_CBC:POLARSSL_PADDING_NONE:56:49:POLARSSL_ERR_CIPHER_FULL_BLOCK_EXPECTED DES Encrypt and decrypt 0 bytes in multiple parts depends_on:POLARSSL_DES_C @@ -111,63 +351,63 @@ enc_dec_buf_multipart:POLARSSL_CIPHER_DES_CBC:56:16:16: DES Encrypt and decrypt 0 bytes depends_on:POLARSSL_DES_C -enc_dec_buf:POLARSSL_CIPHER_DES_EDE_CBC:DES-EDE-CBC:112:0 +enc_dec_buf:POLARSSL_CIPHER_DES_EDE_CBC:DES-EDE-CBC:112:0:-1 DES3 Encrypt and decrypt 1 byte depends_on:POLARSSL_DES_C -enc_dec_buf:POLARSSL_CIPHER_DES_EDE_CBC:DES-EDE-CBC:112:1 +enc_dec_buf:POLARSSL_CIPHER_DES_EDE_CBC:DES-EDE-CBC:112:1:-1 DES3 Encrypt and decrypt 2 bytes depends_on:POLARSSL_DES_C -enc_dec_buf:POLARSSL_CIPHER_DES_EDE_CBC:DES-EDE-CBC:112:2 +enc_dec_buf:POLARSSL_CIPHER_DES_EDE_CBC:DES-EDE-CBC:112:2:-1 DES3 Encrypt and decrypt 7 bytes depends_on:POLARSSL_DES_C -enc_dec_buf:POLARSSL_CIPHER_DES_EDE_CBC:DES-EDE-CBC:112:7 +enc_dec_buf:POLARSSL_CIPHER_DES_EDE_CBC:DES-EDE-CBC:112:7:-1 DES3 Encrypt and decrypt 8 bytes depends_on:POLARSSL_DES_C -enc_dec_buf:POLARSSL_CIPHER_DES_EDE_CBC:DES-EDE-CBC:112:8 +enc_dec_buf:POLARSSL_CIPHER_DES_EDE_CBC:DES-EDE-CBC:112:8:-1 DES3 Encrypt and decrypt 9 bytes depends_on:POLARSSL_DES_C -enc_dec_buf:POLARSSL_CIPHER_DES_EDE_CBC:DES-EDE-CBC:112:9 +enc_dec_buf:POLARSSL_CIPHER_DES_EDE_CBC:DES-EDE-CBC:112:9:-1 DES3 Encrypt and decrypt 15 bytes depends_on:POLARSSL_DES_C -enc_dec_buf:POLARSSL_CIPHER_DES_EDE_CBC:DES-EDE-CBC:112:15 +enc_dec_buf:POLARSSL_CIPHER_DES_EDE_CBC:DES-EDE-CBC:112:15:-1 DES3 Encrypt and decrypt 16 bytes depends_on:POLARSSL_DES_C -enc_dec_buf:POLARSSL_CIPHER_DES_EDE_CBC:DES-EDE-CBC:112:16 +enc_dec_buf:POLARSSL_CIPHER_DES_EDE_CBC:DES-EDE-CBC:112:16:-1 DES3 Encrypt and decrypt 17 bytes depends_on:POLARSSL_DES_C -enc_dec_buf:POLARSSL_CIPHER_DES_EDE_CBC:DES-EDE-CBC:112:17 +enc_dec_buf:POLARSSL_CIPHER_DES_EDE_CBC:DES-EDE-CBC:112:17:-1 DES3 Encrypt and decrypt 31 bytes depends_on:POLARSSL_DES_C -enc_dec_buf:POLARSSL_CIPHER_DES_EDE_CBC:DES-EDE-CBC:112:31 +enc_dec_buf:POLARSSL_CIPHER_DES_EDE_CBC:DES-EDE-CBC:112:31:-1 DES3 Encrypt and decrypt 32 bytes depends_on:POLARSSL_DES_C -enc_dec_buf:POLARSSL_CIPHER_DES_EDE_CBC:DES-EDE-CBC:112:32 +enc_dec_buf:POLARSSL_CIPHER_DES_EDE_CBC:DES-EDE-CBC:112:32:-1 DES3 Encrypt and decrypt 32 bytes depends_on:POLARSSL_DES_C -enc_dec_buf:POLARSSL_CIPHER_DES_EDE_CBC:DES-EDE-CBC:112:33 +enc_dec_buf:POLARSSL_CIPHER_DES_EDE_CBC:DES-EDE-CBC:112:33:-1 DES3 Encrypt and decrypt 47 bytes depends_on:POLARSSL_DES_C -enc_dec_buf:POLARSSL_CIPHER_DES_EDE_CBC:DES-EDE-CBC:112:47 +enc_dec_buf:POLARSSL_CIPHER_DES_EDE_CBC:DES-EDE-CBC:112:47:-1 DES3 Encrypt and decrypt 48 bytes depends_on:POLARSSL_DES_C -enc_dec_buf:POLARSSL_CIPHER_DES_EDE_CBC:DES-EDE-CBC:112:48 +enc_dec_buf:POLARSSL_CIPHER_DES_EDE_CBC:DES-EDE-CBC:112:48:-1 DES3 Encrypt and decrypt 49 bytes depends_on:POLARSSL_DES_C -enc_dec_buf:POLARSSL_CIPHER_DES_EDE_CBC:DES-EDE-CBC:112:49 +enc_dec_buf:POLARSSL_CIPHER_DES_EDE_CBC:DES-EDE-CBC:112:49:-1 DES3 Encrypt and decrypt 0 bytes in multiple parts depends_on:POLARSSL_DES_C @@ -215,63 +455,63 @@ enc_dec_buf_multipart:POLARSSL_CIPHER_DES_EDE_CBC:112:16:16: DES3 Encrypt and decrypt 0 bytes depends_on:POLARSSL_DES_C -enc_dec_buf:POLARSSL_CIPHER_DES_EDE3_CBC:DES-EDE3-CBC:168:0 +enc_dec_buf:POLARSSL_CIPHER_DES_EDE3_CBC:DES-EDE3-CBC:168:0:-1 DES3 Encrypt and decrypt 1 byte depends_on:POLARSSL_DES_C -enc_dec_buf:POLARSSL_CIPHER_DES_EDE3_CBC:DES-EDE3-CBC:168:1 +enc_dec_buf:POLARSSL_CIPHER_DES_EDE3_CBC:DES-EDE3-CBC:168:1:-1 DES3 Encrypt and decrypt 2 bytes depends_on:POLARSSL_DES_C -enc_dec_buf:POLARSSL_CIPHER_DES_EDE3_CBC:DES-EDE3-CBC:168:2 +enc_dec_buf:POLARSSL_CIPHER_DES_EDE3_CBC:DES-EDE3-CBC:168:2:-1 DES3 Encrypt and decrypt 7 bytes depends_on:POLARSSL_DES_C -enc_dec_buf:POLARSSL_CIPHER_DES_EDE3_CBC:DES-EDE3-CBC:168:7 +enc_dec_buf:POLARSSL_CIPHER_DES_EDE3_CBC:DES-EDE3-CBC:168:7:-1 DES3 Encrypt and decrypt 8 bytes depends_on:POLARSSL_DES_C -enc_dec_buf:POLARSSL_CIPHER_DES_EDE3_CBC:DES-EDE3-CBC:168:8 +enc_dec_buf:POLARSSL_CIPHER_DES_EDE3_CBC:DES-EDE3-CBC:168:8:-1 DES3 Encrypt and decrypt 9 bytes depends_on:POLARSSL_DES_C -enc_dec_buf:POLARSSL_CIPHER_DES_EDE3_CBC:DES-EDE3-CBC:168:9 +enc_dec_buf:POLARSSL_CIPHER_DES_EDE3_CBC:DES-EDE3-CBC:168:9:-1 DES3 Encrypt and decrypt 15 bytes depends_on:POLARSSL_DES_C -enc_dec_buf:POLARSSL_CIPHER_DES_EDE3_CBC:DES-EDE3-CBC:168:15 +enc_dec_buf:POLARSSL_CIPHER_DES_EDE3_CBC:DES-EDE3-CBC:168:15:-1 DES3 Encrypt and decrypt 16 bytes depends_on:POLARSSL_DES_C -enc_dec_buf:POLARSSL_CIPHER_DES_EDE3_CBC:DES-EDE3-CBC:168:16 +enc_dec_buf:POLARSSL_CIPHER_DES_EDE3_CBC:DES-EDE3-CBC:168:16:-1 DES3 Encrypt and decrypt 17 bytes depends_on:POLARSSL_DES_C -enc_dec_buf:POLARSSL_CIPHER_DES_EDE3_CBC:DES-EDE3-CBC:168:17 +enc_dec_buf:POLARSSL_CIPHER_DES_EDE3_CBC:DES-EDE3-CBC:168:17:-1 DES3 Encrypt and decrypt 31 bytes depends_on:POLARSSL_DES_C -enc_dec_buf:POLARSSL_CIPHER_DES_EDE3_CBC:DES-EDE3-CBC:168:31 +enc_dec_buf:POLARSSL_CIPHER_DES_EDE3_CBC:DES-EDE3-CBC:168:31:-1 DES3 Encrypt and decrypt 32 bytes depends_on:POLARSSL_DES_C -enc_dec_buf:POLARSSL_CIPHER_DES_EDE3_CBC:DES-EDE3-CBC:168:32 +enc_dec_buf:POLARSSL_CIPHER_DES_EDE3_CBC:DES-EDE3-CBC:168:32:-1 DES3 Encrypt and decrypt 32 bytes depends_on:POLARSSL_DES_C -enc_dec_buf:POLARSSL_CIPHER_DES_EDE3_CBC:DES-EDE3-CBC:168:33 +enc_dec_buf:POLARSSL_CIPHER_DES_EDE3_CBC:DES-EDE3-CBC:168:33:-1 DES3 Encrypt and decrypt 47 bytes depends_on:POLARSSL_DES_C -enc_dec_buf:POLARSSL_CIPHER_DES_EDE3_CBC:DES-EDE3-CBC:168:47 +enc_dec_buf:POLARSSL_CIPHER_DES_EDE3_CBC:DES-EDE3-CBC:168:47:-1 DES3 Encrypt and decrypt 48 bytes depends_on:POLARSSL_DES_C -enc_dec_buf:POLARSSL_CIPHER_DES_EDE3_CBC:DES-EDE3-CBC:168:48 +enc_dec_buf:POLARSSL_CIPHER_DES_EDE3_CBC:DES-EDE3-CBC:168:48:-1 DES3 Encrypt and decrypt 49 bytes depends_on:POLARSSL_DES_C -enc_dec_buf:POLARSSL_CIPHER_DES_EDE3_CBC:DES-EDE3-CBC:168:49 +enc_dec_buf:POLARSSL_CIPHER_DES_EDE3_CBC:DES-EDE3-CBC:168:49:-1 DES3 Encrypt and decrypt 0 bytes in multiple parts depends_on:POLARSSL_DES_C diff --git a/tests/suites/test_suite_cipher.function b/tests/suites/test_suite_cipher.function index b7115d977..4f3720018 100644 --- a/tests/suites/test_suite_cipher.function +++ b/tests/suites/test_suite_cipher.function @@ -7,7 +7,7 @@ depends_on:POLARSSL_CIPHER_C END_DEPENDENCIES BEGIN_CASE -enc_dec_buf:cipher_id:cipher_string:key_len:length: +enc_dec_buf:cipher_id:cipher_string:key_len:length:pad_mode: size_t length = {length}; unsigned char key[32]; unsigned char iv[16]; @@ -21,7 +21,7 @@ enc_dec_buf:cipher_id:cipher_string:key_len:length: unsigned char decbuf[64]; size_t outlen = 0; - size_t enclen = 0; + size_t total_len = 0; memset( key, 0, 32 ); memset( iv , 0, 16 ); @@ -45,62 +45,45 @@ enc_dec_buf:cipher_id:cipher_string:key_len:length: TEST_ASSERT( 0 == cipher_setkey( &ctx_dec, key, {key_len}, POLARSSL_DECRYPT ) ); TEST_ASSERT( 0 == cipher_setkey( &ctx_enc, key, {key_len}, POLARSSL_ENCRYPT ) ); + if( -1 != {pad_mode} ) + { + TEST_ASSERT( 0 == cipher_set_padding_mode( &ctx_dec, {pad_mode} ) ); + TEST_ASSERT( 0 == cipher_set_padding_mode( &ctx_enc, {pad_mode} ) ); + } + TEST_ASSERT( 0 == cipher_reset( &ctx_dec, iv ) ); TEST_ASSERT( 0 == cipher_reset( &ctx_enc, iv ) ); - if( POLARSSL_MODE_CBC == cipher_info->mode ) - { - enclen = cipher_get_block_size( &ctx_enc ) - * ( 1 + length / cipher_get_block_size( &ctx_enc ) ); - } - else - { - enclen = length; - } - /* encode length number of bytes from inbuf */ TEST_ASSERT( 0 == cipher_update( &ctx_enc, inbuf, length, encbuf, &outlen ) ); - if( POLARSSL_MODE_CBC == cipher_info->mode ) - { - TEST_ASSERT( outlen == enclen - cipher_get_block_size ( &ctx_enc ) ); - } - else - { - TEST_ASSERT( outlen == enclen ); - } + total_len = outlen; + + TEST_ASSERT( total_len == length || + ( total_len % cipher_get_block_size( &ctx_enc ) == 0 && + total_len < length && + total_len + cipher_get_block_size( &ctx_enc ) > length ) ); TEST_ASSERT( 0 == cipher_finish( &ctx_enc, encbuf + outlen, &outlen ) ); - if( POLARSSL_MODE_CBC == cipher_info->mode ) - { - TEST_ASSERT( outlen == cipher_get_block_size ( &ctx_enc ) ); - } - else - { - TEST_ASSERT( outlen == 0 ); - } + total_len += outlen; + TEST_ASSERT( total_len == length || + ( total_len % cipher_get_block_size( &ctx_enc ) == 0 && + total_len > length && + total_len <= length + cipher_get_block_size( &ctx_enc ) ) ); /* decode the previously encoded string */ - TEST_ASSERT( 0 == cipher_update( &ctx_dec, encbuf, enclen, decbuf, &outlen ) ); - if( POLARSSL_MODE_CBC == cipher_info->mode ) - { - TEST_ASSERT( enclen - cipher_get_block_size ( &ctx_enc ) == outlen ); - } - else - { - TEST_ASSERT( enclen == outlen ); - } + TEST_ASSERT( 0 == cipher_update( &ctx_dec, encbuf, total_len, decbuf, &outlen ) ); + total_len = outlen; + + TEST_ASSERT( total_len == length || + ( total_len % cipher_get_block_size( &ctx_dec ) == 0 && + total_len < length && + total_len + cipher_get_block_size( &ctx_dec ) >= length ) ); TEST_ASSERT( 0 == cipher_finish( &ctx_dec, decbuf + outlen, &outlen ) ); - if( POLARSSL_MODE_CBC == cipher_info->mode ) - { - TEST_ASSERT( length - enclen + cipher_get_block_size ( &ctx_enc ) == outlen ); - } - else - { - TEST_ASSERT( outlen == 0 ); - } + total_len += outlen; + TEST_ASSERT( total_len == length ); TEST_ASSERT( 0 == memcmp(inbuf, decbuf, length) ); @@ -108,6 +91,46 @@ enc_dec_buf:cipher_id:cipher_string:key_len:length: TEST_ASSERT( 0 == cipher_free_ctx( &ctx_enc ) ); END_CASE +BEGIN_CASE +enc_fail:cipher_id:pad_mode:key_len:length:ret: + size_t length = {length}; + unsigned char key[32]; + unsigned char iv[16]; + + const cipher_info_t *cipher_info; + cipher_context_t ctx; + + unsigned char inbuf[64]; + unsigned char encbuf[64]; + + size_t outlen = 0; + + memset( key, 0, 32 ); + memset( iv , 0, 16 ); + + memset( &ctx, 0, sizeof( ctx ) ); + + memset( inbuf, 5, 64 ); + memset( encbuf, 0, 64 ); + + /* Check and get info structures */ + cipher_info = cipher_info_from_type( {cipher_id} ); + TEST_ASSERT( NULL != cipher_info ); + + /* Initialise context */ + TEST_ASSERT( 0 == cipher_init_ctx( &ctx, cipher_info ) ); + TEST_ASSERT( 0 == cipher_setkey( &ctx, key, {key_len}, POLARSSL_ENCRYPT ) ); + TEST_ASSERT( 0 == cipher_set_padding_mode( &ctx, {pad_mode} ) ); + TEST_ASSERT( 0 == cipher_reset( &ctx, iv ) ); + + /* encode length number of bytes from inbuf */ + TEST_ASSERT( 0 == cipher_update( &ctx, inbuf, length, encbuf, &outlen ) ); + TEST_ASSERT( {ret} == cipher_finish( &ctx, encbuf + outlen, &outlen ) ); + + /* done */ + TEST_ASSERT( 0 == cipher_free_ctx( &ctx ) ); +END_CASE + BEGIN_CASE dec_empty_buf: unsigned char key[32]; @@ -166,7 +189,6 @@ enc_dec_buf_multipart:cipher_id:key_len:first_length:second_length: size_t outlen = 0; size_t totaloutlen = 0; - size_t enclen = 0; memset( key, 0, 32 ); memset( iv , 0, 16 ); @@ -191,60 +213,36 @@ enc_dec_buf_multipart:cipher_id:key_len:first_length:second_length: TEST_ASSERT( 0 == cipher_reset( &ctx_dec, iv ) ); TEST_ASSERT( 0 == cipher_reset( &ctx_enc, iv ) ); - if( POLARSSL_MODE_CBC == cipher_info->mode ) - { - enclen = cipher_get_block_size(&ctx_enc ) - * ( 1 + length / cipher_get_block_size( &ctx_enc ) ); - } - else - { - enclen = length; - } - /* encode length number of bytes from inbuf */ TEST_ASSERT( 0 == cipher_update( &ctx_enc, inbuf, first_length, encbuf, &outlen ) ); totaloutlen = outlen; TEST_ASSERT( 0 == cipher_update( &ctx_enc, inbuf + first_length, second_length, encbuf + totaloutlen, &outlen ) ); totaloutlen += outlen; - if( POLARSSL_MODE_CBC == cipher_info->mode ) - { - TEST_ASSERT( totaloutlen == enclen - cipher_get_block_size ( &ctx_enc ) ); - } - else - { - TEST_ASSERT( totaloutlen == enclen ); - } + TEST_ASSERT( totaloutlen == length || + ( totaloutlen % cipher_get_block_size( &ctx_enc ) == 0 && + totaloutlen < length && + totaloutlen + cipher_get_block_size( &ctx_enc ) > length ) ); + TEST_ASSERT( 0 == cipher_finish( &ctx_enc, encbuf + totaloutlen, &outlen ) ); totaloutlen += outlen; - if( POLARSSL_MODE_CBC == cipher_info->mode ) - { - TEST_ASSERT( outlen == cipher_get_block_size ( &ctx_enc ) ); - } - else - { - TEST_ASSERT( outlen == 0 ); - } + TEST_ASSERT( totaloutlen == length || + ( totaloutlen % cipher_get_block_size( &ctx_enc ) == 0 && + totaloutlen > length && + totaloutlen <= length + cipher_get_block_size( &ctx_enc ) ) ); /* decode the previously encoded string */ - TEST_ASSERT( 0 == cipher_update( &ctx_dec, encbuf, enclen, decbuf, &outlen ) ); - if( POLARSSL_MODE_CBC == cipher_info->mode ) - { - TEST_ASSERT( enclen - cipher_get_block_size ( &ctx_enc ) == outlen ); - } - else - { - TEST_ASSERT( enclen == outlen ); - } + TEST_ASSERT( 0 == cipher_update( &ctx_dec, encbuf, totaloutlen, decbuf, &outlen ) ); + totaloutlen = outlen; + + TEST_ASSERT( totaloutlen == length || + ( totaloutlen % cipher_get_block_size( &ctx_dec ) == 0 && + totaloutlen < length && + totaloutlen + cipher_get_block_size( &ctx_dec ) > length ) ); + TEST_ASSERT( 0 == cipher_finish( &ctx_dec, decbuf + outlen, &outlen ) ); - if( POLARSSL_MODE_CBC == cipher_info->mode ) - { - TEST_ASSERT( length - enclen + cipher_get_block_size ( &ctx_enc ) == outlen ); - } - else - { - TEST_ASSERT( outlen == 0 ); - } - + totaloutlen += outlen; + + TEST_ASSERT( totaloutlen == length ); TEST_ASSERT( 0 == memcmp(inbuf, decbuf, length) ); @@ -252,6 +250,40 @@ enc_dec_buf_multipart:cipher_id:key_len:first_length:second_length: TEST_ASSERT( 0 == cipher_free_ctx( &ctx_enc ) ); END_CASE +BEGIN_CASE +set_padding:cipher_id:pad_mode:ret: + const cipher_info_t *cipher_info; + cipher_context_t ctx; + + cipher_info = cipher_info_from_type( {cipher_id} ); + TEST_ASSERT( NULL != cipher_info ); + TEST_ASSERT( 0 == cipher_init_ctx( &ctx, cipher_info ) ); + + TEST_ASSERT( {ret} == cipher_set_padding_mode( &ctx, {pad_mode} ) ); + + TEST_ASSERT( 0 == cipher_free_ctx( &ctx ) ); +END_CASE + +BEGIN_CASE +check_padding:pad_mode:input:ret:dlen: + cipher_info_t cipher_info; + cipher_context_t ctx; + unsigned char input[16]; + size_t ilen, dlen; + + /* build a fake context just for getting access to get_padding */ + memset( &ctx, 0, sizeof( ctx ) ); + cipher_info.mode = POLARSSL_MODE_CBC; + ctx.cipher_info = &cipher_info; + + TEST_ASSERT( 0 == cipher_set_padding_mode( &ctx, {pad_mode} ) ); + + ilen = unhexify( input, {input} ); + + TEST_ASSERT( {ret} == ctx.get_padding( input, ilen, &dlen ) ); + if( 0 == {ret} ) + TEST_ASSERT( dlen == {dlen} ); +END_CASE BEGIN_CASE cipher_selftest: diff --git a/tests/suites/test_suite_cipher.padding.data b/tests/suites/test_suite_cipher.padding.data new file mode 100644 index 000000000..b37fa3c32 --- /dev/null +++ b/tests/suites/test_suite_cipher.padding.data @@ -0,0 +1,143 @@ +Set padding with AES-CBC +depends_on:POLARSSL_AES_C +set_padding:POLARSSL_CIPHER_AES_128_CBC:POLARSSL_PADDING_PKCS7:0 + +Set padding with AES-CFB +depends_on:POLARSSL_AES_C:POLARSSL_CIPHER_MODE_CFB +set_padding:POLARSSL_CIPHER_AES_128_CFB128:POLARSSL_PADDING_PKCS7:POLARSSL_ERR_CIPHER_BAD_INPUT_DATA + +Set padding with AES-CTR +depends_on:POLARSSL_AES_C:POLARSSL_CIPHER_MODE_CTR +set_padding:POLARSSL_CIPHER_AES_128_CTR:POLARSSL_PADDING_PKCS7:POLARSSL_ERR_CIPHER_BAD_INPUT_DATA + +Set padding with CAMELLIA-CBC +depends_on:POLARSSL_CAMELLIA_C +set_padding:POLARSSL_CIPHER_CAMELLIA_128_CBC:POLARSSL_PADDING_PKCS7:0 + +Set padding with CAMELLIA-CFB +depends_on:POLARSSL_CAMELLIA_C:POLARSSL_CIPHER_MODE_CFB +set_padding:POLARSSL_CIPHER_CAMELLIA_128_CFB128:POLARSSL_PADDING_PKCS7:POLARSSL_ERR_CIPHER_BAD_INPUT_DATA + +Set padding with CAMELLIA-CTR +depends_on:POLARSSL_CAMELLIA_C:POLARSSL_CIPHER_MODE_CTR +set_padding:POLARSSL_CIPHER_CAMELLIA_128_CTR:POLARSSL_PADDING_PKCS7:POLARSSL_ERR_CIPHER_BAD_INPUT_DATA + +Set padding with DES-CBC +depends_on:POLARSSL_DES_C +set_padding:POLARSSL_CIPHER_DES_CBC:POLARSSL_PADDING_PKCS7:0 + +Set padding with BLOWFISH-CBC +depends_on:POLARSSL_BLOWFISH_C +set_padding:POLARSSL_CIPHER_BLOWFISH_CBC:POLARSSL_PADDING_PKCS7:0 + +Set padding with BLOWFISH-CFB +depends_on:POLARSSL_BLOWFISH_C:POLARSSL_CIPHER_MODE_CFB +set_padding:POLARSSL_CIPHER_BLOWFISH_CFB64:POLARSSL_PADDING_PKCS7:POLARSSL_ERR_CIPHER_BAD_INPUT_DATA + +Set padding with BLOWFISH-CTR +depends_on:POLARSSL_BLOWFISH_C:POLARSSL_CIPHER_MODE_CTR +set_padding:POLARSSL_CIPHER_BLOWFISH_CTR:POLARSSL_PADDING_PKCS7:POLARSSL_ERR_CIPHER_BAD_INPUT_DATA + +Set padding with NULL +depends_on:POLARSSL_CIPHER_NULL_CIPHER +set_padding:POLARSSL_CIPHER_NULL:POLARSSL_PADDING_PKCS7:POLARSSL_ERR_CIPHER_BAD_INPUT_DATA + +Set non-existent padding with AES-CBC +depends_on:POLARSSL_AES_C +set_padding:POLARSSL_CIPHER_AES_128_CBC:-1:POLARSSL_ERR_CIPHER_BAD_INPUT_DATA + +Set non-existent padding with CAMELLIA-CBC +depends_on:POLARSSL_CAMELLIA_C +set_padding:POLARSSL_CIPHER_CAMELLIA_128_CBC:-1:POLARSSL_ERR_CIPHER_BAD_INPUT_DATA + +Set non-existent padding with DES-CBC +depends_on:POLARSSL_DES_C +set_padding:POLARSSL_CIPHER_DES_CBC:-1:POLARSSL_ERR_CIPHER_BAD_INPUT_DATA + +Set non-existent padding with BLOWFISH-CBC +depends_on:POLARSSL_BLOWFISH_C +set_padding:POLARSSL_CIPHER_BLOWFISH_CBC:-1:POLARSSL_ERR_CIPHER_BAD_INPUT_DATA + +Check PKCS padding #1 (correct) +check_padding:POLARSSL_PADDING_PKCS7:"DABBAD0004040404":0:4 + +Check PKCS padding #2 (correct) +check_padding:POLARSSL_PADDING_PKCS7:"DABBAD0001":0:4 + +Check PKCS padding #3 (correct) +check_padding:POLARSSL_PADDING_PKCS7:"DABBAD000101":0:5 + +Check PKCS padding #4 (correct) +check_padding:POLARSSL_PADDING_PKCS7:"030303":0:0 + +Check PKCS padding #5 (null padding) +check_padding:POLARSSL_PADDING_PKCS7:"DABBAD0000":POLARSSL_ERR_CIPHER_INVALID_PADDING:0 + +Check PKCS padding #6 (too few padding bytes) +check_padding:POLARSSL_PADDING_PKCS7:"DABBAD0002":POLARSSL_ERR_CIPHER_INVALID_PADDING:0 + +Check PKCS padding #7 (non-uniform padding bytes) +check_padding:POLARSSL_PADDING_PKCS7:"DABBAD00030203":POLARSSL_ERR_CIPHER_INVALID_PADDING:0 + +Check PKCS padding #8 (overlong) +check_padding:POLARSSL_PADDING_PKCS7:"040404":POLARSSL_ERR_CIPHER_INVALID_PADDING:0 + +Check one and zeros padding #1 (correct) +check_padding:POLARSSL_PADDING_ONE_AND_ZEROS:"DABBAD0080":0:4 + +Check one and zeros padding #2 (correct) +check_padding:POLARSSL_PADDING_ONE_AND_ZEROS:"DABBAD008000":0:4 + +Check one and zeros padding #3 (correct) +check_padding:POLARSSL_PADDING_ONE_AND_ZEROS:"DABBAD00800000":0:4 + +Check one and zeros padding #4 (correct) +check_padding:POLARSSL_PADDING_ONE_AND_ZEROS:"DABBAD00808000":0:5 + +Check one and zeros padding #5 (correct) +check_padding:POLARSSL_PADDING_ONE_AND_ZEROS:"800000":0:0 + +Check one and zeros padding #6 (missing one) +check_padding:POLARSSL_PADDING_ONE_AND_ZEROS:"DABBAD0000":POLARSSL_ERR_CIPHER_INVALID_PADDING:4 + +Check one and zeros padding #7 (overlong) +check_padding:POLARSSL_PADDING_ONE_AND_ZEROS:"0000000000":POLARSSL_ERR_CIPHER_INVALID_PADDING:4 + +Check zeros and len padding #1 (correct) +check_padding:POLARSSL_PADDING_ZEROS_AND_LEN:"DABBAD0001":0:4 + +Check zeros and len padding #2 (correct) +check_padding:POLARSSL_PADDING_ZEROS_AND_LEN:"DABBAD000002":0:4 + +Check zeros and len padding #3 (correct) +check_padding:POLARSSL_PADDING_ZEROS_AND_LEN:"DABBAD000003":0:3 + +Check zeros and len padding #4 (correct) +check_padding:POLARSSL_PADDING_ZEROS_AND_LEN:"000003":0:0 + +Check zeros and len padding #5 (overlong) +check_padding:POLARSSL_PADDING_ZEROS_AND_LEN:"000004":POLARSSL_ERR_CIPHER_INVALID_PADDING:0 + +Check zeros and len padding #6 (not enough zeros) +check_padding:POLARSSL_PADDING_ZEROS_AND_LEN:"DABBAD000004":POLARSSL_ERR_CIPHER_INVALID_PADDING:0 + +Check zeros padding #1 (correct) +check_padding:POLARSSL_PADDING_ZEROS:"DABBAD00":0:3 + +Check zeros padding #2 (correct) +check_padding:POLARSSL_PADDING_ZEROS:"DABBAD0000":0:3 + +Check zeros padding #3 (correct) +check_padding:POLARSSL_PADDING_ZEROS:"DABBAD":0:3 + +Check zeros padding #4 (correct) +check_padding:POLARSSL_PADDING_ZEROS:"000000":0:0 + +Check no padding #1 (correct by definition) +check_padding:POLARSSL_PADDING_NONE:"DABBAD00":0:4 + +Check no padding #2 (correct by definition) +check_padding:POLARSSL_PADDING_NONE:"DABBAD0001":0:5 + +Check no padding #3 (correct by definition) +check_padding:POLARSSL_PADDING_NONE:"":0:0