Lines Matching defs:algo
226 esp_schedule(algo, sav)
227 const struct esp_algorithm *algo;
233 if (_KEYBITS(sav->key_enc) < algo->keymin ||
234 _KEYBITS(sav->key_enc) > algo->keymax) {
237 "needs %d to %d bits\n", algo->name, _KEYBITS(sav->key_enc),
238 algo->keymin, algo->keymax));
249 if (!algo->schedule || !algo->schedlen) {
254 sav->schedlen = (*algo->schedlen)(algo);
268 error = (*algo->schedule)(algo, sav);
271 algo->name, error));
295 __unused const struct esp_algorithm *algo,
308 __unused const struct esp_algorithm *algo,
319 const struct esp_algorithm *algo;
332 algo = esp_algorithm_lookup(sav->alg_enc);
333 if (!algo) {
339 if (_KEYBITS(sav->key_enc) < algo->keymin ||
340 _KEYBITS(sav->key_enc) > algo->keymax) {
359 __unused const struct esp_algorithm *algo,
374 __unused const struct esp_algorithm *algo)
382 __unused const struct esp_algorithm *algo,
396 __unused const struct esp_algorithm *algo,
411 __unused const struct esp_algorithm *algo,
429 const struct esp_algorithm *algo;
447 algo = esp_algorithm_lookup(sav->alg_enc);
448 if (!algo) {
450 "esp_cbc_mature %s: unsupported algorithm.\n", algo->name));
455 if (keylen < algo->keymin || algo->keymax < keylen) {
458 algo->name, sav->key_enc->sadb_key_bits));
469 algo->name));
481 algo->name, keylen));
493 __unused const struct esp_algorithm *algo)
501 __unused const struct esp_algorithm *algo,
513 __unused const struct esp_algorithm *algo,
533 __unused const struct esp_algorithm *algo,
553 __unused const struct esp_algorithm *algo)
561 __unused const struct esp_algorithm *algo,
572 __unused const struct esp_algorithm *algo,
587 __unused const struct esp_algorithm *algo,
603 __unused const struct esp_algorithm *algo)
611 __unused const struct esp_algorithm *algo,
632 __unused const struct esp_algorithm *algo,
649 __unused const struct esp_algorithm *algo,
666 const struct esp_algorithm *algo,
670 if (!algo)
672 return algo->ivlenval;
676 esp_cbc_decrypt(m, off, sav, algo, ivlen)
680 const struct esp_algorithm *algo;
699 "unsupported ivlen %d\n", algo->name, ivlen));
705 blocklen = algo->padbound;
710 "unsupported blocklen %d\n", algo->name, blocklen));
754 algo->name, ivlen, blocklen));
761 algo->name, m->m_pkthdr.len, (unsigned long)bodyoff));
768 algo->name, blocklen));
837 (*algo->blockdecrypt)(algo, sav, sp, mtod(d, u_int8_t *) + dn);
880 const struct esp_algorithm *algo,
899 "unsupported ivlen %d\n", algo->name, ivlen));
905 blocklen = algo->padbound;
910 "unsupported blocklen %d\n", algo->name, blocklen));
960 algo->name, ivlen, blocklen));
967 algo->name, m->m_pkthdr.len, (unsigned long)bodyoff));
974 algo->name, (unsigned long)algo->padbound));
1049 (*algo->blockencrypt)(algo, sav, sp, mtod(d, u_int8_t *) + dn);
1093 const struct ah_algorithm *algo;
1123 algo = ah_algorithm_lookup(sav->alg_auth);
1124 if (!algo) {
1135 siz = (((*algo->sumsiz)(sav) + 3) & ~(4 - 1));
1158 error = (*algo->init)(&s, sav);
1168 (*algo->update)(&s, mtod(m, u_char *) + off,
1174 (*algo->update)(&s, mtod(m, u_char *) + off, length);
1178 (*algo->result)(&s, sumbuf);