Lines Matching +full:aes +full:- +full:gcm
1 // SPDX-License-Identifier: GPL-2.0-or-later
9 * Copyright (c) 2002 Jean-Francois Dive <jef@linuxbe.org>
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("ofb(aes)")); in do_test()
1528 ret = min(ret, tcrypt_test("cfb(aes)")); in do_test()
1529 ret = min(ret, tcrypt_test("xctr(aes)")); in do_test()
1620 ret = min(ret, tcrypt_test("gcm(aes)")); in do_test()
1628 ret = min(ret, tcrypt_test("ccm(aes)")); in do_test()
1632 ret = min(ret, tcrypt_test("cts(cbc(aes))")); in do_test()
1644 ret = min(ret, tcrypt_test("blake2b-512")); in do_test()
1652 ret = min(ret, tcrypt_test("rfc4309(ccm(aes))")); in do_test()
1664 ret = min(ret, tcrypt_test("sha3-224")); in do_test()
1668 ret = min(ret, tcrypt_test("sha3-256")); in do_test()
1672 ret = min(ret, tcrypt_test("sha3-384")); in do_test()
1676 ret = min(ret, tcrypt_test("sha3-512")); in do_test()
1692 ret = min(ret, tcrypt_test("gcm(sm4)")); in do_test()
1704 ret = min(ret, tcrypt_test("gcm(aria)")); in do_test()
1736 ret = min(ret, tcrypt_test("xcbc(aes)")); in do_test()
1744 ret = min(ret, tcrypt_test("vmac64(aes)")); in do_test()
1748 ret = min(ret, tcrypt_test("hmac(sha3-224)")); in do_test()
1752 ret = min(ret, tcrypt_test("hmac(sha3-256)")); in do_test()
1756 ret = min(ret, tcrypt_test("hmac(sha3-384)")); in do_test()
1760 ret = min(ret, tcrypt_test("hmac(sha3-512)")); in do_test()
1776 ret = min(ret, tcrypt_test("rfc4106(gcm(aes))")); in do_test()
1780 ret = min(ret, tcrypt_test("rfc4543(gcm(aes))")); in do_test()
1784 ret = min(ret, tcrypt_test("cmac(aes)")); in do_test()
1792 ret = min(ret, tcrypt_test("authenc(hmac(sha1),cbc(aes))")); in do_test()
1859 test_cipher_speed("ecb(aes)", ENCRYPT, sec, NULL, 0, in do_test()
1861 test_cipher_speed("ecb(aes)", DECRYPT, sec, NULL, 0, in do_test()
1863 test_cipher_speed("cbc(aes)", ENCRYPT, sec, NULL, 0, in do_test()
1865 test_cipher_speed("cbc(aes)", DECRYPT, sec, NULL, 0, in do_test()
1867 test_cipher_speed("lrw(aes)", ENCRYPT, sec, NULL, 0, in do_test()
1869 test_cipher_speed("lrw(aes)", DECRYPT, sec, NULL, 0, in do_test()
1871 test_cipher_speed("xts(aes)", ENCRYPT, sec, NULL, 0, in do_test()
1873 test_cipher_speed("xts(aes)", DECRYPT, sec, NULL, 0, in do_test()
1875 test_cipher_speed("cts(cbc(aes))", ENCRYPT, sec, NULL, 0, in do_test()
1877 test_cipher_speed("cts(cbc(aes))", DECRYPT, sec, NULL, 0, in do_test()
1879 test_cipher_speed("ctr(aes)", ENCRYPT, sec, NULL, 0, in do_test()
1881 test_cipher_speed("ctr(aes)", DECRYPT, sec, NULL, 0, in do_test()
1883 test_cipher_speed("cfb(aes)", ENCRYPT, sec, NULL, 0, in do_test()
1885 test_cipher_speed("cfb(aes)", DECRYPT, sec, NULL, 0, in do_test()
2049 test_aead_speed("rfc4106(gcm(aes))", ENCRYPT, sec, in do_test()
2051 test_aead_speed("gcm(aes)", ENCRYPT, sec, in do_test()
2053 test_aead_speed("rfc4106(gcm(aes))", DECRYPT, sec, in do_test()
2055 test_aead_speed("gcm(aes)", DECRYPT, sec, in do_test()
2060 test_aead_speed("rfc4309(ccm(aes))", ENCRYPT, sec, in do_test()
2062 test_aead_speed("rfc4309(ccm(aes))", DECRYPT, sec, in do_test()
2079 test_mb_aead_speed("rfc4106(gcm(aes))", ENCRYPT, sec, NULL, in do_test()
2081 test_mb_aead_speed("gcm(aes)", ENCRYPT, sec, NULL, 0, 16, 8, in do_test()
2083 test_mb_aead_speed("rfc4106(gcm(aes))", DECRYPT, sec, NULL, in do_test()
2085 test_mb_aead_speed("gcm(aes)", DECRYPT, sec, NULL, 0, 16, 8, in do_test()
2090 test_mb_aead_speed("rfc4309(ccm(aes))", ENCRYPT, sec, NULL, 0, in do_test()
2092 test_mb_aead_speed("rfc4309(ccm(aes))", DECRYPT, sec, NULL, 0, in do_test()
2133 test_cipher_speed("adiantum(xchacha12,aes)", ENCRYPT, sec, NULL, in do_test()
2135 test_cipher_speed("adiantum(xchacha12,aes)", DECRYPT, sec, NULL, in do_test()
2137 test_cipher_speed("adiantum(xchacha20,aes)", ENCRYPT, sec, NULL, in do_test()
2139 test_cipher_speed("adiantum(xchacha20,aes)", DECRYPT, sec, NULL, in do_test()
2144 test_acipher_speed("essiv(cbc(aes),sha256)", in do_test()
2147 test_acipher_speed("essiv(cbc(aes),sha256)", in do_test()
2160 test_aead_speed("gcm(sm4)", ENCRYPT, sec, in do_test()
2162 test_aead_speed("gcm(sm4)", DECRYPT, sec, in do_test()
2174 test_mb_aead_speed("gcm(sm4)", ENCRYPT, sec, NULL, 0, 16, 8, in do_test()
2176 test_mb_aead_speed("gcm(sm4)", DECRYPT, sec, NULL, 0, 16, 8, in do_test()
2188 test_cipher_speed("hctr2(aes)", ENCRYPT, sec, NULL, in do_test()
2212 test_aead_speed("gcm(aria)", ENCRYPT, sec, in do_test()
2214 test_aead_speed("gcm(aria)", DECRYPT, sec, in do_test()
2219 test_mb_aead_speed("gcm(aria)", ENCRYPT, sec, NULL, 0, 16, 8, in do_test()
2221 test_mb_aead_speed("gcm(aria)", DECRYPT, sec, NULL, 0, 16, 8, in do_test()
2280 test_hash_speed("blake2b-512", sec, generic_hash_speed_template); in do_test()
2301 test_hash_speed("sha3-224", sec, generic_hash_speed_template); in do_test()
2305 test_hash_speed("sha3-256", sec, generic_hash_speed_template); in do_test()
2309 test_hash_speed("sha3-384", sec, generic_hash_speed_template); in do_test()
2313 test_hash_speed("sha3-512", sec, generic_hash_speed_template); in do_test()
2388 test_ahash_speed("blake2b-512", sec, generic_hash_speed_template); in do_test()
2392 test_ahash_speed("sha3-224", sec, generic_hash_speed_template); in do_test()
2396 test_ahash_speed("sha3-256", sec, generic_hash_speed_template); in do_test()
2400 test_ahash_speed("sha3-384", sec, generic_hash_speed_template); in do_test()
2404 test_ahash_speed("sha3-512", sec, generic_hash_speed_template); in do_test()
2415 test_acipher_speed("ecb(aes)", ENCRYPT, sec, NULL, 0, in do_test()
2417 test_acipher_speed("ecb(aes)", DECRYPT, sec, NULL, 0, in do_test()
2419 test_acipher_speed("cbc(aes)", ENCRYPT, sec, NULL, 0, in do_test()
2421 test_acipher_speed("cbc(aes)", DECRYPT, sec, NULL, 0, in do_test()
2423 test_acipher_speed("lrw(aes)", ENCRYPT, sec, NULL, 0, in do_test()
2425 test_acipher_speed("lrw(aes)", DECRYPT, sec, NULL, 0, in do_test()
2427 test_acipher_speed("xts(aes)", ENCRYPT, sec, NULL, 0, in do_test()
2429 test_acipher_speed("xts(aes)", DECRYPT, sec, NULL, 0, in do_test()
2431 test_acipher_speed("cts(cbc(aes))", ENCRYPT, sec, NULL, 0, in do_test()
2433 test_acipher_speed("cts(cbc(aes))", DECRYPT, sec, NULL, 0, in do_test()
2435 test_acipher_speed("ctr(aes)", ENCRYPT, sec, NULL, 0, in do_test()
2437 test_acipher_speed("ctr(aes)", DECRYPT, sec, NULL, 0, in do_test()
2439 test_acipher_speed("cfb(aes)", ENCRYPT, sec, NULL, 0, in do_test()
2441 test_acipher_speed("cfb(aes)", DECRYPT, sec, NULL, 0, in do_test()
2443 test_acipher_speed("ofb(aes)", ENCRYPT, sec, NULL, 0, in do_test()
2445 test_acipher_speed("ofb(aes)", DECRYPT, sec, NULL, 0, in do_test()
2447 test_acipher_speed("rfc3686(ctr(aes))", ENCRYPT, sec, NULL, 0, in do_test()
2449 test_acipher_speed("rfc3686(ctr(aes))", DECRYPT, sec, NULL, 0, in do_test()
2661 test_mb_skcipher_speed("ecb(aes)", ENCRYPT, sec, NULL, 0, in do_test()
2663 test_mb_skcipher_speed("ecb(aes)", DECRYPT, sec, NULL, 0, in do_test()
2665 test_mb_skcipher_speed("cbc(aes)", ENCRYPT, sec, NULL, 0, in do_test()
2667 test_mb_skcipher_speed("cbc(aes)", DECRYPT, sec, NULL, 0, in do_test()
2669 test_mb_skcipher_speed("lrw(aes)", ENCRYPT, sec, NULL, 0, in do_test()
2671 test_mb_skcipher_speed("lrw(aes)", DECRYPT, sec, NULL, 0, in do_test()
2673 test_mb_skcipher_speed("xts(aes)", ENCRYPT, sec, NULL, 0, in do_test()
2675 test_mb_skcipher_speed("xts(aes)", DECRYPT, sec, NULL, 0, in do_test()
2677 test_mb_skcipher_speed("cts(cbc(aes))", ENCRYPT, sec, NULL, 0, in do_test()
2679 test_mb_skcipher_speed("cts(cbc(aes))", DECRYPT, sec, NULL, 0, in do_test()
2681 test_mb_skcipher_speed("ctr(aes)", ENCRYPT, sec, NULL, 0, in do_test()
2683 test_mb_skcipher_speed("ctr(aes)", DECRYPT, sec, NULL, 0, in do_test()
2685 test_mb_skcipher_speed("cfb(aes)", ENCRYPT, sec, NULL, 0, in do_test()
2687 test_mb_skcipher_speed("cfb(aes)", DECRYPT, sec, NULL, 0, in do_test()
2689 test_mb_skcipher_speed("ofb(aes)", ENCRYPT, sec, NULL, 0, in do_test()
2691 test_mb_skcipher_speed("ofb(aes)", DECRYPT, sec, NULL, 0, in do_test()
2693 test_mb_skcipher_speed("rfc3686(ctr(aes))", ENCRYPT, sec, NULL, in do_test()
2695 test_mb_skcipher_speed("rfc3686(ctr(aes))", DECRYPT, sec, NULL, in do_test()
2890 int err = -ENOMEM; in tcrypt_mod_init()
2908 /* We intentionaly return -EAGAIN to prevent keeping the module, in tcrypt_mod_init()
2913 * -- mludvig in tcrypt_mod_init()
2916 err = -EAGAIN; in tcrypt_mod_init()