Lines Matching +full:aes +full:- +full:cmac

1 // SPDX-License-Identifier: GPL-2.0-or-later
9 * Copyright (c) 2002 Jean-Francois Dive <[email protected]>
12 * Updated RFC4106 AES-GCM testing.
91 while (i-- > 0) in testmgr_alloc_buf()
94 return -ENOMEM; in testmgr_alloc_buf()
109 int np = (buflen + PAGE_SIZE - 1)/PAGE_SIZE; in sg_init_aead()
124 np--; in sg_init_aead()
134 struct crypto_wait *wait = req->base.data; in do_one_aead_op()
185 return -ENOMEM; in test_mb_aead_jiffies()
212 return -ENOMEM; in test_mb_aead_cycles()
214 /* Warm-up run. */ in test_mb_aead_cycles()
232 cycles += end - start; in test_mb_aead_cycles()
293 while (i--) in test_mb_aead_speed()
300 while (i--) in test_mb_aead_speed()
307 while (i--) in test_mb_aead_speed()
317 while (i--) in test_mb_aead_speed()
378 assoc = cur->axbuf[0]; in test_mb_aead_speed()
381 sg_init_aead(cur->sg, cur->xbuf, in test_mb_aead_speed()
385 sg_init_aead(cur->sgout, cur->xoutbuf, in test_mb_aead_speed()
389 aead_request_set_ad(cur->req, aad_size); in test_mb_aead_speed()
393 aead_request_set_crypt(cur->req, in test_mb_aead_speed()
394 cur->sgout, in test_mb_aead_speed()
395 cur->sg, in test_mb_aead_speed()
397 ret = crypto_aead_encrypt(cur->req); in test_mb_aead_speed()
398 ret = do_one_aead_op(cur->req, ret); in test_mb_aead_speed()
407 aead_request_set_crypt(cur->req, cur->sg, in test_mb_aead_speed()
408 cur->sgout, bs + in test_mb_aead_speed()
482 /* Warm-up run. */ in test_aead_cycles()
507 cycles += end - start; in test_aead_cycles()
525 int ret = -ENOMEM; in test_aead_speed()
649 * reversed (input <-> output) to calculate it in test_aead_speed()
714 struct crypto_wait *wait = req->base.data; in do_one_ahash_op()
777 /* Warm-up run. */ in test_ahash_cycles_digest()
796 cycles += end - start; in test_ahash_cycles_digest()
818 /* Warm-up run. */ in test_ahash_cycles()
853 cycles += end - start; in test_ahash_cycles()
1002 return -ENOMEM; in test_mb_acipher_jiffies()
1029 return -ENOMEM; in test_mb_acipher_cycles()
1031 /* Warm-up run. */ in test_mb_acipher_cycles()
1049 cycles += end - start; in test_mb_acipher_cycles()
1091 while (i--) in test_mb_skcipher_speed()
1101 while (i--) in test_mb_skcipher_speed()
1164 sg_init_table(cur->sg, pages); in test_mb_skcipher_speed()
1167 sg_set_buf(cur->sg + p, cur->xbuf[p], in test_mb_skcipher_speed()
1169 memset(cur->xbuf[p], 0xff, PAGE_SIZE); in test_mb_skcipher_speed()
1171 k -= PAGE_SIZE; in test_mb_skcipher_speed()
1174 sg_set_buf(cur->sg + p, cur->xbuf[p], k); in test_mb_skcipher_speed()
1175 memset(cur->xbuf[p], 0xff, k); in test_mb_skcipher_speed()
1177 skcipher_request_set_crypt(cur->req, cur->sg, in test_mb_skcipher_speed()
1178 cur->sg, bs, iv); in test_mb_skcipher_speed()
1216 struct crypto_wait *wait = req->base.data; in do_one_acipher_op()
1253 /* Warm-up run. */ in test_acipher_cycles()
1282 cycles += end - start; in test_acipher_cycles()
1376 PAGE_SIZE - *keysize); in test_skcipher_speed()
1377 k -= PAGE_SIZE; in test_skcipher_speed()
1383 k -= PAGE_SIZE; in test_skcipher_speed()
1446 /* non-fips algs return -EINVAL or -ECANCELED in fips mode */ in tcrypt_test()
1447 if (fips_enabled && (ret == -EINVAL || ret == -ECANCELED)) in tcrypt_test()
1462 ret = -ENOENT; in do_test()
1521 ret = min(ret, tcrypt_test("ecb(aes)")); in do_test()
1522 ret = min(ret, tcrypt_test("cbc(aes)")); in do_test()
1523 ret = min(ret, tcrypt_test("lrw(aes)")); in do_test()
1524 ret = min(ret, tcrypt_test("xts(aes)")); in do_test()
1525 ret = min(ret, tcrypt_test("ctr(aes)")); in do_test()
1526 ret = min(ret, tcrypt_test("rfc3686(ctr(aes))")); in do_test()
1527 ret = min(ret, tcrypt_test("xctr(aes)")); in do_test()
1618 ret = min(ret, tcrypt_test("gcm(aes)")); in do_test()
1626 ret = min(ret, tcrypt_test("ccm(aes)")); in do_test()
1630 ret = min(ret, tcrypt_test("cts(cbc(aes))")); in do_test()
1642 ret = min(ret, tcrypt_test("blake2b-512")); in do_test()
1650 ret = min(ret, tcrypt_test("rfc4309(ccm(aes))")); in do_test()
1662 ret = min(ret, tcrypt_test("sha3-224")); in do_test()
1666 ret = min(ret, tcrypt_test("sha3-256")); in do_test()
1670 ret = min(ret, tcrypt_test("sha3-384")); in do_test()
1674 ret = min(ret, tcrypt_test("sha3-512")); in do_test()
1734 ret = min(ret, tcrypt_test("xcbc(aes)")); in do_test()
1742 ret = min(ret, tcrypt_test("hmac(sha3-224)")); in do_test()
1746 ret = min(ret, tcrypt_test("hmac(sha3-256)")); in do_test()
1750 ret = min(ret, tcrypt_test("hmac(sha3-384)")); in do_test()
1754 ret = min(ret, tcrypt_test("hmac(sha3-512)")); in do_test()
1770 ret = min(ret, tcrypt_test("rfc4106(gcm(aes))")); in do_test()
1774 ret = min(ret, tcrypt_test("rfc4543(gcm(aes))")); in do_test()
1778 ret = min(ret, tcrypt_test("cmac(aes)")); in do_test()
1782 ret = min(ret, tcrypt_test("cmac(des3_ede)")); in do_test()
1786 ret = min(ret, tcrypt_test("authenc(hmac(sha1),cbc(aes))")); in do_test()
1802 ret = min(ret, tcrypt_test("cmac(sm4)")); in do_test()
1854 test_cipher_speed("ecb(aes)", ENCRYPT, sec, NULL, 0, in do_test()
1856 test_cipher_speed("ecb(aes)", DECRYPT, sec, NULL, 0, in do_test()
1858 test_cipher_speed("cbc(aes)", ENCRYPT, sec, NULL, 0, in do_test()
1860 test_cipher_speed("cbc(aes)", DECRYPT, sec, NULL, 0, in do_test()
1862 test_cipher_speed("lrw(aes)", ENCRYPT, sec, NULL, 0, in do_test()
1864 test_cipher_speed("lrw(aes)", DECRYPT, sec, NULL, 0, in do_test()
1866 test_cipher_speed("xts(aes)", ENCRYPT, sec, NULL, 0, in do_test()
1868 test_cipher_speed("xts(aes)", DECRYPT, sec, NULL, 0, in do_test()
1870 test_cipher_speed("cts(cbc(aes))", ENCRYPT, sec, NULL, 0, in do_test()
1872 test_cipher_speed("cts(cbc(aes))", DECRYPT, sec, NULL, 0, in do_test()
1874 test_cipher_speed("ctr(aes)", ENCRYPT, sec, NULL, 0, in do_test()
1876 test_cipher_speed("ctr(aes)", DECRYPT, sec, NULL, 0, in do_test()
2040 test_aead_speed("rfc4106(gcm(aes))", ENCRYPT, sec, in do_test()
2042 test_aead_speed("gcm(aes)", ENCRYPT, sec, in do_test()
2044 test_aead_speed("rfc4106(gcm(aes))", DECRYPT, sec, in do_test()
2046 test_aead_speed("gcm(aes)", DECRYPT, sec, in do_test()
2051 test_aead_speed("rfc4309(ccm(aes))", ENCRYPT, sec, in do_test()
2053 test_aead_speed("rfc4309(ccm(aes))", DECRYPT, sec, in do_test()
2070 test_mb_aead_speed("rfc4106(gcm(aes))", ENCRYPT, sec, NULL, in do_test()
2072 test_mb_aead_speed("gcm(aes)", ENCRYPT, sec, NULL, 0, 16, 8, in do_test()
2074 test_mb_aead_speed("rfc4106(gcm(aes))", DECRYPT, sec, NULL, in do_test()
2076 test_mb_aead_speed("gcm(aes)", DECRYPT, sec, NULL, 0, 16, 8, in do_test()
2081 test_mb_aead_speed("rfc4309(ccm(aes))", ENCRYPT, sec, NULL, 0, in do_test()
2083 test_mb_aead_speed("rfc4309(ccm(aes))", DECRYPT, sec, NULL, 0, in do_test()
2120 test_cipher_speed("adiantum(xchacha12,aes)", ENCRYPT, sec, NULL, in do_test()
2122 test_cipher_speed("adiantum(xchacha12,aes)", DECRYPT, sec, NULL, in do_test()
2124 test_cipher_speed("adiantum(xchacha20,aes)", ENCRYPT, sec, NULL, in do_test()
2126 test_cipher_speed("adiantum(xchacha20,aes)", DECRYPT, sec, NULL, in do_test()
2131 test_acipher_speed("essiv(cbc(aes),sha256)", in do_test()
2134 test_acipher_speed("essiv(cbc(aes),sha256)", in do_test()
2175 test_cipher_speed("hctr2(aes)", ENCRYPT, sec, NULL, in do_test()
2263 test_hash_speed("blake2b-512", sec, generic_hash_speed_template); in do_test()
2284 test_hash_speed("sha3-224", sec, generic_hash_speed_template); in do_test()
2288 test_hash_speed("sha3-256", sec, generic_hash_speed_template); in do_test()
2292 test_hash_speed("sha3-384", sec, generic_hash_speed_template); in do_test()
2296 test_hash_speed("sha3-512", sec, generic_hash_speed_template); in do_test()
2371 test_ahash_speed("blake2b-512", sec, generic_hash_speed_template); in do_test()
2375 test_ahash_speed("sha3-224", sec, generic_hash_speed_template); in do_test()
2379 test_ahash_speed("sha3-256", sec, generic_hash_speed_template); in do_test()
2383 test_ahash_speed("sha3-384", sec, generic_hash_speed_template); in do_test()
2387 test_ahash_speed("sha3-512", sec, generic_hash_speed_template); in do_test()
2398 test_acipher_speed("ecb(aes)", ENCRYPT, sec, NULL, 0, in do_test()
2400 test_acipher_speed("ecb(aes)", DECRYPT, sec, NULL, 0, in do_test()
2402 test_acipher_speed("cbc(aes)", ENCRYPT, sec, NULL, 0, in do_test()
2404 test_acipher_speed("cbc(aes)", DECRYPT, sec, NULL, 0, in do_test()
2406 test_acipher_speed("lrw(aes)", ENCRYPT, sec, NULL, 0, in do_test()
2408 test_acipher_speed("lrw(aes)", DECRYPT, sec, NULL, 0, in do_test()
2410 test_acipher_speed("xts(aes)", ENCRYPT, sec, NULL, 0, in do_test()
2412 test_acipher_speed("xts(aes)", DECRYPT, sec, NULL, 0, in do_test()
2414 test_acipher_speed("cts(cbc(aes))", ENCRYPT, sec, NULL, 0, in do_test()
2416 test_acipher_speed("cts(cbc(aes))", DECRYPT, sec, NULL, 0, in do_test()
2418 test_acipher_speed("ctr(aes)", ENCRYPT, sec, NULL, 0, in do_test()
2420 test_acipher_speed("ctr(aes)", DECRYPT, sec, NULL, 0, in do_test()
2422 test_acipher_speed("rfc3686(ctr(aes))", ENCRYPT, sec, NULL, 0, in do_test()
2424 test_acipher_speed("rfc3686(ctr(aes))", DECRYPT, sec, NULL, 0, in do_test()
2621 test_mb_skcipher_speed("ecb(aes)", ENCRYPT, sec, NULL, 0, in do_test()
2623 test_mb_skcipher_speed("ecb(aes)", DECRYPT, sec, NULL, 0, in do_test()
2625 test_mb_skcipher_speed("cbc(aes)", ENCRYPT, sec, NULL, 0, in do_test()
2627 test_mb_skcipher_speed("cbc(aes)", DECRYPT, sec, NULL, 0, in do_test()
2629 test_mb_skcipher_speed("lrw(aes)", ENCRYPT, sec, NULL, 0, in do_test()
2631 test_mb_skcipher_speed("lrw(aes)", DECRYPT, sec, NULL, 0, in do_test()
2633 test_mb_skcipher_speed("xts(aes)", ENCRYPT, sec, NULL, 0, in do_test()
2635 test_mb_skcipher_speed("xts(aes)", DECRYPT, sec, NULL, 0, in do_test()
2637 test_mb_skcipher_speed("cts(cbc(aes))", ENCRYPT, sec, NULL, 0, in do_test()
2639 test_mb_skcipher_speed("cts(cbc(aes))", DECRYPT, sec, NULL, 0, in do_test()
2641 test_mb_skcipher_speed("ctr(aes)", ENCRYPT, sec, NULL, 0, in do_test()
2643 test_mb_skcipher_speed("ctr(aes)", DECRYPT, sec, NULL, 0, in do_test()
2645 test_mb_skcipher_speed("rfc3686(ctr(aes))", ENCRYPT, sec, NULL, in do_test()
2647 test_mb_skcipher_speed("rfc3686(ctr(aes))", DECRYPT, sec, NULL, in do_test()
2822 int err = -ENOMEM; in tcrypt_mod_init()
2840 /* We intentionaly return -EAGAIN to prevent keeping the module, in tcrypt_mod_init()
2845 * -- mludvig in tcrypt_mod_init()
2848 err = -EAGAIN; in tcrypt_mod_init()