| /xnu-12377.61.12/bsd/netinet6/ |
| H A D | esp_core.c | 360 esp_schedule(const struct esp_algorithm *algo, struct secasvar *sav) in esp_schedule() argument 367 if (_KEYBITS(sav->key_enc) < algo->keymin || in esp_schedule() 368 _KEYBITS(sav->key_enc) > algo->keymax) { in esp_schedule() 371 "needs %d to %d bits\n", algo->name, _KEYBITS(sav->key_enc), in esp_schedule() 372 algo->keymin, algo->keymax)); in esp_schedule() 389 algo->name)); in esp_schedule() 395 if (!algo->schedule || !algo->schedlen) { in esp_schedule() 400 schedlen = (*algo->schedlen)(algo); in esp_schedule() 416 error = (*algo->schedule)(algo, sav); in esp_schedule() 419 algo->name, error)); in esp_schedule() [all …]
|
| H A D | ah_core.c | 204 const struct ah_algorithm *algo, in ah_schedule() argument 219 if (algo->schedule == NULL || algo->schedlen == NULL) { in ah_schedule() 224 schedlen = (*algo->schedlen)(algo); in ah_schedule() 239 error = (*algo->schedule)(algo, sav); in ah_schedule() 242 algo->name, error)); in ah_schedule() 253 const struct ah_algorithm *algo; in ah_hmac_mature() local 260 algo = ah_algorithm_lookup(sav->alg_auth); in ah_hmac_mature() 261 if (__improbable(algo == NULL)) { in ah_hmac_mature() 266 if (sav->key_auth->sadb_key_bits < algo->keymin in ah_hmac_mature() 267 || algo->keymax < sav->key_auth->sadb_key_bits) { in ah_hmac_mature() [all …]
|
| H A D | ah_output.c | 129 const struct ah_algorithm *algo; in ah_hdrsiz() 142 algo = ah_algorithm_lookup(isr->sav->alg_auth); in ah_hdrsiz() 143 if (!algo) { in ah_hdrsiz() 154 hdrsiz = (((*algo->sumsiz)(isr->sav) + 3) & ~(4 - 1)); in ah_hdrsiz() 187 const struct ah_algorithm *algo; in ah4_output() local 212 algo = ah_algorithm_lookup(sav->alg_auth); in ah4_output() 213 if (!algo) { in ah4_output() 227 plen = ((*algo->sumsiz)(sav) + 3) & ~(4 - 1); /*XXX pad to 8byte?*/ in ah4_output() 231 plen = ((*algo->sumsiz)(sav) + 3) & ~(4 - 1); /*XXX pad to 8byte?*/ in ah4_output() 349 error = ah4_calccksum(m, (caddr_t)ahsumpos, plen, algo, sav); in ah4_output() [all …]
|
| H A D | esp_chachapoly.c | 75 const struct esp_algorithm *algo; in esp_chachapoly_mature() local 102 algo = esp_algorithm_lookup(sav->alg_enc); in esp_chachapoly_mature() 103 if (algo == NULL) { in esp_chachapoly_mature() 125 esp_chachapoly_schedlen(__unused const struct esp_algorithm *algo) in esp_chachapoly_schedlen() argument 131 esp_chachapoly_schedule(__unused const struct esp_algorithm *algo, in esp_chachapoly_schedule() argument 176 esp_chachapoly_ivlen(const struct esp_algorithm *algo, in esp_chachapoly_ivlen() argument 179 ESP_CHECK_ARG(algo); in esp_chachapoly_ivlen() 186 return algo->ivlenval; in esp_chachapoly_ivlen() 248 __unused const struct esp_algorithm *algo, in esp_chachapoly_encrypt() argument 393 __unused const struct esp_algorithm *algo, in esp_chachapoly_decrypt() argument
|
| H A D | esp_output.c | 139 const struct esp_algorithm *algo; in esp_hdrsiz() 162 algo = esp_algorithm_lookup(sav->alg_enc); in esp_hdrsiz() 163 if (!algo) { in esp_hdrsiz() 171 if (algo->padbound) { in esp_hdrsiz() 172 maxpad = algo->padbound; in esp_hdrsiz() 250 const struct esp_algorithm *algo; in esp_output() local 338 algo = esp_algorithm_lookup(sav->alg_enc); in esp_output() 339 if (!algo) { in esp_output() 608 if (algo->padbound) { in esp_output() 609 padbound = algo->padbound; in esp_output() [all …]
|
| H A D | esp_rijndael.c | 98 __unused const struct esp_algorithm *algo) in esp_aes_schedlen() argument 105 __unused const struct esp_algorithm *algo, in esp_aes_schedule() argument 151 const struct esp_algorithm *algo, in esp_cbc_decrypt_aes() argument 169 "unsupported ivlen %d\n", algo->name, ivlen)); in esp_cbc_decrypt_aes() 185 algo->name, m->m_pkthdr.len, (u_int32_t)bodyoff)); in esp_cbc_decrypt_aes() 192 algo->name, AES_BLOCKLEN)); in esp_cbc_decrypt_aes() 367 const struct esp_algorithm *algo, in esp_cbc_encrypt_aes() argument 385 "unsupported ivlen %d\n", algo->name, ivlen)); in esp_cbc_encrypt_aes() 407 algo->name, m->m_pkthdr.len, (u_int32_t)bodyoff)); in esp_cbc_encrypt_aes() 414 algo->name, AES_BLOCKLEN)); in esp_cbc_encrypt_aes() [all …]
|
| H A D | esp_input.c | 229 const struct esp_algorithm *algo; in esp4_input_extended() local 300 algo = esp_algorithm_lookup(sav->alg_enc); in esp4_input_extended() 301 if (!algo) { in esp4_input_extended() 326 ((sav->alg_auth && sav->key_auth) || algo->finalizedecrypt))) { in esp4_input_extended() 331 !algo->finalizedecrypt) { in esp4_input_extended() 352 if (algo->finalizedecrypt) { in esp4_input_extended() 353 siz = algo->icvlen; in esp4_input_extended() 465 if (esp_schedule(algo, sav) != 0) { in esp4_input_extended() 473 if (!algo->decrypt) { in esp4_input_extended() 477 if ((*algo->decrypt)(m, off, sav, algo, ivlen)) { in esp4_input_extended() [all …]
|
| H A D | ah_input.c | 128 const struct ah_algorithm *algo; in ah4_input() local 185 algo = ah_algorithm_lookup(sav->alg_auth); in ah4_input() 186 if (!algo) { in ah4_input() 194 siz = (*algo->sumsiz)(sav); in ah4_input() 300 if (ah4_calccksum(m, (caddr_t)cksum, siz1, algo, sav)) { in ah4_input() 598 const struct ah_algorithm *algo = NULL; in ah6_input() local 648 algo = ah_algorithm_lookup(sav->alg_auth); in ah6_input() 649 if (!algo) { in ah6_input() 657 siz = (*algo->sumsiz)(sav); in ah6_input() 723 if (ah6_calccksum(m, (caddr_t)cksum, siz1, algo, sav)) { in ah6_input()
|
| /xnu-12377.61.12/bsd/netkey/ |
| H A D | key.c | 4301 const struct esp_algorithm *algo; in key_setsaval() local 4473 algo = esp_algorithm_lookup(sav->alg_enc); in key_setsaval() 4474 if (algo && algo->ivlen) { in key_setsaval() 4475 ivlen = (*algo->ivlen)(algo, sav); in key_setsaval() 4651 const struct ah_algorithm *algo; in key_mature() local 4654 algo = ah_algorithm_lookup(sav->alg_auth); in key_mature() 4655 if (!algo) { in key_mature() 4667 if (keylen < algo->keymin || algo->keymax < keylen) { in key_mature() 4671 keylen, algo->keymin, algo->keymax)); in key_mature() 4675 if (algo->mature) { in key_mature() [all …]
|