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

12

/freebsd-11-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-11-stable/crypto/openssl/crypto/aes/
H A Daes_ige.c57 #define N_WORDS (AES_BLOCK_SIZE / sizeof(unsigned long))
73 # define load_block(d, s) memcpy((d).data, (s), AES_BLOCK_SIZE)
74 # define store_block(d, s) memcpy((d), (s).data, AES_BLOCK_SIZE)
88 OPENSSL_assert((length % AES_BLOCK_SIZE) == 0);
90 len = length / AES_BLOCK_SIZE;
98 aes_block_t *iv2p = (aes_block_t *) (ivec + AES_BLOCK_SIZE);
113 in += AES_BLOCK_SIZE;
114 out += AES_BLOCK_SIZE;
116 memcpy(ivec, ivp->data, AES_BLOCK_SIZE);
117 memcpy(ivec + AES_BLOCK_SIZE, iv2
[all...]
H A Daes_ctr.c57 unsigned char ivec[AES_BLOCK_SIZE],
58 unsigned char ecount_buf[AES_BLOCK_SIZE],
H A Daes.h71 # define AES_BLOCK_SIZE 16 macro
124 unsigned char ivec[AES_BLOCK_SIZE],
125 unsigned char ecount_buf[AES_BLOCK_SIZE],
/freebsd-11-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-11-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-11-stable/crypto/openssl/engines/
H A De_padlock.c256 # define AES_BLOCK_SIZE 16 macro
269 unsigned char iv[AES_BLOCK_SIZE]; /* Initialization vector */
685 # define EVP_CIPHER_block_size_ECB AES_BLOCK_SIZE
686 # define EVP_CIPHER_block_size_CBC AES_BLOCK_SIZE
699 AES_BLOCK_SIZE, \
874 padlock_xcrypt_ecb(nbytes / AES_BLOCK_SIZE, cdata, out_arg, in_arg);
878 memcpy(cdata->iv, ctx->iv, AES_BLOCK_SIZE);
879 iv = padlock_xcrypt_cbc(nbytes / AES_BLOCK_SIZE, cdata, out_arg,
881 memcpy(ctx->iv, iv, AES_BLOCK_SIZE);
885 memcpy(cdata->iv, ctx->iv, AES_BLOCK_SIZE);
[all...]
/freebsd-11-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-11-stable/crypto/openssl/crypto/evp/
H A De_aes_cbc_hmac_sha1.c472 if (len % AES_BLOCK_SIZE)
480 AES_BLOCK_SIZE) & -AES_BLOCK_SIZE))
483 iv = AES_BLOCK_SIZE;
545 unsigned char tail_iv[AES_BLOCK_SIZE];
551 if (len < (AES_BLOCK_SIZE + SHA_DIGEST_LENGTH + 1))
555 memcpy(ctx->iv, in, AES_BLOCK_SIZE);
556 in += AES_BLOCK_SIZE;
557 out += AES_BLOCK_SIZE;
558 len -= AES_BLOCK_SIZE;
[all...]
H A De_aes_cbc_hmac_sha256.c488 if (len % AES_BLOCK_SIZE)
496 AES_BLOCK_SIZE) & -AES_BLOCK_SIZE))
499 iv = AES_BLOCK_SIZE;
580 iv = AES_BLOCK_SIZE;
846 if (len < AES_BLOCK_SIZE)
848 len -= AES_BLOCK_SIZE;
856 AES_BLOCK_SIZE) & -AES_BLOCK_SIZE)
/freebsd-11-stable/contrib/wpa/wpa_supplicant/
H A Dmesh_rsn.c553 if (2 + AES_BLOCK_SIZE + 2 + len > wpabuf_tailroom(buf)) {
614 wpabuf_put_u8(buf, AES_BLOCK_SIZE);
618 mic_payload = wpabuf_put(buf, 2 + len + AES_BLOCK_SIZE);
668 if (!elems->mic || elems->mic_len < AES_BLOCK_SIZE) {
678 if (crypt_len < 2 + AES_BLOCK_SIZE) {
700 crypt_len -= AES_BLOCK_SIZE;

Completed in 242 milliseconds

12