Home
last modified time | relevance | path

Searched refs:AES_BLOCK_SIZE (Results 1 – 25 of 41) sorted by relevance

12

/external/wpa_supplicant_8/src/crypto/
Daes-ccm.c32 u8 aad_buf[2 * AES_BLOCK_SIZE]; in aes_ccm_auth_start()
33 u8 b[AES_BLOCK_SIZE]; in aes_ccm_auth_start()
41 WPA_PUT_BE16(&b[AES_BLOCK_SIZE - L], plain_len); in aes_ccm_auth_start()
43 wpa_hexdump_key(MSG_EXCESSIVE, "CCM B_0", b, AES_BLOCK_SIZE); in aes_ccm_auth_start()
56 if (aad_len > AES_BLOCK_SIZE - 2) { in aes_ccm_auth_start()
57 xor_aes_block(&aad_buf[AES_BLOCK_SIZE], x); in aes_ccm_auth_start()
59 aes_encrypt(aes, &aad_buf[AES_BLOCK_SIZE], x); in aes_ccm_auth_start()
66 size_t last = len % AES_BLOCK_SIZE; in aes_ccm_auth()
69 for (i = 0; i < len / AES_BLOCK_SIZE; i++) { in aes_ccm_auth()
72 data += AES_BLOCK_SIZE; in aes_ccm_auth()
[all …]
Daes-cbc.c27 u8 cbc[AES_BLOCK_SIZE]; in aes_128_cbc_encrypt()
37 os_memcpy(cbc, iv, AES_BLOCK_SIZE); in aes_128_cbc_encrypt()
39 blocks = data_len / AES_BLOCK_SIZE; in aes_128_cbc_encrypt()
41 for (j = 0; j < AES_BLOCK_SIZE; j++) in aes_128_cbc_encrypt()
44 os_memcpy(pos, cbc, AES_BLOCK_SIZE); in aes_128_cbc_encrypt()
45 pos += AES_BLOCK_SIZE; in aes_128_cbc_encrypt()
63 u8 cbc[AES_BLOCK_SIZE], tmp[AES_BLOCK_SIZE]; in aes_128_cbc_decrypt()
73 os_memcpy(cbc, iv, AES_BLOCK_SIZE); in aes_128_cbc_decrypt()
75 blocks = data_len / AES_BLOCK_SIZE; in aes_128_cbc_decrypt()
77 os_memcpy(tmp, pos, AES_BLOCK_SIZE); in aes_128_cbc_decrypt()
[all …]
Daes-siv.c17 static const u8 zero[AES_BLOCK_SIZE];
25 for (i = 0; i < AES_BLOCK_SIZE - 1; i++) in dbl()
27 pad[AES_BLOCK_SIZE - 1] <<= 1; in dbl()
29 pad[AES_BLOCK_SIZE - 1] ^= 0x87; in dbl()
37 for (i = 0; i < AES_BLOCK_SIZE; i++) in xor()
56 os_memset(pad, 0, AES_BLOCK_SIZE); in pad_block()
59 if (len < AES_BLOCK_SIZE) in pad_block()
67 u8 tmp[AES_BLOCK_SIZE], tmp2[AES_BLOCK_SIZE]; in aes_s2v()
76 tmp[AES_BLOCK_SIZE - 1] = 1; in aes_s2v()
97 if (len[i] >= AES_BLOCK_SIZE) { in aes_s2v()
[all …]
Daes-omac1.c21 for (i = 0; i < AES_BLOCK_SIZE - 1; i++) in gf_mulx()
23 pad[AES_BLOCK_SIZE - 1] <<= 1; in gf_mulx()
25 pad[AES_BLOCK_SIZE - 1] ^= 0x87; in gf_mulx()
47 u8 cbc[AES_BLOCK_SIZE], pad[AES_BLOCK_SIZE]; in omac1_aes_vector()
57 os_memset(cbc, 0, AES_BLOCK_SIZE); in omac1_aes_vector()
68 while (left >= AES_BLOCK_SIZE) { in omac1_aes_vector()
69 for (i = 0; i < AES_BLOCK_SIZE; i++) { in omac1_aes_vector()
76 if (i + 1 == AES_BLOCK_SIZE && in omac1_aes_vector()
77 left == AES_BLOCK_SIZE) in omac1_aes_vector()
84 if (left > AES_BLOCK_SIZE) in omac1_aes_vector()
[all …]
Daes-gcm.c19 val = WPA_GET_BE32(block + AES_BLOCK_SIZE - 4); in inc32()
21 WPA_PUT_BE32(block + AES_BLOCK_SIZE - 4, val); in inc32()
146 u8 cb[AES_BLOCK_SIZE], tmp[AES_BLOCK_SIZE]; in aes_gctr()
155 os_memcpy(cb, icb, AES_BLOCK_SIZE); in aes_gctr()
160 xpos += AES_BLOCK_SIZE; in aes_gctr()
161 ypos += AES_BLOCK_SIZE; in aes_gctr()
184 os_memset(H, 0, AES_BLOCK_SIZE); in aes_gcm_init_hash_subkey()
187 H, AES_BLOCK_SIZE); in aes_gcm_init_hash_subkey()
199 os_memset(J0 + iv_len, 0, AES_BLOCK_SIZE - iv_len); in aes_gcm_prepare_j0()
200 J0[AES_BLOCK_SIZE - 1] = 0x01; in aes_gcm_prepare_j0()
[all …]
Dcrypto_internal-cipher.c76 os_memcpy(ctx->u.aes.cbc, iv, AES_BLOCK_SIZE); in crypto_cipher_init()
117 if (len % AES_BLOCK_SIZE) in crypto_cipher_encrypt()
119 blocks = len / AES_BLOCK_SIZE; in crypto_cipher_encrypt()
121 for (j = 0; j < AES_BLOCK_SIZE; j++) in crypto_cipher_encrypt()
125 os_memcpy(crypt, ctx->u.aes.cbc, AES_BLOCK_SIZE); in crypto_cipher_encrypt()
126 plain += AES_BLOCK_SIZE; in crypto_cipher_encrypt()
127 crypt += AES_BLOCK_SIZE; in crypto_cipher_encrypt()
181 if (len % AES_BLOCK_SIZE) in crypto_cipher_decrypt()
183 blocks = len / AES_BLOCK_SIZE; in crypto_cipher_decrypt()
185 os_memcpy(tmp, crypt, AES_BLOCK_SIZE); in crypto_cipher_decrypt()
[all …]
Daes-eax.c34 u8 nonce_mac[AES_BLOCK_SIZE], hdr_mac[AES_BLOCK_SIZE], in aes_128_eax_encrypt()
35 data_mac[AES_BLOCK_SIZE]; in aes_128_eax_encrypt()
69 for (i = 0; i < AES_BLOCK_SIZE; i++) in aes_128_eax_encrypt()
98 u8 nonce_mac[AES_BLOCK_SIZE], hdr_mac[AES_BLOCK_SIZE], in aes_128_eax_decrypt()
99 data_mac[AES_BLOCK_SIZE]; in aes_128_eax_decrypt()
139 for (i = 0; i < AES_BLOCK_SIZE; i++) { in aes_128_eax_decrypt()
Daes-ctr.c32 u8 counter[AES_BLOCK_SIZE], buf[AES_BLOCK_SIZE]; in aes_ctr_encrypt()
37 os_memcpy(counter, nonce, AES_BLOCK_SIZE); in aes_ctr_encrypt()
42 len = (left < AES_BLOCK_SIZE) ? left : AES_BLOCK_SIZE; in aes_ctr_encrypt()
48 for (i = AES_BLOCK_SIZE - 1; i >= 0; i--) { in aes_ctr_encrypt()
/external/boringssl/src/crypto/cmac/
Dcmac.c65 uint8_t k1[AES_BLOCK_SIZE];
66 uint8_t k2[AES_BLOCK_SIZE];
68 uint8_t block[AES_BLOCK_SIZE];
131 OPENSSL_memcpy(out->k1, in->k1, AES_BLOCK_SIZE); in CMAC_CTX_copy()
132 OPENSSL_memcpy(out->k2, in->k2, AES_BLOCK_SIZE); in CMAC_CTX_copy()
133 OPENSSL_memcpy(out->block, in->block, AES_BLOCK_SIZE); in CMAC_CTX_copy()
172 static const uint8_t kZeroIV[AES_BLOCK_SIZE] = {0};
176 uint8_t scratch[AES_BLOCK_SIZE]; in CMAC_Init()
179 if ((block_size != AES_BLOCK_SIZE && block_size != 8 /* 3-DES */) || in CMAC_Init()
188 if (block_size == AES_BLOCK_SIZE) { in CMAC_Init()
[all …]
/external/boringssl/src/crypto/fipsmodule/aes/
Daes_test.cc40 ASSERT_EQ(static_cast<unsigned>(AES_BLOCK_SIZE), plaintext.size()); in TestRaw()
41 ASSERT_EQ(static_cast<unsigned>(AES_BLOCK_SIZE), ciphertext.size()); in TestRaw()
47 uint8_t block[AES_BLOCK_SIZE]; in TestRaw()
52 OPENSSL_memcpy(block, plaintext.data(), AES_BLOCK_SIZE); in TestRaw()
63 OPENSSL_memcpy(block, ciphertext.data(), AES_BLOCK_SIZE); in TestRaw()
198 uint8_t block[AES_BLOCK_SIZE]; in TEST()
199 uint8_t buf[AES_BLOCK_SIZE * 64] = {0}; in TEST()
214 CHECK_ABI(aes_nohw_cbc_encrypt, buf, buf, AES_BLOCK_SIZE * blocks, &key, in TEST()
224 CHECK_ABI(aes_nohw_cbc_encrypt, buf, buf, AES_BLOCK_SIZE * blocks, &key, in TEST()
241 CHECK_ABI(bsaes_cbc_encrypt, buf, buf, AES_BLOCK_SIZE * blocks, &key, in TEST()
[all …]
Dkey_wrap.c80 uint8_t A[AES_BLOCK_SIZE]; in AES_wrap_key()
117 uint8_t A[AES_BLOCK_SIZE]; in AES_unwrap_key()
Dmode_wrappers.c58 const AES_KEY *key, uint8_t ivec[AES_BLOCK_SIZE], in AES_ctr128_encrypt() argument
59 uint8_t ecount_buf[AES_BLOCK_SIZE], unsigned int *num) { in AES_ctr128_encrypt() argument
/external/openssh/
Dcipher-ctr.c40 u_char aes_counter[AES_BLOCK_SIZE];
64 u_char buf[AES_BLOCK_SIZE]; in ssh_aes_ctr()
74 ssh_ctr_inc(c->aes_counter, AES_BLOCK_SIZE); in ssh_aes_ctr()
77 n = (n + 1) % AES_BLOCK_SIZE; in ssh_aes_ctr()
96 memcpy(c->aes_counter, iv, AES_BLOCK_SIZE); in ssh_aes_ctr_init()
133 aes_ctr.block_size = AES_BLOCK_SIZE; in evp_aes_128_ctr()
134 aes_ctr.iv_len = AES_BLOCK_SIZE; in evp_aes_128_ctr()
Dcipher-aesctr.c65 memcpy(x->ctr, iv, AES_BLOCK_SIZE); in aesctr_ivsetup()
72 u8 buf[AES_BLOCK_SIZE]; in aesctr_encrypt_bytes()
77 aesctr_inc(x->ctr, AES_BLOCK_SIZE); in aesctr_encrypt_bytes()
80 n = (n + 1) % AES_BLOCK_SIZE; in aesctr_encrypt_bytes()
Dcipher-aesctr.h23 #define AES_BLOCK_SIZE 16 macro
28 u8 ctr[AES_BLOCK_SIZE]; /* counter */
/external/boringssl/src/crypto/fipsmodule/rand/
Dctrdrbg.c67 OPENSSL_STATIC_ASSERT(CTR_DRBG_ENTROPY_LEN % AES_BLOCK_SIZE == 0,
87 for (size_t i = 0; i < CTR_DRBG_ENTROPY_LEN; i += AES_BLOCK_SIZE) { in ctr_drbg_update()
157 while (out_len >= AES_BLOCK_SIZE) { in CTR_DRBG_generate()
163 todo &= ~(AES_BLOCK_SIZE-1); in CTR_DRBG_generate()
164 const size_t num_blocks = todo / AES_BLOCK_SIZE; in CTR_DRBG_generate()
172 for (size_t i = 0; i < todo; i += AES_BLOCK_SIZE) { in CTR_DRBG_generate()
183 uint8_t block[AES_BLOCK_SIZE]; in CTR_DRBG_generate()
/external/lzma/CPP/7zip/Crypto/
DMyAes.cpp19 memset(_iv, 0, AES_BLOCK_SIZE); in CAesCbcCoder()
35 if (size < AES_BLOCK_SIZE) in STDMETHODIMP_()
36 return AES_BLOCK_SIZE; in STDMETHODIMP_()
56 if (size != AES_BLOCK_SIZE) in SetInitVector()
/external/wpa_supplicant_8/src/eap_common/
Deap_eke_common.c49 return AES_BLOCK_SIZE + dhlen; in eap_eke_dhcomp_len()
102 return AES_BLOCK_SIZE + 16 + mac_len; in eap_eke_pnonce_len()
117 return AES_BLOCK_SIZE + 2 * 16 + mac_len; in eap_eke_pnonce_ps_len()
347 u8 iv[AES_BLOCK_SIZE]; in eap_eke_dhcomp()
361 if (random_get_bytes(iv, AES_BLOCK_SIZE)) in eap_eke_dhcomp()
364 iv, AES_BLOCK_SIZE); in eap_eke_dhcomp()
368 os_memcpy(ret_dhcomp, iv, AES_BLOCK_SIZE); in eap_eke_dhcomp()
369 os_memcpy(ret_dhcomp + AES_BLOCK_SIZE, pub, dh_len); in eap_eke_dhcomp()
371 ret_dhcomp, AES_BLOCK_SIZE + dh_len); in eap_eke_dhcomp()
391 os_memcpy(peer_pub, peer_dhcomp + AES_BLOCK_SIZE, dh->prime_len); in eap_eke_shared_secret()
[all …]
/external/nos/test/system-test-harness/src/
Druntests.cc250 ASSERT_EQ(result.cipher_text().size(), number_of_blocks * AES_BLOCK_SIZE) in TEST_F()
254 uint8_t sw_out[AES_BLOCK_SIZE]; in TEST_F()
255 uint8_t iv[AES_BLOCK_SIZE]; in TEST_F()
262 reinterpret_cast<uint8_t *>(sw_out), AES_BLOCK_SIZE, in TEST_F()
264 for (size_t y = 0; y < AES_BLOCK_SIZE; ++y) { in TEST_F()
265 size_t index = x * AES_BLOCK_SIZE + y; in TEST_F()
271 ASSERT_EQ(result.initialization_vector().size(), (size_t) AES_BLOCK_SIZE) in TEST_F()
273 for (size_t x = 0; x < AES_BLOCK_SIZE; ++x) { in TEST_F()
/external/boringssl/src/include/openssl/
Daes.h68 #define AES_BLOCK_SIZE 16 macro
112 uint8_t ivec[AES_BLOCK_SIZE],
113 uint8_t ecount_buf[AES_BLOCK_SIZE],
/external/boringssl/src/crypto/cipher_extra/
De_aesgcmsiv.c424 in_len_64 > (UINT64_C(1) << 36) + AES_BLOCK_SIZE) { in aead_aes_gcm_siv_asm_open()
615 const uint8_t initial_counter[AES_BLOCK_SIZE], in gcm_siv_crypt() argument
622 OPENSSL_memcpy(counter.c, initial_counter, AES_BLOCK_SIZE); in gcm_siv_crypt()
626 uint8_t keystream[AES_BLOCK_SIZE]; in gcm_siv_crypt()
630 size_t todo = AES_BLOCK_SIZE; in gcm_siv_crypt()
708 uint8_t counter[AES_BLOCK_SIZE]; in gcm_siv_keys()
709 OPENSSL_memset(counter, 0, AES_BLOCK_SIZE - EVP_AEAD_AES_GCM_SIV_NONCE_LEN); in gcm_siv_keys()
710 OPENSSL_memcpy(counter + AES_BLOCK_SIZE - EVP_AEAD_AES_GCM_SIV_NONCE_LEN, in gcm_siv_keys()
715 uint8_t ciphertext[AES_BLOCK_SIZE]; in gcm_siv_keys()
781 in_len_64 > (UINT64_C(1) << 36) + AES_BLOCK_SIZE) { in aead_aes_gcm_siv_open_gather()
De_aesctrhmac.c157 uint8_t partial_block_buffer[AES_BLOCK_SIZE]; in aead_aes_ctr_hmac_sha256_crypt()
161 uint8_t counter[AES_BLOCK_SIZE]; in aead_aes_ctr_hmac_sha256_crypt()
185 if (in_len_64 >= (UINT64_C(1) << 32) * AES_BLOCK_SIZE) { in aead_aes_ctr_hmac_sha256_seal_scatter()
/external/boringssl/src/crypto/
Dimpl_dispatch_test.cc143 uint8_t in[AES_BLOCK_SIZE] = {0}; in TEST_F()
144 uint8_t out[AES_BLOCK_SIZE]; in TEST_F()
/external/wpa_supplicant_8/wpa_supplicant/
Dmesh_rsn.c553 if (2 + AES_BLOCK_SIZE + 2 + len > wpabuf_tailroom(buf)) { in mesh_rsn_protect_frame()
614 wpabuf_put_u8(buf, AES_BLOCK_SIZE); in mesh_rsn_protect_frame()
618 mic_payload = wpabuf_put(buf, 2 + len + AES_BLOCK_SIZE); in mesh_rsn_protect_frame()
668 if (!elems->mic || elems->mic_len < AES_BLOCK_SIZE) { in mesh_rsn_process_ampe()
678 if (crypt_len < 2 + AES_BLOCK_SIZE) { in mesh_rsn_process_ampe()
700 crypt_len -= AES_BLOCK_SIZE; in mesh_rsn_process_ampe()
/external/wpa_supplicant_8/src/common/
Ddpp.c1536 u8 wrapped_data[4 + DPP_MAX_NONCE_LEN + 4 + 1 + AES_BLOCK_SIZE]; in dpp_auth_build_req()
1676 siv_len += AES_BLOCK_SIZE; in dpp_auth_build_req()
1712 4 + 4 + DPP_MAX_HASH_LEN + AES_BLOCK_SIZE in dpp_auth_build_resp()
1714 u8 wrapped_data[DPP_AUTH_RESP_CLEAR_LEN + AES_BLOCK_SIZE]; in dpp_auth_build_resp()
1859 siv_len += AES_BLOCK_SIZE; in dpp_auth_build_resp()
2255 attr_len = 4 + clear_len + AES_BLOCK_SIZE; in dpp_build_conf_req_attr()
2305 wpabuf_put_le16(msg, wpabuf_len(clear) + AES_BLOCK_SIZE); in dpp_build_conf_req_attr()
2306 wrapped = wpabuf_put(msg, wpabuf_len(clear) + AES_BLOCK_SIZE); in dpp_build_conf_req_attr()
2315 wrapped, wpabuf_len(clear) + AES_BLOCK_SIZE); in dpp_build_conf_req_attr()
2700 u8 wrapped_r_auth[4 + DPP_MAX_HASH_LEN + AES_BLOCK_SIZE], *w_r_auth; in dpp_auth_build_resp_ok()
[all …]

12