/third_party/wpa_supplicant/wpa_supplicant-2.9/src/crypto/ |
H A D | crypto_internal.c | 35 size_t key_len; member 40 size_t key_len) in crypto_hash_init() 76 if (key_len > sizeof(k_pad)) { in crypto_hash_init() 78 MD5Update(&ctx->u.md5, key, key_len); in crypto_hash_init() 81 key_len = 16; in crypto_hash_init() 83 os_memcpy(ctx->key, key, key_len); in crypto_hash_init() 84 ctx->key_len = key_len; in crypto_hash_init() 86 os_memcpy(k_pad, key, key_len); in crypto_hash_init() 87 if (key_len < sizeo in crypto_hash_init() 39 crypto_hash_init(enum crypto_hash_alg alg, const u8 *key, size_t key_len) crypto_hash_init() argument [all...] |
H A D | aes-siv.c | 64 static int aes_s2v(const u8 *key, size_t key_len, in aes_s2v() argument 79 return omac1_aes_vector(key, key_len, 1, data, data_len, mac); in aes_s2v() 84 ret = omac1_aes_vector(key, key_len, 1, data, data_len, tmp); in aes_s2v() 89 ret = omac1_aes_vector(key, key_len, 1, &addr[i], &len[i], in aes_s2v() 104 ret = omac1_aes_vector(key, key_len, 1, data, &len[i], mac); in aes_s2v() 115 return omac1_aes_vector(key, key_len, 1, data, data_len, mac); in aes_s2v() 119 int aes_siv_encrypt(const u8 *key, size_t key_len, in aes_siv_encrypt() argument 132 (key_len != 32 && key_len != 48 && key_len ! in aes_siv_encrypt() 162 aes_siv_decrypt(const u8 *key, size_t key_len, const u8 *iv_crypt, size_t iv_c_len, size_t num_elem, const u8 *addr[], const size_t *len, u8 *out) aes_siv_decrypt() argument [all...] |
H A D | crypto_gnutls.c | 101 static int gnutls_hmac_vector(int algo, const u8 *key, size_t key_len, in gnutls_hmac_vector() argument 114 if (gcry_md_setkey(hd, key, key_len) != GPG_ERR_NO_ERROR) { in gnutls_hmac_vector() 128 int hmac_md5_vector(const u8 *key, size_t key_len, size_t num_elem, in hmac_md5_vector() argument 131 return gnutls_hmac_vector(GCRY_MD_MD5, key, key_len, num_elem, addr, in hmac_md5_vector() 136 int hmac_md5(const u8 *key, size_t key_len, const u8 *data, size_t data_len, in hmac_md5() argument 139 return hmac_md5_vector(key, key_len, 1, &data, &data_len, mac); in hmac_md5() 143 int hmac_sha1_vector(const u8 *key, size_t key_len, size_t num_elem, in hmac_sha1_vector() argument 146 return gnutls_hmac_vector(GCRY_MD_SHA1, key, key_len, num_elem, addr, in hmac_sha1_vector() 151 int hmac_sha1(const u8 *key, size_t key_len, const u8 *data, size_t data_len, in hmac_sha1() argument 154 return hmac_sha1_vector(key, key_len, in hmac_sha1() 160 hmac_sha256_vector(const u8 *key, size_t key_len, size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac) hmac_sha256_vector() argument 168 hmac_sha256(const u8 *key, size_t key_len, const u8 *data, size_t data_len, u8 *mac) hmac_sha256() argument 179 hmac_sha384_vector(const u8 *key, size_t key_len, size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac) hmac_sha384_vector() argument 187 hmac_sha384(const u8 *key, size_t key_len, const u8 *data, size_t data_len, u8 *mac) hmac_sha384() argument 198 hmac_sha512_vector(const u8 *key, size_t key_len, size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac) hmac_sha512_vector() argument 206 hmac_sha512(const u8 *key, size_t key_len, const u8 *data, size_t data_len, u8 *mac) hmac_sha512() argument 402 crypto_cipher_init(enum crypto_cipher_alg alg, const u8 *iv, const u8 *key, size_t key_len) crypto_cipher_init() argument [all...] |
H A D | sha1.c | 19 * @key_len: Length of the key in bytes 26 int hmac_sha1_vector(const u8 *key, size_t key_len, size_t num_elem, in hmac_sha1_vector() argument 44 if (key_len > 64) { in hmac_sha1_vector() 45 if (sha1_vector(1, &key, &key_len, tk)) in hmac_sha1_vector() 48 key_len = 20; in hmac_sha1_vector() 62 os_memcpy(k_pad, key, key_len); in hmac_sha1_vector() 78 os_memcpy(k_pad, key, key_len); in hmac_sha1_vector() 98 * @key_len: Length of the key in bytes 104 int hmac_sha1(const u8 *key, size_t key_len, const u8 *data, size_t data_len, in hmac_sha1() argument 107 return hmac_sha1_vector(key, key_len, in hmac_sha1() [all...] |
H A D | sha256.c | 19 * @key_len: Length of the key in bytes 26 int hmac_sha256_vector(const u8 *key, size_t key_len, size_t num_elem, in hmac_sha256_vector() argument 43 if (key_len > 64) { in hmac_sha256_vector() 44 if (sha256_vector(1, &key, &key_len, tk) < 0) in hmac_sha256_vector() 47 key_len = 32; in hmac_sha256_vector() 61 os_memcpy(k_pad, key, key_len); in hmac_sha256_vector() 77 os_memcpy(k_pad, key, key_len); in hmac_sha256_vector() 94 * @key_len: Length of the key in bytes 100 int hmac_sha256(const u8 *key, size_t key_len, const u8 *data, in hmac_sha256() argument 103 return hmac_sha256_vector(key, key_len, in hmac_sha256() [all...] |
H A D | sha384.c | 19 * @key_len: Length of the key in bytes 26 int hmac_sha384_vector(const u8 *key, size_t key_len, size_t num_elem, in hmac_sha384_vector() argument 43 if (key_len > 128) { in hmac_sha384_vector() 44 if (sha384_vector(1, &key, &key_len, tk) < 0) in hmac_sha384_vector() 47 key_len = 48; in hmac_sha384_vector() 61 os_memcpy(k_pad, key, key_len); in hmac_sha384_vector() 77 os_memcpy(k_pad, key, key_len); in hmac_sha384_vector() 94 * @key_len: Length of the key in bytes 100 int hmac_sha384(const u8 *key, size_t key_len, const u8 *data, in hmac_sha384() argument 103 return hmac_sha384_vector(key, key_len, in hmac_sha384() [all...] |
H A D | sha512.c | 19 * @key_len: Length of the key in bytes 26 int hmac_sha512_vector(const u8 *key, size_t key_len, size_t num_elem, in hmac_sha512_vector() argument 43 if (key_len > 128) { in hmac_sha512_vector() 44 if (sha512_vector(1, &key, &key_len, tk) < 0) in hmac_sha512_vector() 47 key_len = 64; in hmac_sha512_vector() 61 os_memcpy(k_pad, key, key_len); in hmac_sha512_vector() 77 os_memcpy(k_pad, key, key_len); in hmac_sha512_vector() 94 * @key_len: Length of the key in bytes 100 int hmac_sha512(const u8 *key, size_t key_len, const u8 *data, in hmac_sha512() argument 103 return hmac_sha512_vector(key, key_len, in hmac_sha512() [all...] |
H A D | md5.c | 19 * @key_len: Length of the key in bytes 26 int hmac_md5_vector(const u8 *key, size_t key_len, size_t num_elem, in hmac_md5_vector() argument 44 if (key_len > 64) { in hmac_md5_vector() 45 if (md5_vector(1, &key, &key_len, tk)) in hmac_md5_vector() 48 key_len = 16; in hmac_md5_vector() 62 os_memcpy(k_pad, key, key_len); in hmac_md5_vector() 79 os_memcpy(k_pad, key, key_len); in hmac_md5_vector() 99 * @key_len: Length of the key in bytes 105 int hmac_md5(const u8 *key, size_t key_len, const u8 *data, size_t data_len, in hmac_md5() argument 108 return hmac_md5_vector(key, key_len, in hmac_md5() [all...] |
/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/src/crypto/ |
H A D | crypto_internal.c | 35 size_t key_len; member 40 size_t key_len) in crypto_hash_init() 76 if (key_len > sizeof(k_pad)) { in crypto_hash_init() 78 MD5Update(&ctx->u.md5, key, key_len); in crypto_hash_init() 81 key_len = 16; in crypto_hash_init() 83 os_memcpy(ctx->key, key, key_len); in crypto_hash_init() 84 ctx->key_len = key_len; in crypto_hash_init() 86 os_memcpy(k_pad, key, key_len); in crypto_hash_init() 87 if (key_len < sizeo in crypto_hash_init() 39 crypto_hash_init(enum crypto_hash_alg alg, const u8 *key, size_t key_len) crypto_hash_init() argument [all...] |
H A D | aes-siv.c | 64 static int aes_s2v(const u8 *key, size_t key_len, in aes_s2v() argument 79 return omac1_aes_vector(key, key_len, 1, data, data_len, mac); in aes_s2v() 84 ret = omac1_aes_vector(key, key_len, 1, data, data_len, tmp); in aes_s2v() 89 ret = omac1_aes_vector(key, key_len, 1, &addr[i], &len[i], in aes_s2v() 104 ret = omac1_aes_vector(key, key_len, 1, data, &len[i], mac); in aes_s2v() 115 return omac1_aes_vector(key, key_len, 1, data, data_len, mac); in aes_s2v() 119 int aes_siv_encrypt(const u8 *key, size_t key_len, in aes_siv_encrypt() argument 132 (key_len != 32 && key_len != 48 && key_len ! in aes_siv_encrypt() 162 aes_siv_decrypt(const u8 *key, size_t key_len, const u8 *iv_crypt, size_t iv_c_len, size_t num_elem, const u8 *addr[], const size_t *len, u8 *out) aes_siv_decrypt() argument [all...] |
H A D | crypto_gnutls.c | 101 static int gnutls_hmac_vector(int algo, const u8 *key, size_t key_len, in gnutls_hmac_vector() argument 114 if (gcry_md_setkey(hd, key, key_len) != GPG_ERR_NO_ERROR) { in gnutls_hmac_vector() 128 int hmac_md5_vector(const u8 *key, size_t key_len, size_t num_elem, in hmac_md5_vector() argument 131 return gnutls_hmac_vector(GCRY_MD_MD5, key, key_len, num_elem, addr, in hmac_md5_vector() 136 int hmac_md5(const u8 *key, size_t key_len, const u8 *data, size_t data_len, in hmac_md5() argument 139 return hmac_md5_vector(key, key_len, 1, &data, &data_len, mac); in hmac_md5() 143 int hmac_sha1_vector(const u8 *key, size_t key_len, size_t num_elem, in hmac_sha1_vector() argument 146 return gnutls_hmac_vector(GCRY_MD_SHA1, key, key_len, num_elem, addr, in hmac_sha1_vector() 151 int hmac_sha1(const u8 *key, size_t key_len, const u8 *data, size_t data_len, in hmac_sha1() argument 154 return hmac_sha1_vector(key, key_len, in hmac_sha1() 160 hmac_sha256_vector(const u8 *key, size_t key_len, size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac) hmac_sha256_vector() argument 168 hmac_sha256(const u8 *key, size_t key_len, const u8 *data, size_t data_len, u8 *mac) hmac_sha256() argument 179 hmac_sha384_vector(const u8 *key, size_t key_len, size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac) hmac_sha384_vector() argument 187 hmac_sha384(const u8 *key, size_t key_len, const u8 *data, size_t data_len, u8 *mac) hmac_sha384() argument 198 hmac_sha512_vector(const u8 *key, size_t key_len, size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac) hmac_sha512_vector() argument 206 hmac_sha512(const u8 *key, size_t key_len, const u8 *data, size_t data_len, u8 *mac) hmac_sha512() argument 402 crypto_cipher_init(enum crypto_cipher_alg alg, const u8 *iv, const u8 *key, size_t key_len) crypto_cipher_init() argument [all...] |
H A D | sha1.c | 19 * @key_len: Length of the key in bytes 26 int hmac_sha1_vector(const u8 *key, size_t key_len, size_t num_elem, in hmac_sha1_vector() argument 44 if (key_len > 64) { in hmac_sha1_vector() 45 if (sha1_vector(1, &key, &key_len, tk)) in hmac_sha1_vector() 48 key_len = 20; in hmac_sha1_vector() 62 os_memcpy(k_pad, key, key_len); in hmac_sha1_vector() 78 os_memcpy(k_pad, key, key_len); in hmac_sha1_vector() 98 * @key_len: Length of the key in bytes 104 int hmac_sha1(const u8 *key, size_t key_len, const u8 *data, size_t data_len, in hmac_sha1() argument 107 return hmac_sha1_vector(key, key_len, in hmac_sha1() [all...] |
H A D | sha256.c | 19 * @key_len: Length of the key in bytes 26 int hmac_sha256_vector(const u8 *key, size_t key_len, size_t num_elem, in hmac_sha256_vector() argument 43 if (key_len > 64) { in hmac_sha256_vector() 44 if (sha256_vector(1, &key, &key_len, tk) < 0) in hmac_sha256_vector() 47 key_len = 32; in hmac_sha256_vector() 61 os_memcpy(k_pad, key, key_len); in hmac_sha256_vector() 77 os_memcpy(k_pad, key, key_len); in hmac_sha256_vector() 94 * @key_len: Length of the key in bytes 100 int hmac_sha256(const u8 *key, size_t key_len, const u8 *data, in hmac_sha256() argument 103 return hmac_sha256_vector(key, key_len, in hmac_sha256() [all...] |
H A D | sha384.c | 19 * @key_len: Length of the key in bytes 26 int hmac_sha384_vector(const u8 *key, size_t key_len, size_t num_elem, in hmac_sha384_vector() argument 43 if (key_len > 128) { in hmac_sha384_vector() 44 if (sha384_vector(1, &key, &key_len, tk) < 0) in hmac_sha384_vector() 47 key_len = 48; in hmac_sha384_vector() 61 os_memcpy(k_pad, key, key_len); in hmac_sha384_vector() 77 os_memcpy(k_pad, key, key_len); in hmac_sha384_vector() 94 * @key_len: Length of the key in bytes 100 int hmac_sha384(const u8 *key, size_t key_len, const u8 *data, in hmac_sha384() argument 103 return hmac_sha384_vector(key, key_len, in hmac_sha384() [all...] |
H A D | sha512.c | 19 * @key_len: Length of the key in bytes 26 int hmac_sha512_vector(const u8 *key, size_t key_len, size_t num_elem, in hmac_sha512_vector() argument 43 if (key_len > 128) { in hmac_sha512_vector() 44 if (sha512_vector(1, &key, &key_len, tk) < 0) in hmac_sha512_vector() 47 key_len = 64; in hmac_sha512_vector() 61 os_memcpy(k_pad, key, key_len); in hmac_sha512_vector() 77 os_memcpy(k_pad, key, key_len); in hmac_sha512_vector() 94 * @key_len: Length of the key in bytes 100 int hmac_sha512(const u8 *key, size_t key_len, const u8 *data, in hmac_sha512() argument 103 return hmac_sha512_vector(key, key_len, in hmac_sha512() [all...] |
H A D | md5.c | 19 * @key_len: Length of the key in bytes 26 int hmac_md5_vector(const u8 *key, size_t key_len, size_t num_elem, in hmac_md5_vector() argument 44 if (key_len > 64) { in hmac_md5_vector() 45 if (md5_vector(1, &key, &key_len, tk)) in hmac_md5_vector() 48 key_len = 16; in hmac_md5_vector() 62 os_memcpy(k_pad, key, key_len); in hmac_md5_vector() 79 os_memcpy(k_pad, key, key_len); in hmac_md5_vector() 99 * @key_len: Length of the key in bytes 105 int hmac_md5(const u8 *key, size_t key_len, const u8 *data, size_t data_len, in hmac_md5() argument 108 return hmac_md5_vector(key, key_len, in hmac_md5() [all...] |
/kernel/linux/linux-5.10/arch/x86/crypto/ |
H A D | aes_ctrby8_avx-x86_64.S | 145 * do_aes num_in_par load_keys key_len 148 .macro do_aes b, k, key_len 151 .set klen, \key_len 417 .macro do_aes_load val, key_len 418 do_aes \val, 1, \key_len 421 .macro do_aes_noload val, key_len 422 do_aes \val, 0, \key_len 427 .macro do_aes_ctrmain key_len 429 jb .Ldo_return2\key_len 437 jz .Lmult_of_8_blks\key_len [all...] |
/kernel/linux/linux-6.6/arch/x86/crypto/ |
H A D | aes_ctrby8_avx-x86_64.S | 109 * do_aes num_in_par load_keys key_len 112 .macro do_aes b, k, key_len, xctr 115 .set klen, \key_len 400 .macro do_aes_load val, key_len, xctr 401 do_aes \val, 1, \key_len, \xctr 404 .macro do_aes_noload val, key_len, xctr 405 do_aes \val, 0, \key_len, \xctr 410 .macro do_aes_ctrmain key_len, xctr 412 jb .Ldo_return2\xctr\key_len 425 jz .Lmult_of_8_blks\xctr\key_len [all...] |
/kernel/linux/linux-5.10/drivers/firmware/efi/ |
H A D | apple-properties.c | 57 u32 key_len, val_len, entry_len; in unmarshal_key_value_pairs() local 61 if (sizeof(key_len) > remaining) in unmarshal_key_value_pairs() 64 key_len = *(typeof(key_len) *)ptr; in unmarshal_key_value_pairs() 65 if (key_len + sizeof(val_len) > remaining || in unmarshal_key_value_pairs() 66 key_len < sizeof(key_len) + sizeof(efi_char16_t) || in unmarshal_key_value_pairs() 67 *(efi_char16_t *)(ptr + sizeof(key_len)) == 0) { in unmarshal_key_value_pairs() 73 val_len = *(typeof(val_len) *)(ptr + key_len); in unmarshal_key_value_pairs() 74 if (key_len in unmarshal_key_value_pairs() [all...] |
/kernel/linux/linux-6.6/drivers/firmware/efi/ |
H A D | apple-properties.c | 57 u32 key_len, val_len, entry_len; in unmarshal_key_value_pairs() local 61 if (sizeof(key_len) > remaining) in unmarshal_key_value_pairs() 64 key_len = *(typeof(key_len) *)ptr; in unmarshal_key_value_pairs() 65 if (key_len + sizeof(val_len) > remaining || in unmarshal_key_value_pairs() 66 key_len < sizeof(key_len) + sizeof(efi_char16_t) || in unmarshal_key_value_pairs() 67 *(efi_char16_t *)(ptr + sizeof(key_len)) == 0) { in unmarshal_key_value_pairs() 73 val_len = *(typeof(val_len) *)(ptr + key_len); in unmarshal_key_value_pairs() 74 if (key_len in unmarshal_key_value_pairs() [all...] |
/kernel/linux/linux-5.10/arch/sparc/crypto/ |
H A D | camellia_glue.c | 31 int key_len; member 35 unsigned int key_len, u64 *decrypt_key); 38 unsigned int key_len) in camellia_set_key() 43 if (key_len != 16 && key_len != 24 && key_len != 32) in camellia_set_key() 46 ctx->key_len = key_len; in camellia_set_key() 49 key_len, &ctx->decrypt_key[0]); in camellia_set_key() 54 const u8 *in_key, unsigned int key_len) in camellia_set_key_skcipher() 37 camellia_set_key(struct crypto_tfm *tfm, const u8 *_in_key, unsigned int key_len) camellia_set_key() argument 53 camellia_set_key_skcipher(struct crypto_skcipher *tfm, const u8 *in_key, unsigned int key_len) camellia_set_key_skcipher() argument [all...] |
/kernel/linux/linux-6.6/arch/sparc/crypto/ |
H A D | camellia_glue.c | 31 int key_len; member 35 unsigned int key_len, u64 *decrypt_key); 38 unsigned int key_len) in camellia_set_key() 43 if (key_len != 16 && key_len != 24 && key_len != 32) in camellia_set_key() 46 ctx->key_len = key_len; in camellia_set_key() 49 key_len, &ctx->decrypt_key[0]); in camellia_set_key() 54 const u8 *in_key, unsigned int key_len) in camellia_set_key_skcipher() 37 camellia_set_key(struct crypto_tfm *tfm, const u8 *_in_key, unsigned int key_len) camellia_set_key() argument 53 camellia_set_key_skcipher(struct crypto_skcipher *tfm, const u8 *in_key, unsigned int key_len) camellia_set_key_skcipher() argument [all...] |
/third_party/curl/lib/ |
H A D | hash.c | 47 e->key_len = 0; in hash_element_dtor() 80 mk_hash_element(const void *key, size_t key_len, const void *p) in mk_hash_element() argument 84 key_len); in mk_hash_element() 87 memcpy(he->key, key, key_len); in mk_hash_element() 88 he->key_len = key_len; in mk_hash_element() 105 Curl_hash_add(struct Curl_hash *h, void *key, size_t key_len, void *p) in Curl_hash_add() argument 122 l = FETCH_LIST(h, key, key_len); in Curl_hash_add() 126 if(h->comp_func(he->key, he->key_len, key, key_len)) { in Curl_hash_add() 148 Curl_hash_delete(struct Curl_hash *h, void *key, size_t key_len) Curl_hash_delete() argument 175 Curl_hash_pick(struct Curl_hash *h, void *key, size_t key_len) Curl_hash_pick() argument [all...] |
/third_party/wpa_supplicant/wpa_supplicant-2.9/src/wps/ |
H A D | wps_attr_process.c | 169 const u8 *key, size_t key_len) in wps_process_cred_network_key() 184 wpa_hexdump_key(MSG_DEBUG, "WPS: Network Key", key, key_len); in wps_process_cred_network_key() 185 if (key_len <= sizeof(cred->key)) { in wps_process_cred_network_key() 186 os_memcpy(cred->key, key, key_len); in wps_process_cred_network_key() 187 cred->key_len = key_len; in wps_process_cred_network_key() 213 cred->key_len > 8 && cred->key_len < 64 && in wps_workaround_cred_key() 214 cred->key[cred->key_len - 1] == 0) { in wps_workaround_cred_key() 219 cred->key, cred->key_len); in wps_workaround_cred_key() 168 wps_process_cred_network_key(struct wps_credential *cred, const u8 *key, size_t key_len) wps_process_cred_network_key() argument [all...] |
/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/src/wps/ |
H A D | wps_attr_process.c | 170 const u8 *key, size_t key_len) in wps_process_cred_network_key() 185 wpa_hexdump_key(MSG_DEBUG, "WPS: Network Key", key, key_len); in wps_process_cred_network_key() 186 if (key_len <= sizeof(cred->key)) { in wps_process_cred_network_key() 187 os_memcpy(cred->key, key, key_len); in wps_process_cred_network_key() 188 cred->key_len = key_len; in wps_process_cred_network_key() 214 cred->key_len > 8 && cred->key_len < 64 && in wps_workaround_cred_key() 215 cred->key[cred->key_len - 1] == 0) { in wps_workaround_cred_key() 220 cred->key, cred->key_len); in wps_workaround_cred_key() 169 wps_process_cred_network_key(struct wps_credential *cred, const u8 *key, size_t key_len) wps_process_cred_network_key() argument [all...] |