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.
71 "blowfish", "twofish", "serpent", "sha384", "sha512", "md4", "aes",
75 "lzo", "lzo-rle", "cts", "sha3-224", "sha3-256", "sha3-384",
76 "sha3-512", "streebog256", "streebog512",
99 while (i-- > 0) in testmgr_alloc_buf()
102 return -ENOMEM; in testmgr_alloc_buf()
117 int np = (buflen + PAGE_SIZE - 1)/PAGE_SIZE; in sg_init_aead()
132 np--; in sg_init_aead()
142 struct crypto_wait *wait = req->base.data; in do_one_aead_op()
193 return -ENOMEM; in test_mb_aead_jiffies()
220 return -ENOMEM; in test_mb_aead_cycles()
222 /* Warm-up run. */ in test_mb_aead_cycles()
240 cycles += end - start; in test_mb_aead_cycles()
296 while (i--) in test_mb_aead_speed()
303 while (i--) in test_mb_aead_speed()
310 while (i--) in test_mb_aead_speed()
320 while (i--) in test_mb_aead_speed()
379 assoc = cur->axbuf[0]; in test_mb_aead_speed()
382 sg_init_aead(cur->sg, cur->xbuf, in test_mb_aead_speed()
386 sg_init_aead(cur->sgout, cur->xoutbuf, in test_mb_aead_speed()
390 aead_request_set_ad(cur->req, aad_size); in test_mb_aead_speed()
394 aead_request_set_crypt(cur->req, in test_mb_aead_speed()
395 cur->sgout, in test_mb_aead_speed()
396 cur->sg, in test_mb_aead_speed()
398 ret = crypto_aead_encrypt(cur->req); in test_mb_aead_speed()
399 ret = do_one_aead_op(cur->req, ret); in test_mb_aead_speed()
408 aead_request_set_crypt(cur->req, cur->sg, in test_mb_aead_speed()
409 cur->sgout, *b_size + in test_mb_aead_speed()
483 /* Warm-up run. */ in test_aead_cycles()
508 cycles += end - start; in test_aead_cycles()
526 int ret = -ENOMEM; in test_aead_speed()
644 * reversed (input <-> output) to calculate it in test_aead_speed()
709 struct crypto_wait *wait = req->base.data; in do_one_ahash_op()
754 return -ENOMEM; in test_mb_ahash_jiffies()
781 return -ENOMEM; in test_mb_ahash_cycles()
783 /* Warm-up run. */ in test_mb_ahash_cycles()
801 cycles += end - start; in test_mb_ahash_cycles()
966 /* Warm-up run. */ in test_ahash_cycles_digest()
985 cycles += end - start; in test_ahash_cycles_digest()
1007 /* Warm-up run. */ in test_ahash_cycles()
1042 cycles += end - start; in test_ahash_cycles()
1191 return -ENOMEM; in test_mb_acipher_jiffies()
1218 return -ENOMEM; in test_mb_acipher_cycles()
1220 /* Warm-up run. */ in test_mb_acipher_cycles()
1238 cycles += end - start; in test_mb_acipher_cycles()
1280 while (i--) in test_mb_skcipher_speed()
1288 while (i--) in test_mb_skcipher_speed()
1299 while (i--) in test_mb_skcipher_speed()
1360 sg_init_table(cur->sg, pages); in test_mb_skcipher_speed()
1363 sg_set_buf(cur->sg + p, cur->xbuf[p], in test_mb_skcipher_speed()
1365 memset(cur->xbuf[p], 0xff, PAGE_SIZE); in test_mb_skcipher_speed()
1367 k -= PAGE_SIZE; in test_mb_skcipher_speed()
1370 sg_set_buf(cur->sg + p, cur->xbuf[p], k); in test_mb_skcipher_speed()
1371 memset(cur->xbuf[p], 0xff, k); in test_mb_skcipher_speed()
1373 skcipher_request_set_crypt(cur->req, cur->sg, in test_mb_skcipher_speed()
1374 cur->sg, *b_size, in test_mb_skcipher_speed()
1413 struct crypto_wait *wait = req->base.data; in do_one_acipher_op()
1450 /* Warm-up run. */ in test_acipher_cycles()
1479 cycles += end - start; in test_acipher_cycles()
1573 PAGE_SIZE - *keysize); in test_skcipher_speed()
1574 k -= PAGE_SIZE; in test_skcipher_speed()
1580 k -= PAGE_SIZE; in test_skcipher_speed()
1655 /* non-fips algs return -EINVAL in fips mode */ in tcrypt_test()
1656 if (fips_enabled && ret == -EINVAL) in tcrypt_test()
1671 ret = -ENOENT; in do_test()
1730 ret += tcrypt_test("ecb(aes)"); in do_test()
1731 ret += tcrypt_test("cbc(aes)"); in do_test()
1732 ret += tcrypt_test("lrw(aes)"); in do_test()
1733 ret += tcrypt_test("xts(aes)"); in do_test()
1734 ret += tcrypt_test("ctr(aes)"); in do_test()
1735 ret += tcrypt_test("rfc3686(ctr(aes))"); in do_test()
1736 ret += tcrypt_test("ofb(aes)"); in do_test()
1737 ret += tcrypt_test("cfb(aes)"); in do_test()
1848 ret += tcrypt_test("gcm(aes)"); in do_test()
1856 ret += tcrypt_test("ccm(aes)"); in do_test()
1860 ret += tcrypt_test("cts(cbc(aes))"); in do_test()
1884 ret += tcrypt_test("rfc4309(ccm(aes))"); in do_test()
1896 ret += tcrypt_test("sha3-224"); in do_test()
1900 ret += tcrypt_test("sha3-256"); in do_test()
1904 ret += tcrypt_test("sha3-384"); in do_test()
1908 ret += tcrypt_test("sha3-512"); in do_test()
1948 ret += tcrypt_test("xcbc(aes)"); in do_test()
1960 ret += tcrypt_test("vmac64(aes)"); in do_test()
1964 ret += tcrypt_test("hmac(sha3-224)"); in do_test()
1968 ret += tcrypt_test("hmac(sha3-256)"); in do_test()
1972 ret += tcrypt_test("hmac(sha3-384)"); in do_test()
1976 ret += tcrypt_test("hmac(sha3-512)"); in do_test()
1992 ret += tcrypt_test("rfc4106(gcm(aes))"); in do_test()
1996 ret += tcrypt_test("rfc4543(gcm(aes))"); in do_test()
2000 ret += tcrypt_test("cmac(aes)"); in do_test()
2008 ret += tcrypt_test("authenc(hmac(sha1),cbc(aes))"); in do_test()
2054 test_cipher_speed("ecb(aes)", ENCRYPT, sec, NULL, 0, in do_test()
2056 test_cipher_speed("ecb(aes)", DECRYPT, sec, NULL, 0, in do_test()
2058 test_cipher_speed("cbc(aes)", ENCRYPT, sec, NULL, 0, in do_test()
2060 test_cipher_speed("cbc(aes)", DECRYPT, sec, NULL, 0, in do_test()
2062 test_cipher_speed("lrw(aes)", ENCRYPT, sec, NULL, 0, in do_test()
2064 test_cipher_speed("lrw(aes)", DECRYPT, sec, NULL, 0, in do_test()
2066 test_cipher_speed("xts(aes)", ENCRYPT, sec, NULL, 0, in do_test()
2068 test_cipher_speed("xts(aes)", DECRYPT, sec, NULL, 0, in do_test()
2070 test_cipher_speed("cts(cbc(aes))", ENCRYPT, sec, NULL, 0, in do_test()
2072 test_cipher_speed("cts(cbc(aes))", DECRYPT, sec, NULL, 0, in do_test()
2074 test_cipher_speed("ctr(aes)", ENCRYPT, sec, NULL, 0, in do_test()
2076 test_cipher_speed("ctr(aes)", DECRYPT, sec, NULL, 0, in do_test()
2078 test_cipher_speed("cfb(aes)", ENCRYPT, sec, NULL, 0, in do_test()
2080 test_cipher_speed("cfb(aes)", DECRYPT, sec, NULL, 0, in do_test()
2249 test_aead_speed("rfc4106(gcm(aes))", ENCRYPT, sec, in do_test()
2251 test_aead_speed("gcm(aes)", ENCRYPT, sec, in do_test()
2253 test_aead_speed("rfc4106(gcm(aes))", DECRYPT, sec, in do_test()
2255 test_aead_speed("gcm(aes)", DECRYPT, sec, in do_test()
2260 test_aead_speed("rfc4309(ccm(aes))", ENCRYPT, sec, in do_test()
2262 test_aead_speed("rfc4309(ccm(aes))", DECRYPT, sec, in do_test()
2279 test_mb_aead_speed("rfc4106(gcm(aes))", ENCRYPT, sec, NULL, in do_test()
2281 test_mb_aead_speed("gcm(aes)", ENCRYPT, sec, NULL, 0, 16, 8, in do_test()
2283 test_mb_aead_speed("rfc4106(gcm(aes))", DECRYPT, sec, NULL, in do_test()
2285 test_mb_aead_speed("gcm(aes)", DECRYPT, sec, NULL, 0, 16, 8, in do_test()
2290 test_mb_aead_speed("rfc4309(ccm(aes))", ENCRYPT, sec, NULL, 0, in do_test()
2292 test_mb_aead_speed("rfc4309(ccm(aes))", DECRYPT, sec, NULL, 0, in do_test()
2321 test_cipher_speed("adiantum(xchacha12,aes)", ENCRYPT, sec, NULL, in do_test()
2323 test_cipher_speed("adiantum(xchacha12,aes)", DECRYPT, sec, NULL, in do_test()
2325 test_cipher_speed("adiantum(xchacha20,aes)", ENCRYPT, sec, NULL, in do_test()
2327 test_cipher_speed("adiantum(xchacha20,aes)", DECRYPT, sec, NULL, in do_test()
2332 test_acipher_speed("essiv(cbc(aes),sha256)", in do_test()
2335 test_acipher_speed("essiv(cbc(aes),sha256)", in do_test()
2439 test_hash_speed("sha3-224", sec, generic_hash_speed_template); in do_test()
2443 test_hash_speed("sha3-256", sec, generic_hash_speed_template); in do_test()
2447 test_hash_speed("sha3-384", sec, generic_hash_speed_template); in do_test()
2451 test_hash_speed("sha3-512", sec, generic_hash_speed_template); in do_test()
2546 test_ahash_speed("sha3-224", sec, generic_hash_speed_template); in do_test()
2550 test_ahash_speed("sha3-256", sec, generic_hash_speed_template); in do_test()
2554 test_ahash_speed("sha3-384", sec, generic_hash_speed_template); in do_test()
2558 test_ahash_speed("sha3-512", sec, generic_hash_speed_template); in do_test()
2595 test_acipher_speed("ecb(aes)", ENCRYPT, sec, NULL, 0, in do_test()
2597 test_acipher_speed("ecb(aes)", DECRYPT, sec, NULL, 0, in do_test()
2599 test_acipher_speed("cbc(aes)", ENCRYPT, sec, NULL, 0, in do_test()
2601 test_acipher_speed("cbc(aes)", DECRYPT, sec, NULL, 0, in do_test()
2603 test_acipher_speed("lrw(aes)", ENCRYPT, sec, NULL, 0, in do_test()
2605 test_acipher_speed("lrw(aes)", DECRYPT, sec, NULL, 0, in do_test()
2607 test_acipher_speed("xts(aes)", ENCRYPT, sec, NULL, 0, in do_test()
2609 test_acipher_speed("xts(aes)", DECRYPT, sec, NULL, 0, in do_test()
2611 test_acipher_speed("cts(cbc(aes))", ENCRYPT, sec, NULL, 0, in do_test()
2613 test_acipher_speed("cts(cbc(aes))", DECRYPT, sec, NULL, 0, in do_test()
2615 test_acipher_speed("ctr(aes)", ENCRYPT, sec, NULL, 0, in do_test()
2617 test_acipher_speed("ctr(aes)", DECRYPT, sec, NULL, 0, in do_test()
2619 test_acipher_speed("cfb(aes)", ENCRYPT, sec, NULL, 0, in do_test()
2621 test_acipher_speed("cfb(aes)", DECRYPT, sec, NULL, 0, in do_test()
2623 test_acipher_speed("ofb(aes)", ENCRYPT, sec, NULL, 0, in do_test()
2625 test_acipher_speed("ofb(aes)", DECRYPT, sec, NULL, 0, in do_test()
2627 test_acipher_speed("rfc3686(ctr(aes))", ENCRYPT, sec, NULL, 0, in do_test()
2629 test_acipher_speed("rfc3686(ctr(aes))", DECRYPT, sec, NULL, 0, in do_test()
2807 test_mb_skcipher_speed("ecb(aes)", ENCRYPT, sec, NULL, 0, in do_test()
2809 test_mb_skcipher_speed("ecb(aes)", DECRYPT, sec, NULL, 0, in do_test()
2811 test_mb_skcipher_speed("cbc(aes)", ENCRYPT, sec, NULL, 0, in do_test()
2813 test_mb_skcipher_speed("cbc(aes)", DECRYPT, sec, NULL, 0, in do_test()
2815 test_mb_skcipher_speed("lrw(aes)", ENCRYPT, sec, NULL, 0, in do_test()
2817 test_mb_skcipher_speed("lrw(aes)", DECRYPT, sec, NULL, 0, in do_test()
2819 test_mb_skcipher_speed("xts(aes)", ENCRYPT, sec, NULL, 0, in do_test()
2821 test_mb_skcipher_speed("xts(aes)", DECRYPT, sec, NULL, 0, in do_test()
2823 test_mb_skcipher_speed("cts(cbc(aes))", ENCRYPT, sec, NULL, 0, in do_test()
2825 test_mb_skcipher_speed("cts(cbc(aes))", DECRYPT, sec, NULL, 0, in do_test()
2827 test_mb_skcipher_speed("ctr(aes)", ENCRYPT, sec, NULL, 0, in do_test()
2829 test_mb_skcipher_speed("ctr(aes)", DECRYPT, sec, NULL, 0, in do_test()
2831 test_mb_skcipher_speed("cfb(aes)", ENCRYPT, sec, NULL, 0, in do_test()
2833 test_mb_skcipher_speed("cfb(aes)", DECRYPT, sec, NULL, 0, in do_test()
2835 test_mb_skcipher_speed("ofb(aes)", ENCRYPT, sec, NULL, 0, in do_test()
2837 test_mb_skcipher_speed("ofb(aes)", DECRYPT, sec, NULL, 0, in do_test()
2839 test_mb_skcipher_speed("rfc3686(ctr(aes))", ENCRYPT, sec, NULL, in do_test()
2841 test_mb_skcipher_speed("rfc3686(ctr(aes))", DECRYPT, sec, NULL, in do_test()
3028 int err = -ENOMEM; in tcrypt_mod_init()
3046 /* We intentionaly return -EAGAIN to prevent keeping the module, in tcrypt_mod_init()
3051 * -- mludvig in tcrypt_mod_init()
3054 err = -EAGAIN; in tcrypt_mod_init()