drivers: crypto: stm32: AES CTR IV is 16bytes
AES-CTR IV is the same as the block size 128-bits(16 bytes) regardless of key size. Signed-off-by: Chris LaFlash <chris-github@laflash.com>
This commit is contained in:
parent
fec0aaa80e
commit
e94adf1e2b
1 changed files with 2 additions and 2 deletions
|
|
@ -234,7 +234,7 @@ static int crypto_stm32_ctr_encrypt(struct cipher_ctx *ctx,
|
|||
{
|
||||
int ret;
|
||||
uint32_t ctr[BLOCK_LEN_WORDS] = {0};
|
||||
int ivlen = ctx->keylen - (ctx->mode_params.ctr_info.ctr_len >> 3);
|
||||
int ivlen = BLOCK_LEN_BYTES - (ctx->mode_params.ctr_info.ctr_len >> 3);
|
||||
|
||||
struct crypto_stm32_session *session = CRYPTO_STM32_SESSN(ctx);
|
||||
|
||||
|
|
@ -257,7 +257,7 @@ static int crypto_stm32_ctr_decrypt(struct cipher_ctx *ctx,
|
|||
{
|
||||
int ret;
|
||||
uint32_t ctr[BLOCK_LEN_WORDS] = {0};
|
||||
int ivlen = ctx->keylen - (ctx->mode_params.ctr_info.ctr_len >> 3);
|
||||
int ivlen = BLOCK_LEN_BYTES - (ctx->mode_params.ctr_info.ctr_len >> 3);
|
||||
|
||||
struct crypto_stm32_session *session = CRYPTO_STM32_SESSN(ctx);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue