• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/ap/gpl/timemachine/libgcrypt-1.5.0/tests/

Lines Matching refs:algo

124     int algo;
155 if (gcry_cipher_test_algo (tv[i].algo) && in_fips_mode)
159 tv[i].algo);
164 tv[i].algo,
168 fail ("cbc-mac algo %d, gcry_cipher_open failed: %s\n",
169 tv[i].algo, gpg_strerror (err));
173 blklen = gcry_cipher_get_algo_blklen(tv[i].algo);
176 fail ("cbc-mac algo %d, gcry_cipher_get_algo_blklen failed\n",
177 tv[i].algo);
182 keylen = gcry_cipher_get_algo_keylen (tv[i].algo);
185 fail ("cbc-mac algo %d, gcry_cipher_get_algo_keylen failed\n",
186 tv[i].algo);
193 fail ("cbc-mac algo %d, gcry_cipher_setkey failed: %s\n",
194 tv[i].algo, gpg_strerror (err));
202 fail ("cbc-mac algo %d, gcry_cipher_setiv failed: %s\n",
203 tv[i].algo, gpg_strerror (err));
210 gcry_cipher_algo_name (tv[i].algo),
211 tv[i].algo);
220 fail ("cbc-mac algo %d, gcry_cipher_encrypt failed: %s\n",
221 tv[i].algo, gpg_strerror (err));
229 for (j = 0; j < gcry_cipher_get_algo_blklen (tv[i].algo); j++)
236 fail ("cbc-mac algo %d, encrypt mismatch entry %d\n", tv[i].algo, i);
363 int algo;
562 if (!tv[i].algo)
565 err = gcry_cipher_open (&hde, tv[i].algo, GCRY_CIPHER_MODE_CTR, 0);
567 err = gcry_cipher_open (&hdd, tv[i].algo, GCRY_CIPHER_MODE_CTR, 0);
574 keylen = gcry_cipher_get_algo_keylen(tv[i].algo);
593 blklen = gcry_cipher_get_algo_blklen(tv[i].algo);
614 gcry_cipher_algo_name (tv[i].algo),
615 tv[i].algo);
719 int algo;
798 gcry_cipher_algo_name (tv[i].algo),
799 tv[i].algo);
800 err = gcry_cipher_open (&hde, tv[i].algo, GCRY_CIPHER_MODE_CFB, 0);
802 err = gcry_cipher_open (&hdd, tv[i].algo, GCRY_CIPHER_MODE_CFB, 0);
809 keylen = gcry_cipher_get_algo_keylen(tv[i].algo);
828 blklen = gcry_cipher_get_algo_blklen(tv[i].algo);
890 int algo;
969 gcry_cipher_algo_name (tv[i].algo),
970 tv[i].algo);
971 err = gcry_cipher_open (&hde, tv[i].algo, GCRY_CIPHER_MODE_OFB, 0);
973 err = gcry_cipher_open (&hdd, tv[i].algo, GCRY_CIPHER_MODE_OFB, 0);
980 keylen = gcry_cipher_get_algo_keylen(tv[i].algo);
999 blklen = gcry_cipher_get_algo_blklen(tv[i].algo);
1127 int algo;
1264 gcry_cipher_algo_name (tv[i].algo),
1265 tv[i].algo, tv[i].mode);
1266 err = gcry_cipher_open (&hde, tv[i].algo, tv[i].mode, 0);
1268 err = gcry_cipher_open (&hdd, tv[i].algo, tv[i].mode, 0);
1275 keylen = gcry_cipher_get_algo_keylen(tv[i].algo);
1291 blklen = gcry_cipher_get_algo_blklen(tv[i].algo);
1314 fail ("gcry_cipher_encrypt (algo %d, mode %d) failed: %s\n",
1315 tv[i].algo, tv[i].mode, gpg_strerror (err));
1329 fail ("encrypt mismatch (algo %d, mode %d)\n",
1330 tv[i].algo, tv[i].mode);
1335 fail ("gcry_cipher_decrypt (algo %d, mode %d) failed: %s\n",
1336 tv[i].algo, tv[i].mode, gpg_strerror (err));
1341 fail ("decrypt mismatch (algo %d, mode %d)\n",
1342 tv[i].algo, tv[i].mode);
1360 check_one_cipher (int algo, int mode, int flags)
1371 keylen = gcry_cipher_get_algo_keylen (algo);
1374 fail ("algo %d, mode %d, gcry_cipher_get_algo_keylen failed\n",
1375 algo, mode);
1381 fail ("algo %d, mode %d, keylength problem (%d)\n", algo, mode, keylen);
1385 err = gcry_cipher_open (&hd, algo, mode, flags);
1388 fail ("algo %d, mode %d, gcry_cipher_open failed: %s\n",
1389 algo, mode, gpg_strerror (err));
1396 fail ("algo %d, mode %d, gcry_cipher_setkey failed: %s\n",
1397 algo, mode, gpg_strerror (err));
1405 fail ("algo %d, mode %d, gcry_cipher_encrypt failed: %s\n",
1406 algo, mode, gpg_strerror (err));
1416 fail ("algo %d, mode %d, gcry_cipher_decrypt failed: %s\n",
1417 algo, mode, gpg_strerror (err));
1423 fail ("algo %d, mode %d, encrypt-decrypt mismatch\n", algo, mode);
1432 fail ("algo %d, mode %d, in-place, gcry_cipher_encrypt failed: %s\n",
1433 algo, mode, gpg_strerror (err));
1443 fail ("algo %d, mode %d, in-place, gcry_cipher_decrypt failed: %s\n",
1444 algo, mode, gpg_strerror (err));
1450 fail ("algo %d, mode %d, in-place, encrypt-decrypt mismatch\n",algo, mode);
1572 check_one_md (int algo, const char *data, int len, const char *expect)
1580 err = gcry_md_open (&hd, algo, 0);
1583 fail ("algo %d, gcry_md_open failed: %s\n", algo, gpg_strerror (err));
1587 mdlen = gcry_md_get_algo_dlen (algo);
1590 fail ("algo %d, gcry_md_get_algo_dlen failed: %d\n", algo, mdlen);
1609 fail ("algo %d, gcry_md_copy failed: %s\n", algo, gpg_strerror (err));
1614 p = gcry_md_read (hd2, algo);
1626 fail ("algo %d, digest mismatch\n", algo);
1892 check_one_hmac (int algo, const char *data, int datalen,
1901 err = gcry_md_open (&hd, algo, GCRY_MD_FLAG_HMAC);
1904 fail ("algo %d, gcry_md_open failed: %s\n", algo, gpg_strerror (err));
1908 mdlen = gcry_md_get_algo_dlen (algo);
1911 fail ("algo %d, gcry_md_get_algo_dlen failed: %d\n", algo, mdlen);
1922 fail ("algo %d, gcry_md_copy failed: %s\n", algo, gpg_strerror (err));
1927 p = gcry_md_read (hd2, algo);
1929 fail("algo %d, hmac gcry_md_read failed\n", algo);
1941 fail ("algo %d, digest mismatch\n", algo);
2284 check_pubkey_sign (int n, gcry_sexp_t skey, gcry_sexp_t pkey, int algo)
2295 int algo;
2359 if (datas[dataidx].algo && datas[dataidx].algo != algo)
2387 check_pubkey_crypt (int n, gcry_sexp_t skey, gcry_sexp_t pkey, int algo)
2394 int algo; /* If not 0 run test only if ALGO matches. */
2424 "(data\n (flags oaep)\n (hash-algo sha1)\n"
2426 "(flags oaep)(hash-algo sha1)",
2431 "(data\n (flags oaep)\n (hash-algo sha1)\n (label \"test\")\n"
2433 "(flags oaep)(hash-algo sha1)(label \"test\")",
2438 "(data\n (flags oaep)\n (hash-algo sha1)\n (label \"test\")\n"
2441 "(flags oaep)(hash-algo sha1)(label \"test\")",
2504 if (datas[dataidx].algo && datas[dataidx].algo != algo)
2508 fprintf (stderr, " encryption/decryption test %d (algo %d)\n",
2509 dataidx, algo);
2593 gcry_sexp_t skey, gcry_sexp_t pkey, int algo)
2597 (void)algo;
2611 const unsigned char *grip, int algo, int flags)
2614 check_pubkey_sign (n, skey, pkey, algo);
2616 check_pubkey_crypt (n, skey, pkey, algo);
2618 check_pubkey_grip (n, grip, skey, pkey, algo);