Lines Matching refs:ret

132 static inline int do_one_aead_op(struct aead_request *req, int ret)
136 return crypto_wait_req(ret, wait);
180 int ret = 0;
189 ret = do_mult_aead_op(data, enc, num_mb, rc);
190 if (ret)
199 return ret;
206 int ret = 0;
216 ret = do_mult_aead_op(data, enc, num_mb, rc);
217 if (ret)
226 ret = do_mult_aead_op(data, enc, num_mb, rc);
229 if (ret)
240 return ret;
256 int ret;
284 ret = crypto_aead_setauthsize(tfm, authsize);
285 if (ret) {
287 ret);
362 ret = crypto_aead_setkey(tfm, key, *keysize);
363 if (ret) {
397 ret = crypto_aead_encrypt(cur->req);
398 ret = do_one_aead_op(cur->req, ret);
400 if (ret) {
402 ret);
415 ret = test_mb_aead_jiffies(data, enc, bs,
419 ret = test_mb_aead_cycles(data, enc, bs,
423 if (ret) {
424 pr_err("%s() failed return code=%d\n", e, ret);
458 int ret;
463 ret = do_one_aead_op(req, crypto_aead_encrypt(req));
465 ret = do_one_aead_op(req, crypto_aead_decrypt(req));
467 if (ret)
468 return ret;
479 int ret = 0;
485 ret = do_one_aead_op(req, crypto_aead_encrypt(req));
487 ret = do_one_aead_op(req, crypto_aead_decrypt(req));
489 if (ret)
499 ret = do_one_aead_op(req, crypto_aead_encrypt(req));
501 ret = do_one_aead_op(req, crypto_aead_decrypt(req));
504 if (ret)
511 if (ret == 0)
515 return ret;
525 int ret = -ENOMEM;
573 ret = crypto_aead_setauthsize(tfm, authsize);
574 if (ret) {
576 ret);
618 ret = crypto_aead_setkey(tfm, key, *keysize);
619 if (ret) {
621 crypto_aead_get_flags(tfm), ret);
653 ret = do_one_aead_op(req,
656 if (ret) {
658 ret);
668 ret = test_aead_jiffies(req, enc, bs,
672 ret = test_aead_cycles(req, enc, bs);
675 if (ret) {
676 pr_err("%s() failed return code=%d\n", e, ret);
712 static inline int do_one_ahash_op(struct ahash_request *req, int ret)
716 return crypto_wait_req(ret, wait);
724 int ret;
728 ret = do_one_ahash_op(req, crypto_ahash_digest(req));
729 if (ret)
730 return ret;
744 int ret;
751 ret = do_one_ahash_op(req, crypto_ahash_init(req));
752 if (ret)
753 return ret;
755 ret = do_one_ahash_op(req, crypto_ahash_update(req));
756 if (ret)
757 return ret;
760 ret = do_one_ahash_op(req, crypto_ahash_final(req));
761 if (ret)
762 return ret;
775 int ret, i;
779 ret = do_one_ahash_op(req, crypto_ahash_digest(req));
780 if (ret)
790 ret = do_one_ahash_op(req, crypto_ahash_digest(req));
791 if (ret)
800 if (ret)
801 return ret;
813 int i, pcount, ret;
820 ret = do_one_ahash_op(req, crypto_ahash_init(req));
821 if (ret)
824 ret = do_one_ahash_op(req, crypto_ahash_update(req));
825 if (ret)
828 ret = do_one_ahash_op(req, crypto_ahash_final(req));
829 if (ret)
839 ret = do_one_ahash_op(req, crypto_ahash_init(req));
840 if (ret)
843 ret = do_one_ahash_op(req, crypto_ahash_update(req));
844 if (ret)
847 ret = do_one_ahash_op(req, crypto_ahash_final(req));
848 if (ret)
857 if (ret)
858 return ret;
874 int i, ret;
924 ret = test_ahash_jiffies(req, speed[i].blen,
928 ret = test_ahash_cycles(req, speed[i].blen,
932 if (ret) {
933 pr_err("hashing failed ret=%d\n", ret);
997 int ret = 0;
1006 ret = do_mult_acipher_op(data, enc, num_mb, rc);
1007 if (ret)
1016 return ret;
1023 int ret = 0;
1033 ret = do_mult_acipher_op(data, enc, num_mb, rc);
1034 if (ret)
1043 ret = do_mult_acipher_op(data, enc, num_mb, rc);
1046 if (ret)
1057 return ret;
1071 int ret;
1145 ret = crypto_skcipher_setkey(tfm, key, *keysize);
1146 if (ret) {
1182 ret = test_mb_acipher_jiffies(data, enc,
1187 ret = test_mb_acipher_cycles(data, enc,
1191 if (ret) {
1214 static inline int do_one_acipher_op(struct skcipher_request *req, int ret)
1218 return crypto_wait_req(ret, wait);
1226 int ret;
1231 ret = do_one_acipher_op(req,
1234 ret = do_one_acipher_op(req,
1237 if (ret)
1238 return ret;
1250 int ret = 0;
1256 ret = do_one_acipher_op(req,
1259 ret = do_one_acipher_op(req,
1262 if (ret)
1272 ret = do_one_acipher_op(req,
1275 ret = do_one_acipher_op(req,
1279 if (ret)
1286 if (ret == 0)
1290 return ret;
1297 unsigned int ret, i, j, k, iv_len;
1364 ret = crypto_skcipher_setkey(tfm, key, *keysize);
1365 if (ret) {
1398 ret = test_acipher_jiffies(req, enc,
1402 ret = test_acipher_cycles(req, enc,
1406 if (ret) {
1441 int ret;
1445 ret = alg_test(alg, alg, 0, 0);
1447 if (fips_enabled && (ret == -EINVAL || ret == -ECANCELED))
1448 ret = 0;
1449 return ret;
1455 int ret = 0;
1462 ret = -ENOENT;
1467 ret = min(ret, do_test(NULL, 0, 0, i, num_mb));
1471 ret = min(ret, tcrypt_test("md5"));
1475 ret = min(ret, tcrypt_test("sha1"));
1479 ret = min(ret, tcrypt_test("ecb(des)"));
1480 ret = min(ret, tcrypt_test("cbc(des)"));
1481 ret = min(ret, tcrypt_test("ctr(des)"));
1485 ret = min(ret, tcrypt_test("ecb(des3_ede)"));
1486 ret = min(ret, tcrypt_test("cbc(des3_ede)"));
1487 ret = min(ret, tcrypt_test("ctr(des3_ede)"));
1491 ret = min(ret, tcrypt_test("md4"));
1495 ret = min(ret, tcrypt_test("sha256"));
1499 ret = min(ret, tcrypt_test("ecb(blowfish)"));
1500 ret = min(ret, tcrypt_test("cbc(blowfish)"));
1501 ret = min(ret, tcrypt_test("ctr(blowfish)"));
1505 ret = min(ret, tcrypt_test("ecb(twofish)"));
1506 ret = min(ret, tcrypt_test("cbc(twofish)"));
1507 ret = min(ret, tcrypt_test("ctr(twofish)"));
1508 ret = min(ret, tcrypt_test("lrw(twofish)"));
1509 ret = min(ret, tcrypt_test("xts(twofish)"));
1513 ret = min(ret, tcrypt_test("ecb(serpent)"));
1514 ret = min(ret, tcrypt_test("cbc(serpent)"));
1515 ret = min(ret, tcrypt_test("ctr(serpent)"));
1516 ret = min(ret, tcrypt_test("lrw(serpent)"));
1517 ret = min(ret, tcrypt_test("xts(serpent)"));
1521 ret = min(ret, tcrypt_test("ecb(aes)"));
1522 ret = min(ret, tcrypt_test("cbc(aes)"));
1523 ret = min(ret, tcrypt_test("lrw(aes)"));
1524 ret = min(ret, tcrypt_test("xts(aes)"));
1525 ret = min(ret, tcrypt_test("ctr(aes)"));
1526 ret = min(ret, tcrypt_test("rfc3686(ctr(aes))"));
1527 ret = min(ret, tcrypt_test("ofb(aes)"));
1528 ret = min(ret, tcrypt_test("cfb(aes)"));
1529 ret = min(ret, tcrypt_test("xctr(aes)"));
1533 ret = min(ret, tcrypt_test("sha384"));
1537 ret = min(ret, tcrypt_test("sha512"));
1541 ret = min(ret, tcrypt_test("deflate"));
1545 ret = min(ret, tcrypt_test("ecb(cast5)"));
1546 ret = min(ret, tcrypt_test("cbc(cast5)"));
1547 ret = min(ret, tcrypt_test("ctr(cast5)"));
1551 ret = min(ret, tcrypt_test("ecb(cast6)"));
1552 ret = min(ret, tcrypt_test("cbc(cast6)"));
1553 ret = min(ret, tcrypt_test("ctr(cast6)"));
1554 ret = min(ret, tcrypt_test("lrw(cast6)"));
1555 ret = min(ret, tcrypt_test("xts(cast6)"));
1559 ret = min(ret, tcrypt_test("ecb(arc4)"));
1563 ret = min(ret, tcrypt_test("michael_mic"));
1567 ret = min(ret, tcrypt_test("crc32c"));
1571 ret = min(ret, tcrypt_test("ecb(tea)"));
1575 ret = min(ret, tcrypt_test("ecb(xtea)"));
1579 ret = min(ret, tcrypt_test("ecb(khazad)"));
1583 ret = min(ret, tcrypt_test("wp512"));
1587 ret = min(ret, tcrypt_test("wp384"));
1591 ret = min(ret, tcrypt_test("wp256"));
1595 ret = min(ret, tcrypt_test("ecb(anubis)"));
1596 ret = min(ret, tcrypt_test("cbc(anubis)"));
1600 ret = min(ret, tcrypt_test("ecb(xeta)"));
1604 ret = min(ret, tcrypt_test("pcbc(fcrypt)"));
1608 ret = min(ret, tcrypt_test("ecb(camellia)"));
1609 ret = min(ret, tcrypt_test("cbc(camellia)"));
1610 ret = min(ret, tcrypt_test("ctr(camellia)"));
1611 ret = min(ret, tcrypt_test("lrw(camellia)"));
1612 ret = min(ret, tcrypt_test("xts(camellia)"));
1616 ret = min(ret, tcrypt_test("sha224"));
1620 ret = min(ret, tcrypt_test("gcm(aes)"));
1624 ret = min(ret, tcrypt_test("lzo"));
1628 ret = min(ret, tcrypt_test("ccm(aes)"));
1632 ret = min(ret, tcrypt_test("cts(cbc(aes))"));
1636 ret = min(ret, tcrypt_test("xxhash64"));
1640 ret = min(ret, tcrypt_test("rmd160"));
1644 ret = min(ret, tcrypt_test("blake2b-512"));
1648 ret = min(ret, tcrypt_test("ecb(seed)"));
1652 ret = min(ret, tcrypt_test("rfc4309(ccm(aes))"));
1656 ret = min(ret, tcrypt_test("ghash"));
1660 ret = min(ret, tcrypt_test("crct10dif"));
1664 ret = min(ret, tcrypt_test("sha3-224"));
1668 ret = min(ret, tcrypt_test("sha3-256"));
1672 ret = min(ret, tcrypt_test("sha3-384"));
1676 ret = min(ret, tcrypt_test("sha3-512"));
1680 ret = min(ret, tcrypt_test("sm3"));
1684 ret = min(ret, tcrypt_test("streebog256"));
1688 ret = min(ret, tcrypt_test("streebog512"));
1692 ret = min(ret, tcrypt_test("gcm(sm4)"));
1696 ret = min(ret, tcrypt_test("ccm(sm4)"));
1700 ret = min(ret, tcrypt_test("polyval"));
1704 ret = min(ret, tcrypt_test("gcm(aria)"));
1708 ret = min(ret, tcrypt_test("cts(cbc(sm4))"));
1712 ret = min(ret, tcrypt_test("hmac(md5)"));
1716 ret = min(ret, tcrypt_test("hmac(sha1)"));
1720 ret = min(ret, tcrypt_test("hmac(sha256)"));
1724 ret = min(ret, tcrypt_test("hmac(sha384)"));
1728 ret = min(ret, tcrypt_test("hmac(sha512)"));
1732 ret = min(ret, tcrypt_test("hmac(sha224)"));
1736 ret = min(ret, tcrypt_test("xcbc(aes)"));
1740 ret = min(ret, tcrypt_test("hmac(rmd160)"));
1744 ret = min(ret, tcrypt_test("vmac64(aes)"));
1748 ret = min(ret, tcrypt_test("hmac(sha3-224)"));
1752 ret = min(ret, tcrypt_test("hmac(sha3-256)"));
1756 ret = min(ret, tcrypt_test("hmac(sha3-384)"));
1760 ret = min(ret, tcrypt_test("hmac(sha3-512)"));
1764 ret = min(ret, tcrypt_test("hmac(streebog256)"));
1768 ret = min(ret, tcrypt_test("hmac(streebog512)"));
1772 ret = min(ret, tcrypt_test("ansi_cprng"));
1776 ret = min(ret, tcrypt_test("rfc4106(gcm(aes))"));
1780 ret = min(ret, tcrypt_test("rfc4543(gcm(aes))"));
1784 ret = min(ret, tcrypt_test("cmac(aes)"));
1788 ret = min(ret, tcrypt_test("cmac(des3_ede)"));
1792 ret = min(ret, tcrypt_test("authenc(hmac(sha1),cbc(aes))"));
1796 ret = min(ret, tcrypt_test("authenc(hmac(md5),ecb(cipher_null))"));
1800 ret = min(ret, tcrypt_test("authenc(hmac(sha1),ecb(cipher_null))"));
1804 ret = min(ret, tcrypt_test("cbcmac(sm4)"));
1808 ret = min(ret, tcrypt_test("cmac(sm4)"));
1812 ret = min(ret, tcrypt_test("xcbc(sm4)"));
1816 ret = min(ret, tcrypt_test("authenc(hmac(sha1),cbc(des))"));
1819 ret = min(ret, tcrypt_test("authenc(hmac(sha1),cbc(des3_ede))"));
1822 ret = min(ret, tcrypt_test("authenc(hmac(sha224),cbc(des))"));
1825 ret = min(ret, tcrypt_test("authenc(hmac(sha224),cbc(des3_ede))"));
1828 ret = min(ret, tcrypt_test("authenc(hmac(sha256),cbc(des))"));
1831 ret = min(ret, tcrypt_test("authenc(hmac(sha256),cbc(des3_ede))"));
1834 ret = min(ret, tcrypt_test("authenc(hmac(sha384),cbc(des))"));
1837 ret = min(ret, tcrypt_test("authenc(hmac(sha384),cbc(des3_ede))"));
1840 ret = min(ret, tcrypt_test("authenc(hmac(sha512),cbc(des))"));
1843 ret = min(ret, tcrypt_test("authenc(hmac(sha512),cbc(des3_ede))"));
1846 ret = min(ret, tcrypt_test("ecb(sm4)"));
1847 ret = min(ret, tcrypt_test("cbc(sm4)"));
1848 ret = min(ret, tcrypt_test("cfb(sm4)"));
1849 ret = min(ret, tcrypt_test("ctr(sm4)"));
1850 ret = min(ret, tcrypt_test("xts(sm4)"));
1853 ret = min(ret, tcrypt_test("ecb(aria)"));
1854 ret = min(ret, tcrypt_test("cbc(aria)"));
1855 ret = min(ret, tcrypt_test("cfb(aria)"));
1856 ret = min(ret, tcrypt_test("ctr(aria)"));
2885 return ret;