From e5babded4bffdf9c17ae39ab5dd5d6f5c35b2239 Mon Sep 17 00:00:00 2001 From: kkrentz Date: Wed, 21 Oct 2015 01:12:29 -0700 Subject: [PATCH] AES-128: Deleted the function aes_128_padded_encrypt --- core/lib/aes-128.c | 11 ----------- core/lib/aes-128.h | 5 ----- 2 files changed, 16 deletions(-) diff --git a/core/lib/aes-128.c b/core/lib/aes-128.c index 23e4356b7..98e115c3f 100644 --- a/core/lib/aes-128.c +++ b/core/lib/aes-128.c @@ -167,17 +167,6 @@ encrypt(uint8_t *state) } /*---------------------------------------------------------------------------*/ void -aes_128_padded_encrypt(uint8_t *plaintext_and_result, uint8_t plaintext_len) -{ - uint8_t block[AES_128_BLOCK_SIZE]; - - memset(block, 0, AES_128_BLOCK_SIZE); - memcpy(block, plaintext_and_result, plaintext_len); - AES_128.encrypt(block); - memcpy(plaintext_and_result, block, plaintext_len); -} -/*---------------------------------------------------------------------------*/ -void aes_128_set_padded_key(uint8_t *key, uint8_t key_len) { uint8_t block[AES_128_BLOCK_SIZE]; diff --git a/core/lib/aes-128.h b/core/lib/aes-128.h index 59a7f7c33..9ff228337 100644 --- a/core/lib/aes-128.h +++ b/core/lib/aes-128.h @@ -67,11 +67,6 @@ struct aes_128_driver { void (* encrypt)(uint8_t *plaintext_and_result); }; -/** - * \brief Pads the plaintext with zeroes before calling AES_128.encrypt - */ -void aes_128_padded_encrypt(uint8_t *plaintext_and_result, uint8_t plaintext_len); - /** * \brief Pads the key with zeroes before calling AES_128.set_key */