Eric Biggers
e8cfed5e4e
crypto: cipher - remove crt_u.cipher (struct cipher_tfm)
...
Of the three fields in crt_u.cipher (struct cipher_tfm), ->cit_setkey()
is pointless because it always points to setkey() in crypto/cipher.c.
->cit_decrypt_one() and ->cit_encrypt_one() are slightly less pointless,
since if the algorithm doesn't have an alignmask, they are set directly
to ->cia_encrypt() and ->cia_decrypt(). However, this "optimization"
isn't worthwhile because:
- The "cipher" algorithm type is the only algorithm still using crt_u,
so it's bloating every struct crypto_tfm for every algorithm type.
- If the algorithm has an alignmask, this "optimization" actually makes
things slower, as it causes 2 indirect calls per block rather than 1.
- It adds extra code complexity.
- Some templates already call ->cia_encrypt()/->cia_decrypt() directly
instead of going through ->cit_encrypt_one()/->cit_decrypt_one().
- The "cipher" algorithm type never gives optimal performance anyway.
For that, a higher-level type such as skcipher needs to be used.
Therefore, just remove the extra indirection, and make
crypto_cipher_setkey(), crypto_cipher_encrypt_one(), and
crypto_cipher_decrypt_one() be direct calls into crypto/cipher.c.
Also remove the unused function crypto_cipher_cast().
Signed-off-by: Eric Biggers <ebiggers@google.com >
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au >
2019-12-11 16:37:01 +08:00
..
2019-11-16 21:51:42 -08:00
2019-11-27 22:28:37 +01:00
2019-11-27 08:15:00 -08:00
2019-11-14 16:03:35 +05:30
2019-12-05 11:43:31 -08:00
2019-11-22 19:56:20 +00:00
2019-12-03 09:29:50 -08:00
2019-12-05 11:43:31 -08:00
2019-11-27 10:17:28 -08:00
2019-11-18 10:05:38 +01:00
2019-12-06 08:26:50 -08:00
2019-11-13 11:33:53 +01:00
2019-11-26 16:02:40 -08:00
2019-12-05 11:43:31 -08:00
2019-12-07 16:56:00 -08:00
2019-11-16 14:45:31 +01:00
2019-12-04 13:32:45 +10:00
2019-11-14 12:31:00 +08:00
2019-11-23 09:56:02 -08:00
2019-12-04 19:44:14 -08:00
2019-12-04 19:44:12 -08:00
2019-11-21 09:06:47 -07:00
2019-11-18 08:40:41 -07:00
2019-11-13 12:50:38 -07:00
2019-12-03 08:51:25 -07:00
2019-11-15 23:44:48 +01:00
2019-11-24 17:04:11 -08:00
2019-11-24 17:12:11 -08:00
2019-11-14 13:15:11 -05:00
2019-11-15 23:45:24 +01:00
2019-12-04 19:44:12 -08:00
2019-12-03 07:36:38 -07:00
2019-12-01 14:00:59 -08:00
2019-11-26 10:26:26 +01:00
2019-11-26 09:43:34 -08:00
2019-11-29 11:48:39 +01:00
2019-12-11 16:37:01 +08:00
2019-11-15 13:49:04 -05:00
2019-11-21 14:28:32 +01:00
2019-11-25 11:53:26 -08:00
2019-11-28 11:16:43 -08:00
2019-11-21 18:14:35 +01:00
2019-11-28 11:16:43 -08:00
2019-11-20 20:31:38 +01:00
2019-12-03 11:20:37 +01:00
2019-11-26 19:25:25 -08:00
2019-12-05 12:27:16 -08:00
2019-12-02 14:46:22 -08:00
2019-12-01 09:34:03 -08:00
2019-12-02 14:46:22 -08:00
2019-11-27 11:42:01 -08:00
2019-11-20 09:40:10 +01:00
2019-11-27 11:06:20 -08:00
2019-12-04 19:44:13 -08:00
2019-11-14 07:43:53 -07:00
2019-12-01 12:59:06 -08:00
2019-11-23 19:56:45 -04:00
2019-12-01 12:59:08 -08:00
2019-11-21 20:10:44 -05:00
2019-11-28 17:15:21 +01:00
2019-12-03 12:20:25 -08:00
2019-11-16 10:20:02 +00:00
2019-11-16 10:18:52 +00:00
2019-11-30 10:53:02 -08:00
2019-12-01 12:59:05 -08:00
2019-12-04 19:44:14 -08:00
2019-11-21 07:33:24 +01:00
2019-12-04 19:44:12 -08:00
2019-11-21 12:03:40 +01:00
2019-11-26 13:35:25 -07:00
2019-11-19 09:52:12 -08:00
2019-11-14 11:36:53 +08:00
2019-12-01 12:59:08 -08:00
2019-12-01 12:59:07 -08:00
2019-12-01 12:59:10 -08:00
2019-11-15 18:34:00 -08:00
2019-12-06 10:28:09 -08:00
2019-12-04 19:44:15 -08:00
2019-11-23 19:56:44 -04:00
2019-12-01 12:59:10 -08:00
2019-11-14 11:36:53 +08:00
2019-12-01 12:59:05 -08:00
2019-11-15 13:49:04 -05:00
2019-11-14 19:06:47 -08:00
2019-12-07 11:55:11 -08:00
2019-12-04 19:44:12 -08:00
2019-11-22 02:21:08 +09:00
2019-11-27 10:53:50 -08:00
2019-11-21 07:49:29 -06:00
2019-12-11 16:36:45 +08:00
2019-12-01 12:59:04 -08:00
2019-11-13 19:09:47 +08:00
2019-11-20 16:30:10 +00:00
2019-12-03 13:58:22 -08:00
2019-11-25 14:28:04 -08:00
2019-11-16 20:02:47 -08:00
2019-11-26 15:04:47 -08:00
2019-11-25 10:47:00 -08:00
2019-11-23 16:13:39 -08:00
2019-11-15 23:49:22 +01:00
2019-11-15 23:49:22 +01:00
2019-12-07 13:21:01 -08:00
2019-11-13 11:41:50 +01:00
2019-11-29 12:04:50 +01:00
2019-11-13 11:41:50 +01:00
2019-12-04 19:44:11 -08:00
2019-12-06 10:28:09 -08:00
2019-12-04 19:44:13 -08:00
2019-11-26 16:02:40 -08:00
2019-11-25 09:15:32 +01:00
2019-12-05 11:43:31 -08:00
2019-12-05 11:43:31 -08:00
2019-11-14 13:07:48 +08:00
2019-11-13 12:50:40 -07:00
2019-12-04 19:44:14 -08:00
2019-11-30 14:35:43 -08:00
2019-11-14 13:15:12 -05:00
2019-11-20 22:29:40 -08:00
2019-12-04 17:11:25 -08:00
2019-11-28 22:40:29 -08:00
2019-12-01 06:29:17 -08:00
2019-12-03 07:04:30 -07:00
2019-11-14 13:15:11 -05:00
2019-11-13 12:15:34 -08:00
2019-12-01 06:29:18 -08:00
2019-12-01 12:59:07 -08:00
2019-11-15 14:38:30 +01:00
2019-12-04 19:44:11 -08:00
2019-12-04 19:44:14 -08:00
2019-11-26 15:42:43 -08:00
2019-11-15 14:38:29 +01:00
2019-12-06 21:05:14 -08:00
2019-11-22 19:41:08 -05:00
2019-11-14 13:15:12 -05:00
2019-11-22 19:41:08 -05:00
2019-12-01 14:00:59 -08:00
2019-11-14 18:12:18 -08:00
2019-12-01 12:59:05 -08:00
2019-12-04 19:44:11 -08:00
2019-11-14 18:12:18 -08:00
2019-11-14 12:20:02 +08:00