Home
last modified time | relevance | path

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

1234

/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-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()
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()
/external/rust/crates/quiche/deps/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/cronet/third_party/boringssl/src/crypto/fipsmodule/cmac/
Dcmac.c67 uint8_t k1[AES_BLOCK_SIZE];
68 uint8_t k2[AES_BLOCK_SIZE];
70 uint8_t block[AES_BLOCK_SIZE];
142 OPENSSL_memcpy(out->k1, in->k1, AES_BLOCK_SIZE); in CMAC_CTX_copy()
143 OPENSSL_memcpy(out->k2, in->k2, AES_BLOCK_SIZE); in CMAC_CTX_copy()
144 OPENSSL_memcpy(out->block, in->block, AES_BLOCK_SIZE); in CMAC_CTX_copy()
183 static const uint8_t kZeroIV[AES_BLOCK_SIZE] = {0};
188 uint8_t scratch[AES_BLOCK_SIZE]; in CMAC_Init()
195 if ((block_size != AES_BLOCK_SIZE && block_size != 8 /* 3-DES */) || in CMAC_Init()
204 if (block_size == AES_BLOCK_SIZE) { in CMAC_Init()
[all …]
/external/boringssl/src/crypto/fipsmodule/cmac/
Dcmac.c67 uint8_t k1[AES_BLOCK_SIZE];
68 uint8_t k2[AES_BLOCK_SIZE];
70 uint8_t block[AES_BLOCK_SIZE];
142 OPENSSL_memcpy(out->k1, in->k1, AES_BLOCK_SIZE); in CMAC_CTX_copy()
143 OPENSSL_memcpy(out->k2, in->k2, AES_BLOCK_SIZE); in CMAC_CTX_copy()
144 OPENSSL_memcpy(out->block, in->block, AES_BLOCK_SIZE); in CMAC_CTX_copy()
183 static const uint8_t kZeroIV[AES_BLOCK_SIZE] = {0};
188 uint8_t scratch[AES_BLOCK_SIZE]; in CMAC_Init()
195 if ((block_size != AES_BLOCK_SIZE && block_size != 8 /* 3-DES */) || in CMAC_Init()
204 if (block_size == AES_BLOCK_SIZE) { in CMAC_Init()
[all …]
/external/rust/crates/quiche/deps/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/cronet/third_party/boringssl/src/crypto/fipsmodule/rand/
Dctrdrbg.c84 static_assert(CTR_DRBG_ENTROPY_LEN % AES_BLOCK_SIZE == 0,
104 for (size_t i = 0; i < CTR_DRBG_ENTROPY_LEN; i += AES_BLOCK_SIZE) { in ctr_drbg_update()
174 while (out_len >= AES_BLOCK_SIZE) { in CTR_DRBG_generate()
180 todo &= ~(AES_BLOCK_SIZE-1); in CTR_DRBG_generate()
181 const size_t num_blocks = todo / AES_BLOCK_SIZE; in CTR_DRBG_generate()
189 for (size_t i = 0; i < todo; i += AES_BLOCK_SIZE) { in CTR_DRBG_generate()
200 uint8_t block[AES_BLOCK_SIZE]; in CTR_DRBG_generate()
/external/boringssl/src/crypto/fipsmodule/rand/
Dctrdrbg.c84 static_assert(CTR_DRBG_ENTROPY_LEN % AES_BLOCK_SIZE == 0,
104 for (size_t i = 0; i < CTR_DRBG_ENTROPY_LEN; i += AES_BLOCK_SIZE) { in ctr_drbg_update()
174 while (out_len >= AES_BLOCK_SIZE) { in CTR_DRBG_generate()
180 todo &= ~(AES_BLOCK_SIZE-1); in CTR_DRBG_generate()
181 const size_t num_blocks = todo / AES_BLOCK_SIZE; in CTR_DRBG_generate()
189 for (size_t i = 0; i < todo; i += AES_BLOCK_SIZE) { in CTR_DRBG_generate()
200 uint8_t block[AES_BLOCK_SIZE]; in CTR_DRBG_generate()
/external/rust/crates/quiche/deps/boringssl/src/crypto/fipsmodule/aes/
Dkey_wrap.c81 uint8_t A[AES_BLOCK_SIZE]; in AES_wrap_key()
117 uint8_t A[AES_BLOCK_SIZE]; in aes_unwrap_key_inner()
174 uint8_t block[AES_BLOCK_SIZE]; in AES_wrap_key_padded()
182 *out_len = AES_BLOCK_SIZE; in AES_wrap_key_padded()
205 if (in_len < AES_BLOCK_SIZE || max_out < in_len - 8) { in AES_unwrap_key_padded()
210 if (in_len == AES_BLOCK_SIZE) { in AES_unwrap_key_padded()
211 uint8_t block[AES_BLOCK_SIZE]; in AES_unwrap_key_padded()
Daes_test.cc42 ASSERT_EQ(static_cast<unsigned>(AES_BLOCK_SIZE), plaintext.size()); in TestRaw()
43 ASSERT_EQ(static_cast<unsigned>(AES_BLOCK_SIZE), ciphertext.size()); in TestRaw()
49 uint8_t block[AES_BLOCK_SIZE]; in TestRaw()
54 OPENSSL_memcpy(block, plaintext.data(), AES_BLOCK_SIZE); in TestRaw()
65 OPENSSL_memcpy(block, ciphertext.data(), AES_BLOCK_SIZE); in TestRaw()
280 uint8_t block[AES_BLOCK_SIZE]; in TEST()
281 uint8_t buf[AES_BLOCK_SIZE * 64] = {0}; in TEST()
305 CHECK_ABI(bsaes_cbc_encrypt, buf, buf, AES_BLOCK_SIZE * blocks, &key, in TEST()
316 CHECK_ABI(vpaes_cbc_encrypt, buf, buf, AES_BLOCK_SIZE * blocks, &key, in TEST()
329 CHECK_ABI(vpaes_cbc_encrypt, buf, buf, AES_BLOCK_SIZE * blocks, &key, in TEST()
[all …]
/external/boringssl/src/crypto/fipsmodule/aes/
Dkey_wrap.c82 uint8_t A[AES_BLOCK_SIZE]; in AES_wrap_key()
119 uint8_t A[AES_BLOCK_SIZE]; in aes_unwrap_key_inner()
175 uint8_t block[AES_BLOCK_SIZE]; in AES_wrap_key_padded()
183 *out_len = AES_BLOCK_SIZE; in AES_wrap_key_padded()
209 if (in_len < AES_BLOCK_SIZE || max_out < in_len - 8) { in AES_unwrap_key_padded()
214 if (in_len == AES_BLOCK_SIZE) { in AES_unwrap_key_padded()
215 uint8_t block[AES_BLOCK_SIZE]; in AES_unwrap_key_padded()
Daes_test.cc42 ASSERT_EQ(static_cast<unsigned>(AES_BLOCK_SIZE), plaintext.size()); in TestRaw()
43 ASSERT_EQ(static_cast<unsigned>(AES_BLOCK_SIZE), ciphertext.size()); in TestRaw()
49 uint8_t block[AES_BLOCK_SIZE]; in TestRaw()
54 OPENSSL_memcpy(block, plaintext.data(), AES_BLOCK_SIZE); in TestRaw()
65 OPENSSL_memcpy(block, ciphertext.data(), AES_BLOCK_SIZE); in TestRaw()
280 uint8_t block[AES_BLOCK_SIZE]; in TEST()
281 uint8_t buf[AES_BLOCK_SIZE * 64] = {0}; in TEST()
305 CHECK_ABI(bsaes_cbc_encrypt, buf, buf, AES_BLOCK_SIZE * blocks, &key, in TEST()
316 CHECK_ABI(vpaes_cbc_encrypt, buf, buf, AES_BLOCK_SIZE * blocks, &key, in TEST()
329 CHECK_ABI(vpaes_cbc_encrypt, buf, buf, AES_BLOCK_SIZE * blocks, &key, in TEST()
[all …]
/external/cronet/third_party/boringssl/src/crypto/fipsmodule/aes/
Dkey_wrap.c82 uint8_t A[AES_BLOCK_SIZE]; in AES_wrap_key()
119 uint8_t A[AES_BLOCK_SIZE]; in aes_unwrap_key_inner()
175 uint8_t block[AES_BLOCK_SIZE]; in AES_wrap_key_padded()
183 *out_len = AES_BLOCK_SIZE; in AES_wrap_key_padded()
209 if (in_len < AES_BLOCK_SIZE || max_out < in_len - 8) { in AES_unwrap_key_padded()
214 if (in_len == AES_BLOCK_SIZE) { in AES_unwrap_key_padded()
215 uint8_t block[AES_BLOCK_SIZE]; in AES_unwrap_key_padded()
Daes_test.cc42 ASSERT_EQ(static_cast<unsigned>(AES_BLOCK_SIZE), plaintext.size()); in TestRaw()
43 ASSERT_EQ(static_cast<unsigned>(AES_BLOCK_SIZE), ciphertext.size()); in TestRaw()
49 uint8_t block[AES_BLOCK_SIZE]; in TestRaw()
54 OPENSSL_memcpy(block, plaintext.data(), AES_BLOCK_SIZE); in TestRaw()
65 OPENSSL_memcpy(block, ciphertext.data(), AES_BLOCK_SIZE); in TestRaw()
280 uint8_t block[AES_BLOCK_SIZE]; in TEST()
281 uint8_t buf[AES_BLOCK_SIZE * 64] = {0}; in TEST()
305 CHECK_ABI(bsaes_cbc_encrypt, buf, buf, AES_BLOCK_SIZE * blocks, &key, in TEST()
316 CHECK_ABI(vpaes_cbc_encrypt, buf, buf, AES_BLOCK_SIZE * blocks, &key, in TEST()
329 CHECK_ABI(vpaes_cbc_encrypt, buf, buf, AES_BLOCK_SIZE * blocks, &key, in TEST()
[all …]
/external/rust/crates/zip/src/
Daes_ctr.rs13 const AES_BLOCK_SIZE: usize = 16; constant
63 buffer: [u8; AES_BLOCK_SIZE],
96 buffer: [0u8; AES_BLOCK_SIZE], in new()
97 pos: AES_BLOCK_SIZE, in new()
111 if self.pos == AES_BLOCK_SIZE { in crypt_in_place()
123 let target_len = target.len().min(AES_BLOCK_SIZE - self.pos); in crypt_in_place()
/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/boringssl/src/include/openssl/
Daes.h68 #define AES_BLOCK_SIZE 16 macro
115 uint8_t ivec[AES_BLOCK_SIZE],
116 uint8_t ecount_buf[AES_BLOCK_SIZE],
/external/rust/crates/quiche/deps/boringssl/src/include/openssl/
Daes.h68 #define AES_BLOCK_SIZE 16 macro
115 uint8_t ivec[AES_BLOCK_SIZE],
116 uint8_t ecount_buf[AES_BLOCK_SIZE],

1234