| /xnu-10063.141.1/bsd/netinet6/ |
| H A D | esp_core.c | 338 esp_schedule(const struct esp_algorithm *algo, struct secasvar *sav) in esp_schedule() argument 343 if (_KEYBITS(sav->key_enc) < algo->keymin || in esp_schedule() 344 _KEYBITS(sav->key_enc) > algo->keymax) { in esp_schedule() 347 "needs %d to %d bits\n", algo->name, _KEYBITS(sav->key_enc), in esp_schedule() 348 algo->keymin, algo->keymax)); in esp_schedule() 365 algo->name)); in esp_schedule() 371 if (!algo->schedule || !algo->schedlen) { in esp_schedule() 376 sav->schedlen_enc = (*algo->schedlen)(algo); in esp_schedule() 390 error = (*algo->schedule)(algo, sav); in esp_schedule() 393 algo->name, error)); in esp_schedule() [all …]
|
| H A D | ah_core.c | 225 const struct ah_algorithm *algo, in ah_schedule() argument 240 if (algo->schedule == NULL || algo->schedlen == NULL) { in ah_schedule() 245 schedlen = (*algo->schedlen)(algo); in ah_schedule() 260 error = (*algo->schedule)(algo, sav); in ah_schedule() 263 algo->name, error)); in ah_schedule() 375 const struct ah_algorithm *algo; in ah_keyed_sha1_mature() local 382 algo = ah_algorithm_lookup(sav->alg_auth); in ah_keyed_sha1_mature() 383 if (!algo) { in ah_keyed_sha1_mature() 388 if (sav->key_auth->sadb_key_bits < algo->keymin in ah_keyed_sha1_mature() 389 || algo->keymax < sav->key_auth->sadb_key_bits) { in ah_keyed_sha1_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 168 "unsupported ivlen %d\n", algo->name, ivlen)); in esp_cbc_decrypt_aes() 184 algo->name, m->m_pkthdr.len, (u_int32_t)bodyoff)); in esp_cbc_decrypt_aes() 191 algo->name, AES_BLOCKLEN)); in esp_cbc_decrypt_aes() 366 const struct esp_algorithm *algo, in esp_cbc_encrypt_aes() argument 383 "unsupported ivlen %d\n", algo->name, ivlen)); in esp_cbc_encrypt_aes() 405 algo->name, m->m_pkthdr.len, (u_int32_t)bodyoff)); in esp_cbc_encrypt_aes() 412 algo->name, AES_BLOCKLEN)); in esp_cbc_encrypt_aes() [all …]
|
| H A D | esp_input.c | 227 const struct esp_algorithm *algo; in esp4_input_extended() local 297 algo = esp_algorithm_lookup(sav->alg_enc); in esp4_input_extended() 298 if (!algo) { in esp4_input_extended() 323 ((sav->alg_auth && sav->key_auth) || algo->finalizedecrypt))) { in esp4_input_extended() 328 !algo->finalizedecrypt) { in esp4_input_extended() 349 if (algo->finalizedecrypt) { in esp4_input_extended() 350 siz = algo->icvlen; in esp4_input_extended() 462 if (esp_schedule(algo, sav) != 0) { in esp4_input_extended() 470 if (!algo->decrypt) { in esp4_input_extended() 474 if ((*algo->decrypt)(m, off, sav, algo, ivlen)) { in esp4_input_extended() [all …]
|
| H A D | ah_input.c | 126 const struct ah_algorithm *algo; in ah4_input() local 182 algo = ah_algorithm_lookup(sav->alg_auth); in ah4_input() 183 if (!algo) { in ah4_input() 191 siz = (*algo->sumsiz)(sav); in ah4_input() 297 if (ah4_calccksum(m, (caddr_t)cksum, siz1, algo, sav)) { in ah4_input() 593 const struct ah_algorithm *algo = NULL; in ah6_input() local 641 algo = ah_algorithm_lookup(sav->alg_auth); in ah6_input() 642 if (!algo) { in ah6_input() 650 siz = (*algo->sumsiz)(sav); in ah6_input() 716 if (ah6_calccksum(m, (caddr_t)cksum, siz1, algo, sav)) { in ah6_input()
|
| /xnu-10063.141.1/bsd/netkey/ |
| H A D | key.c | 4392 const struct esp_algorithm *algo; in key_setsaval() local 4553 algo = esp_algorithm_lookup(sav->alg_enc); in key_setsaval() 4554 if (algo && algo->ivlen) { in key_setsaval() 4555 sav->ivlen = (*algo->ivlen)(algo, sav); in key_setsaval() 4728 const struct ah_algorithm *algo; in key_mature() local 4731 algo = ah_algorithm_lookup(sav->alg_auth); in key_mature() 4732 if (!algo) { in key_mature() 4744 if (keylen < algo->keymin || algo->keymax < keylen) { in key_mature() 4748 keylen, algo->keymin, algo->keymax)); in key_mature() 4752 if (algo->mature) { in key_mature() [all …]
|