ltq-deu: fix ifxdeu-ctr-rfc3686(aes) not matching generic impl
authorDaniel Kestrel <kestrel1974@t-online.de>
Sat, 5 Jun 2021 21:49:59 +0000 (23:49 +0200)
committerHauke Mehrtens <hauke@hauke-m.de>
Wed, 5 Jan 2022 23:22:53 +0000 (00:22 +0100)
Error ifxdeu-ctr-rfc3686(aes) (16) doesn't match generic impl (20) occurs
when running the cryptomgr extra tests that compare against the linux
kernels generic implementation.

Signed-off-by: Daniel Kestrel <kestrel1974@t-online.de>
package/kernel/lantiq/ltq-deu/src/ifxmips_aes.c

index b4417f2ef3f51fb0cfc7cf76d18ba5535aee87e6..a55766a4ac0d7f5f5f0bac04724bf053c720c849 100644 (file)
@@ -86,6 +86,7 @@ spinlock_t aes_lock;
 #define AES_BLOCK_SIZE      16
 #define CTR_RFC3686_NONCE_SIZE    4
 #define CTR_RFC3686_IV_SIZE       8
+#define CTR_RFC3686_MIN_KEY_SIZE  (AES_MIN_KEY_SIZE + CTR_RFC3686_NONCE_SIZE)
 #define CTR_RFC3686_MAX_KEY_SIZE  (AES_MAX_KEY_SIZE + CTR_RFC3686_NONCE_SIZE)
 
 #ifdef CRYPTO_DEBUG
@@ -1011,7 +1012,7 @@ struct skcipher_alg ifxdeu_ctr_rfc3686_aes_alg = {
     .base.cra_ctxsize        =   sizeof(struct aes_ctx),
     .base.cra_module         =   THIS_MODULE,
     .base.cra_list           =   LIST_HEAD_INIT(ifxdeu_ctr_rfc3686_aes_alg.base.cra_list),
-    .min_keysize             =   AES_MIN_KEY_SIZE,
+    .min_keysize             =   CTR_RFC3686_MIN_KEY_SIZE,
     .max_keysize             =   CTR_RFC3686_MAX_KEY_SIZE,
     .ivsize                  =   CTR_RFC3686_IV_SIZE,
     .walksize                =   AES_BLOCK_SIZE,