Lines Matching refs:alg
113 struct alg {
162 static struct alg*
173 static struct alg*
246 runtest(struct alg *alg, int count, int size, u_long cmd, struct timeval *tv)
256 if (!alg->ishash) {
257 sop.keylen = (alg->minkeylen + alg->maxkeylen)/2;
263 sop.cipher = alg->code;
265 sop.mackeylen = (alg->minkeylen + alg->maxkeylen)/2;
271 sop.mac = alg->code;
278 printf("cipher %s", alg->name);
279 if (alg->ishash)
289 alg->name, sop.keylen, sop.mackeylen);
308 if (!alg->ishash) {
317 if (!alg->ishash) {
428 runtests(struct alg *alg, int count, int size, u_long cmd, int threads, int profile)
437 if (size % alg->blocksize) {
441 size, alg->name, alg->blocksize);
467 runtest(alg, count, size, cmd, &tvp[i]);
473 runtest(alg, count, size, cmd, tvp);
479 int nops = alg->ishash ? count : 2*count;
484 t, nops, alg->name, size, (double)nops*size / t,
489 t, nops, alg->name, size, (double)nops*size / t,
517 struct alg *alg = NULL;
537 alg = getalgbyname(optarg);
538 if (alg == NULL) {
540 alg = getalgbyname("aes");
580 if (alg)
581 sizes[nsizes++] = alg->blocksize;
595 alg = &algorithms[i];
597 runtests(alg, count, sizes[j], cmd, maxthreads, profile);
600 if (alg == NULL)
601 alg = getalgbycode(CRYPTO_3DES_CBC);
603 runtests(alg, count, sizes[i], cmd, maxthreads, profile);