Searched refs:AES_BLOCK_SIZE (Results 1 - 25 of 36) sorted by relevance

12

/freebsd-13-stable/contrib/wpa/src/crypto/
H A Daes-cbc.c27 u8 cbc[AES_BLOCK_SIZE];
37 os_memcpy(cbc, iv, AES_BLOCK_SIZE);
39 blocks = data_len / AES_BLOCK_SIZE;
41 for (j = 0; j < AES_BLOCK_SIZE; j++)
44 os_memcpy(pos, cbc, AES_BLOCK_SIZE);
45 pos += AES_BLOCK_SIZE;
63 u8 cbc[AES_BLOCK_SIZE], tmp[AES_BLOCK_SIZE];
73 os_memcpy(cbc, iv, AES_BLOCK_SIZE);
75 blocks = data_len / AES_BLOCK_SIZE;
[all...]
H A Daes-omac1.c21 for (i = 0; i < AES_BLOCK_SIZE - 1; i++)
23 pad[AES_BLOCK_SIZE - 1] <<= 1;
25 pad[AES_BLOCK_SIZE - 1] ^= 0x87;
47 u8 cbc[AES_BLOCK_SIZE], pad[AES_BLOCK_SIZE];
57 os_memset(cbc, 0, AES_BLOCK_SIZE);
68 while (left >= AES_BLOCK_SIZE) {
69 for (i = 0; i < AES_BLOCK_SIZE; i++) {
76 if (i + 1 == AES_BLOCK_SIZE &&
77 left == AES_BLOCK_SIZE)
[all...]
H A Daes-ccm.c32 u8 aad_buf[2 * AES_BLOCK_SIZE];
33 u8 b[AES_BLOCK_SIZE];
41 WPA_PUT_BE16(&b[AES_BLOCK_SIZE - L], plain_len);
43 wpa_hexdump_key(MSG_EXCESSIVE, "CCM B_0", b, AES_BLOCK_SIZE);
56 if (aad_len > AES_BLOCK_SIZE - 2) {
57 xor_aes_block(&aad_buf[AES_BLOCK_SIZE], x);
59 aes_encrypt(aes, &aad_buf[AES_BLOCK_SIZE], x);
66 size_t last = len % AES_BLOCK_SIZE;
69 for (i = 0; i < len / AES_BLOCK_SIZE; i++) {
72 data += AES_BLOCK_SIZE;
[all...]
H A Daes-ctr.c32 u8 counter[AES_BLOCK_SIZE], buf[AES_BLOCK_SIZE];
37 os_memcpy(counter, nonce, AES_BLOCK_SIZE);
42 len = (left < AES_BLOCK_SIZE) ? left : AES_BLOCK_SIZE;
48 for (i = AES_BLOCK_SIZE - 1; i >= 0; i--) {
H A Daes-siv.c17 static const u8 zero[AES_BLOCK_SIZE];
25 for (i = 0; i < AES_BLOCK_SIZE - 1; i++)
27 pad[AES_BLOCK_SIZE - 1] <<= 1;
29 pad[AES_BLOCK_SIZE - 1] ^= 0x87;
37 for (i = 0; i < AES_BLOCK_SIZE; i++)
56 os_memset(pad, 0, AES_BLOCK_SIZE);
59 if (len < AES_BLOCK_SIZE)
67 u8 tmp[AES_BLOCK_SIZE], tmp2[AES_BLOCK_SIZE];
76 tmp[AES_BLOCK_SIZE
[all...]
H A Daes-eax.c34 u8 nonce_mac[AES_BLOCK_SIZE], hdr_mac[AES_BLOCK_SIZE],
35 data_mac[AES_BLOCK_SIZE];
69 for (i = 0; i < AES_BLOCK_SIZE; i++)
98 u8 nonce_mac[AES_BLOCK_SIZE], hdr_mac[AES_BLOCK_SIZE],
99 data_mac[AES_BLOCK_SIZE];
139 for (i = 0; i < AES_BLOCK_SIZE; i++) {
H A Daes.h12 #define AES_BLOCK_SIZE 16 macro
H A Dcrypto_internal-cipher.c76 os_memcpy(ctx->u.aes.cbc, iv, AES_BLOCK_SIZE);
117 if (len % AES_BLOCK_SIZE)
119 blocks = len / AES_BLOCK_SIZE;
121 for (j = 0; j < AES_BLOCK_SIZE; j++)
125 os_memcpy(crypt, ctx->u.aes.cbc, AES_BLOCK_SIZE);
126 plain += AES_BLOCK_SIZE;
127 crypt += AES_BLOCK_SIZE;
181 if (len % AES_BLOCK_SIZE)
183 blocks = len / AES_BLOCK_SIZE;
185 os_memcpy(tmp, crypt, AES_BLOCK_SIZE);
[all...]
H A Daes-gcm.c19 val = WPA_GET_BE32(block + AES_BLOCK_SIZE - 4);
21 WPA_PUT_BE32(block + AES_BLOCK_SIZE - 4, val);
146 u8 cb[AES_BLOCK_SIZE], tmp[AES_BLOCK_SIZE];
155 os_memcpy(cb, icb, AES_BLOCK_SIZE);
160 xpos += AES_BLOCK_SIZE;
161 ypos += AES_BLOCK_SIZE;
184 os_memset(H, 0, AES_BLOCK_SIZE);
187 H, AES_BLOCK_SIZE);
199 os_memset(J0 + iv_len, 0, AES_BLOCK_SIZE
[all...]
H A Daes-unwrap.c29 u8 a[8], *r, b[AES_BLOCK_SIZE];
H A Daes-wrap.c28 u8 *a, *r, b[AES_BLOCK_SIZE];
H A Dcrypto_linux.c459 io[0].iov_len = AES_BLOCK_SIZE;
480 ret = read(skcipher->t, out, AES_BLOCK_SIZE);
486 if (ret < AES_BLOCK_SIZE) {
489 __func__, (int) ret, AES_BLOCK_SIZE);
686 size_t iv_len = AES_BLOCK_SIZE;
761 addr, len, mac, AES_BLOCK_SIZE);
881 iv_len = AES_BLOCK_SIZE;
/freebsd-13-stable/crypto/openssl/crypto/aes/
H A Daes_ige.c22 #define N_WORDS (AES_BLOCK_SIZE / sizeof(unsigned long))
35 # define load_block(d, s) memcpy((d).data, (s), AES_BLOCK_SIZE)
36 # define store_block(d, s) memcpy((d), (s).data, AES_BLOCK_SIZE)
53 OPENSSL_assert((length % AES_BLOCK_SIZE) == 0);
55 len = length / AES_BLOCK_SIZE;
63 aes_block_t *iv2p = (aes_block_t *) (ivec + AES_BLOCK_SIZE);
78 in += AES_BLOCK_SIZE;
79 out += AES_BLOCK_SIZE;
81 memcpy(ivec, ivp->data, AES_BLOCK_SIZE);
82 memcpy(ivec + AES_BLOCK_SIZE, iv2
[all...]
/freebsd-13-stable/crypto/openssh/
H A Dcipher-aesctr.h23 #define AES_BLOCK_SIZE 16 macro
28 u8 ctr[AES_BLOCK_SIZE]; /* counter */
H A Dcipher-aesctr.c65 memcpy(x->ctr, iv, AES_BLOCK_SIZE);
72 u8 buf[AES_BLOCK_SIZE];
77 aesctr_inc(x->ctr, AES_BLOCK_SIZE);
80 n = (n + 1) % AES_BLOCK_SIZE;
H A Dcipher-ctr.c40 u_char aes_counter[AES_BLOCK_SIZE];
64 u_char buf[AES_BLOCK_SIZE];
74 ssh_ctr_inc(c->aes_counter, AES_BLOCK_SIZE);
77 n = (n + 1) % AES_BLOCK_SIZE;
96 memcpy(c->aes_counter, iv, AES_BLOCK_SIZE);
133 aes_ctr.block_size = AES_BLOCK_SIZE;
134 aes_ctr.iv_len = AES_BLOCK_SIZE;
/freebsd-13-stable/contrib/libarchive/libarchive/
H A Darchive_cryptor_private.h53 #define AES_BLOCK_SIZE 16 macro
60 uint8_t nonce[AES_BLOCK_SIZE];
61 uint8_t encr_buf[AES_BLOCK_SIZE];
74 #define AES_BLOCK_SIZE 16 macro
80 uint8_t nonce[AES_BLOCK_SIZE];
81 uint8_t encr_buf[AES_BLOCK_SIZE];
91 #define AES_BLOCK_SIZE 16 macro
97 uint8_t nonce[AES_BLOCK_SIZE];
98 uint8_t encr_buf[AES_BLOCK_SIZE];
121 uint8_t nonce[AES_BLOCK_SIZE];
128 #define AES_BLOCK_SIZE macro
143 #define AES_BLOCK_SIZE macro
[all...]
H A Darchive_cryptor.c172 ctx->encr_pos = AES_BLOCK_SIZE;
187 r = CCCryptorUpdate(ref, ctx->nonce, AES_BLOCK_SIZE, ctx->encr_buf,
188 AES_BLOCK_SIZE, NULL);
268 ctx->encr_pos = AES_BLOCK_SIZE;
279 status = BCryptEncrypt(ctx->hKey, (PUCHAR)ctx->nonce, AES_BLOCK_SIZE,
280 NULL, NULL, 0, (PUCHAR)ctx->encr_buf, AES_BLOCK_SIZE,
310 ctx->encr_pos = AES_BLOCK_SIZE;
342 ctx->encr_pos = AES_BLOCK_SIZE;
352 aes_encrypt(&ctx->ctx, AES_BLOCK_SIZE, ctx->encr_buf, ctx->nonce);
357 aes128_encrypt(&ctx->ctx.c128, AES_BLOCK_SIZE, ct
[all...]
/freebsd-13-stable/crypto/openssl/engines/
H A De_padlock.c171 # define AES_BLOCK_SIZE 16 macro
184 unsigned char iv[AES_BLOCK_SIZE]; /* Initialization vector */
312 memcpy(cdata->iv, EVP_CIPHER_CTX_iv(ctx), AES_BLOCK_SIZE);
314 memcpy(EVP_CIPHER_CTX_iv_noconst(ctx), cdata->iv, AES_BLOCK_SIZE); local
328 if (chunk >= AES_BLOCK_SIZE)
332 while (chunk < AES_BLOCK_SIZE && nbytes != 0) {
336 while (chunk < AES_BLOCK_SIZE && nbytes != 0) {
342 EVP_CIPHER_CTX_set_num(ctx, chunk % AES_BLOCK_SIZE);
348 memcpy(cdata->iv, EVP_CIPHER_CTX_iv(ctx), AES_BLOCK_SIZE);
350 if ((chunk = nbytes & ~(AES_BLOCK_SIZE
384 memcpy(EVP_CIPHER_CTX_iv_noconst(ctx), cdata->iv, AES_BLOCK_SIZE); local
439 memcpy(EVP_CIPHER_CTX_iv_noconst(ctx), cdata->iv, AES_BLOCK_SIZE); local
[all...]
H A De_afalg.h40 # ifndef AES_BLOCK_SIZE
41 # define AES_BLOCK_SIZE 16 macro
/freebsd-13-stable/crypto/openssl/crypto/rand/
H A Ddrbg_ctr.c68 int i, outlen = AES_BLOCK_SIZE;
94 return ctr_BCC_block(ctr, ctr->KX, in_tmp, AES_BLOCK_SIZE * num_of_blk);
108 bltmp[(AES_BLOCK_SIZE * 1) + 3] = 1;
109 bltmp[(AES_BLOCK_SIZE * 2) + 3] = 2;
110 return ctr_BCC_block(ctr, ctr->KX, bltmp, num_of_blk * AES_BLOCK_SIZE);
169 int outlen = AES_BLOCK_SIZE;
203 AES_BLOCK_SIZE)
204 || outlen != AES_BLOCK_SIZE)
207 AES_BLOCK_SIZE)
208 || outlen != AES_BLOCK_SIZE)
[all...]
/freebsd-13-stable/crypto/openssl/crypto/evp/
H A De_aes_cbc_hmac_sha1.c418 if (len % AES_BLOCK_SIZE)
426 AES_BLOCK_SIZE) & -AES_BLOCK_SIZE))
429 iv = AES_BLOCK_SIZE;
492 unsigned char tail_iv[AES_BLOCK_SIZE];
498 if (len < (AES_BLOCK_SIZE + SHA_DIGEST_LENGTH + 1))
502 memcpy(EVP_CIPHER_CTX_iv_noconst(ctx), in, AES_BLOCK_SIZE);
504 in += AES_BLOCK_SIZE;
505 out += AES_BLOCK_SIZE;
506 len -= AES_BLOCK_SIZE;
[all...]
H A De_aes_cbc_hmac_sha256.c434 if (len % AES_BLOCK_SIZE)
442 AES_BLOCK_SIZE) & -AES_BLOCK_SIZE))
445 iv = AES_BLOCK_SIZE;
528 iv = AES_BLOCK_SIZE;
798 if (len < AES_BLOCK_SIZE)
800 len -= AES_BLOCK_SIZE;
808 AES_BLOCK_SIZE) & -AES_BLOCK_SIZE)
895 AES_BLOCK_SIZE, 1
[all...]
/freebsd-13-stable/contrib/wpa/src/eap_common/
H A Deap_eke_common.c49 return AES_BLOCK_SIZE + dhlen;
102 return AES_BLOCK_SIZE + 16 + mac_len;
117 return AES_BLOCK_SIZE + 2 * 16 + mac_len;
347 u8 iv[AES_BLOCK_SIZE];
361 if (random_get_bytes(iv, AES_BLOCK_SIZE))
364 iv, AES_BLOCK_SIZE);
368 os_memcpy(ret_dhcomp, iv, AES_BLOCK_SIZE);
369 os_memcpy(ret_dhcomp + AES_BLOCK_SIZE, pub, dh_len);
371 ret_dhcomp, AES_BLOCK_SIZE + dh_len);
391 os_memcpy(peer_pub, peer_dhcomp + AES_BLOCK_SIZE, d
[all...]
/freebsd-13-stable/crypto/openssl/include/openssl/
H A Daes.h28 # define AES_BLOCK_SIZE 16 macro

Completed in 201 milliseconds

12