| /freebsd-13.1/sys/contrib/libsodium/src/libsodium/crypto_pwhash/argon2/ |
| H A D | argon2.c | 100 if (hashlen > ARGON2_MAX_OUTLEN) { in argon2_hash() 108 out = (uint8_t *) malloc(hashlen); in argon2_hash() 114 context.outlen = (uint32_t) hashlen; in argon2_hash() 132 sodium_memzero(out, hashlen); in argon2_hash() 139 memcpy(hash, out, hashlen); in argon2_hash() 145 sodium_memzero(out, hashlen); in argon2_hash() 152 sodium_memzero(out, hashlen); in argon2_hash() 173 void *hash, const size_t hashlen) in argon2i_hash_raw() argument 176 hash, hashlen, NULL, 0, Argon2_i); in argon2i_hash_raw() 194 void *hash, const size_t hashlen) in argon2id_hash_raw() argument [all …]
|
| H A D | argon2.h | 215 const size_t saltlen, const size_t hashlen, 236 const size_t saltlen, const size_t hashlen, 256 const size_t saltlen, void *hash, const size_t hashlen); 275 const size_t saltlen, void *hash, const size_t hashlen); 281 void *hash, const size_t hashlen, char *encoded,
|
| /freebsd-13.1/crypto/openssl/ssl/ |
| H A D | tls13_enc.c | 43 size_t hashlen; in tls13_hkdf_expand() local 72 hashlen = EVP_MD_size(md); in tls13_hkdf_expand() 295 size_t hashlen, ret = 0; in tls13_final_finish_mac() local 333 ret = hashlen; in tls13_final_finish_mac() 373 size_t hashlen; in derive_secret_key_and_iv() local 381 hashlen = (size_t)hashleni; in derive_secret_key_and_iv() 468 size_t labellen, hashlen = 0; in tls13_change_cipher_state() local 577 hashlen = hashlenui; in tls13_change_cipher_state() 702 hashlen)) { in tls13_change_cipher_state() 783 size_t hashlen = EVP_MD_size(md); in tls13_update_key() local [all …]
|
| H A D | t1_enc.c | 563 size_t hashlen; in tls1_final_finish_mac() local 571 if (!ssl_handshake_hash(s, hash, sizeof(hash), &hashlen)) { in tls1_final_finish_mac() 576 if (!tls1_PRF(s, str, slen, hash, hashlen, NULL, 0, NULL, 0, NULL, 0, in tls1_final_finish_mac() 582 OPENSSL_cleanse(hash, hashlen); in tls1_final_finish_mac() 591 size_t hashlen; in tls1_generate_master_secret() local 598 || !ssl_handshake_hash(s, hash, sizeof(hash), &hashlen)) { in tls1_generate_master_secret() 604 BIO_dump_fp(stderr, (char *)hash, hashlen); in tls1_generate_master_secret() 609 hash, hashlen, in tls1_generate_master_secret() 617 OPENSSL_cleanse(hash, hashlen); in tls1_generate_master_secret()
|
| /freebsd-13.1/crypto/openssh/ |
| H A D | kexgen.c | 58 u_char *hash, size_t *hashlen) in kex_gen_hash() argument 63 if (*hashlen < ssh_digest_bytes(hash_alg)) in kex_gen_hash() 86 if (ssh_digest_buffer(hash_alg, b, hash, *hashlen) != 0) { in kex_gen_hash() 91 *hashlen = ssh_digest_bytes(hash_alg); in kex_gen_hash() 93 dump_digest("hash", hash, *hashlen); in kex_gen_hash() 148 size_t slen, hashlen; in input_kex_gen_reply() local 203 hashlen = sizeof(hash); in input_kex_gen_reply() 214 hash, &hashlen)) != 0) in input_kex_gen_reply() 257 size_t slen, hashlen; in input_kex_gen_init() local 309 hashlen = sizeof(hash); in input_kex_gen_init() [all …]
|
| H A D | kexgex.c | 60 u_char *hash, size_t *hashlen) in kexgex_hash() argument 65 if (*hashlen < ssh_digest_bytes(SSH_DIGEST_SHA1)) in kexgex_hash() 93 if (ssh_digest_buffer(hash_alg, b, hash, *hashlen) != 0) { in kexgex_hash() 98 *hashlen = ssh_digest_bytes(hash_alg); in kexgex_hash() 100 dump_digest("hash", hash, *hashlen); in kexgex_hash()
|
| H A D | kexgexs.c | 138 size_t slen, hashlen; in input_kex_dh_gex_init() local 168 hashlen = sizeof(hash); in input_kex_dh_gex_init() 181 hash, &hashlen)) != 0) in input_kex_dh_gex_init() 186 &signature, &slen, hash, hashlen, kex->hostkey_alg)) < 0) in input_kex_dh_gex_init() 197 if ((r = kex_derive_keys(ssh, hash, hashlen, shared_secret)) == 0) in input_kex_dh_gex_init()
|
| H A D | kexgexc.c | 155 size_t slen, hashlen; in input_kex_dh_gex_reply() local 189 hashlen = sizeof(hash); in input_kex_dh_gex_reply() 202 hash, &hashlen)) != 0) in input_kex_dh_gex_reply() 206 hashlen, kex->hostkey_alg, ssh->compat, NULL)) != 0) in input_kex_dh_gex_reply() 209 if ((r = kex_derive_keys(ssh, hash, hashlen, shared_secret)) == 0) in input_kex_dh_gex_reply()
|
| H A D | kex.c | 996 derive_key(struct ssh *ssh, int id, u_int need, u_char *hash, u_int hashlen, in derive_key() argument 1017 ssh_digest_update(hashctx, hash, hashlen) != 0 || in derive_key() 1036 ssh_digest_update(hashctx, hash, hashlen) != 0 || in derive_key() 1061 kex_derive_keys(struct ssh *ssh, u_char *hash, u_int hashlen, in kex_derive_keys() argument 1075 if ((r = sshbuf_put(kex->session_id, hash, hashlen)) != 0) in kex_derive_keys() 1082 if ((r = derive_key(ssh, 'A'+i, kex->we_need, hash, hashlen, in kex_derive_keys()
|
| H A D | ssh-rsa.c | 403 openssh_RSA_verify(int hash_alg, u_char *hash, size_t hashlen, in openssh_RSA_verify() argument 415 if (hashlen != hlen) { in openssh_RSA_verify()
|
| /freebsd-13.1/contrib/unbound/testcode/ |
| H A D | unitzonemd.c | 64 size_t hashlen = 0; in zonemd_generate_test() local 95 zonemd_hash, sizeof(zonemd_hash), &hashlen, region, buf, in zonemd_generate_test() 101 unit_assert(hashlen*2+1 <= sizeof(output)); in zonemd_generate_test() 102 for(i=0; i<hashlen; i++) { in zonemd_generate_test() 107 output[hashlen*2] = 0; in zonemd_generate_test() 183 size_t hashlen = 0, hashwronglen = 0; in zonemd_check_test() local 209 hashlen = sizeof(hash); in zonemd_check_test() 210 if(sldns_str2wire_hex_buf(digest, hash, &hashlen) != 0) { in zonemd_check_test() 220 hash, hashlen, region, buf, &reason); in zonemd_check_test() 223 hash, hashlen, region, buf, &reason); in zonemd_check_test() [all …]
|
| /freebsd-13.1/tests/sys/opencrypto/ |
| H A D | cryptotest.py | 348 if hashlen == 20: 350 elif hashlen == 28: 352 elif hashlen == 32: 354 elif hashlen == 48: 356 elif hashlen == 64: 372 maclen=hashlen) 400 if hashlen == 20: 403 elif hashlen == 28: 406 elif hashlen == 32: 409 elif hashlen == 48: [all …]
|
| /freebsd-13.1/contrib/wpa/src/eap_common/ |
| H A D | eap_gpsk_common.c | 43 size_t i, n, hashlen, left, clen; in eap_gpsk_gkdf_cmac() local 48 hashlen = sizeof(hash); in eap_gpsk_gkdf_cmac() 57 n = (len + hashlen - 1) / hashlen; in eap_gpsk_gkdf_cmac() 62 clen = left > hashlen ? hashlen : left; in eap_gpsk_gkdf_cmac() 78 size_t i, n, hashlen, left, clen; in eap_gpsk_gkdf_sha256() local 83 hashlen = SHA256_MAC_LEN; in eap_gpsk_gkdf_sha256() 92 n = (len + hashlen - 1) / hashlen; in eap_gpsk_gkdf_sha256() 97 clen = left > hashlen ? hashlen : left; in eap_gpsk_gkdf_sha256()
|
| /freebsd-13.1/sys/mips/nlm/hal/ |
| H A D | nlmsaelib.h | 265 nlm_crypto_form_pkt_desc1(unsigned int cipherlen, unsigned int hashlen) in nlm_crypto_form_pkt_desc1() argument 268 left_shift64_mask((hashlen - 1), 0, 32)); in nlm_crypto_form_pkt_desc1() 511 unsigned int hashoff, unsigned int hashlen, unsigned int hmacpad, in nlm_crypto_fill_cipher_auth_pkt_param() argument 516 param->desc1 = nlm_crypto_form_pkt_desc1(cipherlen, hashlen); in nlm_crypto_fill_cipher_auth_pkt_param() 559 unsigned int hashlen, unsigned int hmacpad, unsigned char *hashdst_addr) in nlm_crypto_fill_auth_pkt_param() argument 563 param->desc1 = nlm_crypto_form_pkt_desc1(1, hashlen); in nlm_crypto_fill_auth_pkt_param()
|
| /freebsd-13.1/sys/crypto/blake2/ |
| H A D | blake2_cryptodev.c | 276 int hashlen; in blake2_cipher_setup() local 288 hashlen = BLAKE2S_OUTBYTES; in blake2_cipher_setup() 291 hashlen = BLAKE2B_OUTBYTES; in blake2_cipher_setup() 297 if (csp->csp_auth_mlen > hashlen) in blake2_cipher_setup() 301 ses->mlen = hashlen; in blake2_cipher_setup()
|
| /freebsd-13.1/sys/dev/sec/ |
| H A D | sec.c | 112 u_int *eu, u_int *mode, u_int *hashlen); 1377 u_int eu, mode, hashlen; in sec_build_common_s_desc() local 1380 error = sec_mdeu_config(csp, &eu, &mode, &hashlen); in sec_build_common_s_desc() 1426 offsetof(struct sec_hw_desc, shd_digest), hashlen); in sec_build_common_s_desc() 1484 u_int *hashlen) in sec_mdeu_config() argument 1497 *hashlen = SHA1_HASH_LEN; in sec_mdeu_config() 1516 *hashlen = SEC_HMAC_HASH_LEN; in sec_mdeu_config() 1534 u_int eu, mode, hashlen; in sec_mdeu_make_desc() local 1537 error = sec_mdeu_config(csp, &eu, &mode, &hashlen); in sec_mdeu_make_desc() 1581 offsetof(struct sec_hw_desc, shd_digest), hashlen); in sec_mdeu_make_desc()
|
| /freebsd-13.1/sys/mips/nlm/dev/sec/ |
| H A D | nlmsec.c | 217 printf("hashlen :%d\n",cmd->hashlen); in print_cmd() 637 cmd->hashlen = crp->crp_payload_length; in xlp_sec_process() 654 cmd->hashlen = crp->crp_aad_length + in xlp_sec_process() 658 cmd->hashlen = crp->crp_payload_length; in xlp_sec_process()
|
| H A D | nlmseclib.c | 209 cmd->hashoff, cmd->hashlen, cmd->hmacpad, in nlm_crypto_do_digest() 242 cmd->ivoff, cmd->ivlen, cmd->hashoff, cmd->hashlen, in nlm_crypto_do_cipher_digest()
|
| H A D | nlmseclib.h | 102 uint32_t hashlen; member
|
| /freebsd-13.1/contrib/opie/libopie/ |
| H A D | Makefile.in | 17 OBJS=md4c.o md5c.o atob8.o btoa8.o btoh.o challenge.o getsequence.o hash.o hashlen.o keycrunch.o lo…
|
| /freebsd-13.1/crypto/openssl/ssl/statem/ |
| H A D | statem_lib.c | 185 size_t hashlen; in get_cert_verify_tbs_data() local 205 hashlen = s->cert_verify_hash_len; in get_cert_verify_tbs_data() 207 EVP_MAX_MD_SIZE, &hashlen)) { in get_cert_verify_tbs_data() 213 *hdatalen = TLS13_TBS_PREAMBLE_SIZE + hashlen; in get_cert_verify_tbs_data() 2198 size_t hashlen, const unsigned char *hrr, in create_synthetic_message_hash() argument 2208 hashlen = 0; in create_synthetic_message_hash() 2212 &hashlen)) { in create_synthetic_message_hash() 2226 msghdr[SSL3_HM_HEADER_LENGTH - 1] = (unsigned char)hashlen; in create_synthetic_message_hash() 2228 || !ssl3_finish_mac(s, hashval, hashlen)) { in create_synthetic_message_hash()
|
| /freebsd-13.1/contrib/unbound/validator/ |
| H A D | val_nsec3.h | 306 size_t nsec3_hash_to_b32(uint8_t* hash, size_t hashlen, uint8_t* zone,
|
| H A D | val_secalgo.c | 1403 int hashlen = sechash.len; in verify_canonrrset() local 1404 if(prefixlen+hashlen > sizeof(hash2)) { in verify_canonrrset() 1410 sechash.len = prefixlen+hashlen; in verify_canonrrset() 1412 memmove(sechash.data+prefixlen, hash, hashlen); in verify_canonrrset()
|
| /freebsd-13.1/sys/kern/ |
| H A D | kern_mib.c | 586 int hashlen; in sysctl_build_id() local 603 hashlen = sectionlen - BUILD_ID_HEADER_LEN; in sysctl_build_id() 604 for (int i = 0; i < hashlen; i++) { in sysctl_build_id()
|
| /freebsd-13.1/cddl/contrib/opensolaris/common/ctf/ |
| H A D | ctf_create.c | 57 const ulong_t hashlen = 128; in ctf_create() local 58 ctf_dtdef_t **hash = ctf_alloc(hashlen * sizeof (ctf_dtdef_t *)); in ctf_create() 74 ctf_free(hash, hashlen * sizeof (ctf_dtdef_t *)); in ctf_create() 79 fp->ctf_dthashlen = hashlen; in ctf_create() 80 bzero(hash, hashlen * sizeof (ctf_dtdef_t *)); in ctf_create()
|