/freebsd/sys/opencrypto/ |
H A D | xform_aes_cbc.c | 56 char iv[AES_BLOCK_LEN]; 71 .blocksize = AES_BLOCK_LEN, 72 .ivsize = AES_BLOCK_LEN, 91 for (u_int i = 0; i < AES_BLOCK_LEN; i++) in aes_cbc_encrypt() 94 memcpy(ctx->iv, out, AES_BLOCK_LEN); in aes_cbc_encrypt() 101 char block[AES_BLOCK_LEN]; in aes_cbc_decrypt() 103 memcpy(block, in, AES_BLOCK_LEN); in aes_cbc_decrypt() 105 for (u_int i = 0; i < AES_BLOCK_LEN; i++) in aes_cbc_decrypt() 107 memcpy(ctx->iv, block, AES_BLOCK_LEN); in aes_cbc_decrypt() 116 KASSERT(len % AES_BLOCK_LEN == 0, ("%s: invalid length", __func__)); in aes_cbc_encrypt_multi() [all …]
|
H A D | ktls_ocf.c | 79 char iv[AES_BLOCK_LEN]; 374 KASSERT(crp->crp_payload_length % AES_BLOCK_LEN == 0, in ktls_ocf_tls_cbc_encrypt() 380 memcpy(crp->crp_iv, os->iv, AES_BLOCK_LEN); in ktls_ocf_tls_cbc_encrypt() 382 memcpy(crp->crp_iv, hdr + 1, AES_BLOCK_LEN); in ktls_ocf_tls_cbc_encrypt() 407 KASSERT(os->mac_len + pad + 1 >= AES_BLOCK_LEN, in ktls_ocf_tls_cbc_encrypt() 409 memcpy(os->iv, m->m_epg_trail + m->m_epg_trllen - AES_BLOCK_LEN, in ktls_ocf_tls_cbc_encrypt() 410 AES_BLOCK_LEN); in ktls_ocf_tls_cbc_encrypt() 460 if (tls_len % AES_BLOCK_LEN != 0 || in ktls_ocf_tls_cbc_decrypt() 461 tls_len < AES_BLOCK_LEN + roundup2(os->mac_len + 1, AES_BLOCK_LEN)) in ktls_ocf_tls_cbc_decrypt() [all...] |
H A D | xform_aes_icm.c | 85 .native_blocksize = AES_BLOCK_LEN, 86 .ivsize = AES_BLOCK_LEN, 104 .native_blocksize = AES_BLOCK_LEN, 126 .native_blocksize = AES_BLOCK_LEN,
|
H A D | xform_enc.h | 42 #define AESICM_BLOCKSIZE AES_BLOCK_LEN
|
H A D | xform_aes_xts.c | 66 .blocksize = AES_BLOCK_LEN,
|
/freebsd/sys/crypto/armv8/ |
H A D | armv8_crypto_wrap.c | 102 const uint8_t iv[static AES_BLOCK_LEN]) in armv8_aes_encrypt_cbc() argument 105 uint8_t block[AES_BLOCK_LEN], *from, *to; in armv8_aes_encrypt_cbc() 108 KASSERT(len % AES_BLOCK_LEN == 0, in armv8_aes_encrypt_cbc() 117 if (seglen < AES_BLOCK_LEN) { in armv8_aes_encrypt_cbc() 118 crypto_cursor_copydata(fromc, AES_BLOCK_LEN, block); in armv8_aes_encrypt_cbc() 124 crypto_cursor_copyback(toc, AES_BLOCK_LEN, block); in armv8_aes_encrypt_cbc() 125 seglen = AES_BLOCK_LEN; in armv8_aes_encrypt_cbc() 127 for (oseglen = seglen; seglen >= AES_BLOCK_LEN; in armv8_aes_encrypt_cbc() 128 seglen -= AES_BLOCK_LEN) { in armv8_aes_encrypt_cbc() 135 from += AES_BLOCK_LEN; in armv8_aes_encrypt_cbc() [all …]
|
H A D | armv8_crypto.h | 33 #define AES_SCHED_LEN ((AES256_ROUNDS + 1) * AES_BLOCK_LEN) 66 const uint8_t iv[static AES_BLOCK_LEN]); 69 const uint8_t[static AES_BLOCK_LEN]); 84 const uint8_t[AES_BLOCK_LEN]); 87 const uint8_t[AES_BLOCK_LEN]);
|
H A D | armv8_crypto.c | 183 if (csp->csp_ivlen != AES_BLOCK_LEN) in armv8_crypto_probesession() 309 uint8_t iv[AES_BLOCK_LEN], tag[GMAC_DIGEST_LEN]; in armv8_crypto_cipher_process() 350 if ((crp->crp_payload_length % AES_BLOCK_LEN) != 0) { in armv8_crypto_cipher_process()
|
/freebsd/sys/crypto/aesni/ |
H A D | aesni_wrap.c | 55 const uint8_t *from, uint8_t *to, const uint8_t iv[static AES_BLOCK_LEN]) in aesni_encrypt_cbc() argument 60 len /= AES_BLOCK_LEN; in aesni_encrypt_cbc() 67 from += AES_BLOCK_LEN; in aesni_encrypt_cbc() 68 to += AES_BLOCK_LEN; in aesni_encrypt_cbc() 74 uint8_t *buf, const uint8_t iv[static AES_BLOCK_LEN]) in aesni_decrypt_cbc() argument 82 cnt = len / AES_BLOCK_LEN / 8; in aesni_decrypt_cbc() 93 buf += AES_BLOCK_LEN * 8; in aesni_decrypt_cbc() 96 cnt = len / AES_BLOCK_LEN; in aesni_decrypt_cbc() 102 buf += AES_BLOCK_LEN; in aesni_decrypt_cbc() 116 cnt = len / AES_BLOCK_LEN / 8; in aesni_encrypt_ecb() [all …]
|
H A D | aesni.h | 47 #define AES_SCHED_LEN ((AES256_ROUNDS + 1) * AES_BLOCK_LEN) 80 const uint8_t iv[__min_size(AES_BLOCK_LEN)]); 82 size_t len, uint8_t *buf, const uint8_t iv[__min_size(AES_BLOCK_LEN)]); 89 const uint8_t iv[__min_size(AES_BLOCK_LEN)]); 94 const uint8_t iv[__min_size(AES_BLOCK_LEN)]); 98 const uint8_t iv[__min_size(AES_BLOCK_LEN)]);
|
/freebsd/sys/net80211/ |
H A D | ieee80211_crypto_ccmp.c | 55 #define AES_BLOCK_LEN 16 macro 345 uint8_t b0[AES_BLOCK_LEN], uint8_t aad[2 * AES_BLOCK_LEN], in ccmp_init_blocks() argument 346 uint8_t auth[AES_BLOCK_LEN], uint8_t s0[AES_BLOCK_LEN]) in ccmp_init_blocks() argument 426 xor_block(auth, aad, AES_BLOCK_LEN); in ccmp_init_blocks() 428 xor_block(auth, &aad[AES_BLOCK_LEN], AES_BLOCK_LEN); in ccmp_init_blocks() 454 uint8_t aad[2 * AES_BLOCK_LEN], b0[AES_BLOCK_LEN], b[AES_BLOCK_LEN], in ccmp_encrypt() 455 e[AES_BLOCK_LEN], s0[AES_BLOCK_LEN]; in ccmp_encrypt() 475 while (space >= AES_BLOCK_LEN) { in ccmp_encrypt() 476 CCMP_ENCRYPT(i, b, b0, pos, e, AES_BLOCK_LEN); in ccmp_encrypt() 477 pos += AES_BLOCK_LEN, space -= AES_BLOCK_LEN; in ccmp_encrypt() [all …]
|
/freebsd/sys/crypto/openssl/ |
H A D | ossl_arm.h | 43 #define BSAES_KEY_SIZE (128 * (RIJNDAEL_MAXNR - 1) + 2 * AES_BLOCK_LEN) 72 length /= AES_BLOCK_LEN; in AES_CBC_ENCRYPT() 73 memcpy(iv32, iv, AES_BLOCK_LEN); in AES_CBC_ENCRYPT() 76 memcpy(scratch, in, AES_BLOCK_LEN); in AES_CBC_ENCRYPT() 86 memcpy(iv32, out, AES_BLOCK_LEN); in AES_CBC_ENCRYPT() 87 in += AES_BLOCK_LEN; in AES_CBC_ENCRYPT() 88 out += AES_BLOCK_LEN; in AES_CBC_ENCRYPT() 91 memcpy(iv, iv32, AES_BLOCK_LEN); in AES_CBC_ENCRYPT()
|
H A D | ossl_aes.c | 55 .blocksize = AES_BLOCK_LEN, 56 .ivsize = AES_BLOCK_LEN, 178 unsigned char iv[AES_BLOCK_LEN], tag[AES_BLOCK_LEN]; in ossl_aes_gcm()
|
/freebsd/sys/contrib/openzfs/module/icp/algs/aes/ |
H A D | aes_modes.c | 80 out, AES_BLOCK_LEN, aes_encrypt_block, aes_copy_block, in aes_encrypt_contiguous_blocks() 84 out, AES_BLOCK_LEN, aes_encrypt_block, aes_copy_block, in aes_encrypt_contiguous_blocks() 105 out, AES_BLOCK_LEN, aes_encrypt_block, aes_copy_block, in aes_decrypt_contiguous_blocks() 109 out, AES_BLOCK_LEN, aes_encrypt_block, aes_copy_block, in aes_decrypt_contiguous_blocks()
|
H A D | aes_impl.c | 126 uint32_t buffer[AES_BLOCK_LEN / sizeof (uint32_t)]; in aes_encrypt_block() 135 memcpy(&buffer, pt, AES_BLOCK_LEN); in aes_encrypt_block() 146 memcpy(ct, &buffer, AES_BLOCK_LEN); in aes_encrypt_block() 173 uint32_t buffer[AES_BLOCK_LEN / sizeof (uint32_t)]; in aes_decrypt_block() 182 memcpy(&buffer, ct, AES_BLOCK_LEN); in aes_decrypt_block() 193 memcpy(pt, &buffer, AES_BLOCK_LEN); in aes_decrypt_block()
|
/freebsd/sys/contrib/openzfs/module/icp/io/ |
H A D | aes.c | 234 ciphertext, AES_BLOCK_LEN, aes_encrypt_block, in aes_encrypt_atomic() 241 ciphertext, AES_BLOCK_LEN, aes_encrypt_block, in aes_encrypt_atomic() 337 plaintext, AES_BLOCK_LEN, aes_encrypt_block, in aes_decrypt_atomic() 349 plaintext, AES_BLOCK_LEN, aes_encrypt_block, in aes_decrypt_atomic() 475 kmflag, is_encrypt_init, AES_BLOCK_LEN, aes_encrypt_block, in aes_common_init_ctx() 484 AES_BLOCK_LEN, aes_encrypt_block, aes_copy_block, in aes_common_init_ctx()
|
/freebsd/crypto/openssh/ |
H A D | umac.c | 155 #define AES_BLOCK_LEN 16 macro 187 UINT8 in_buf[AES_BLOCK_LEN] = {0}; in kdf() 188 UINT8 out_buf[AES_BLOCK_LEN]; in kdf() 193 in_buf[AES_BLOCK_LEN-9] = ndx; in kdf() 194 in_buf[AES_BLOCK_LEN-1] = i = 1; in kdf() 196 while (nbytes >= AES_BLOCK_LEN) { in kdf() 198 memcpy(dst_buf,out_buf,AES_BLOCK_LEN); in kdf() 199 in_buf[AES_BLOCK_LEN-1] = ++i; in kdf() 200 nbytes -= AES_BLOCK_LEN; in kdf() 201 dst_buf += AES_BLOCK_LEN; in kdf() [all …]
|
/freebsd/sys/contrib/openzfs/module/icp/include/aes/ |
H A D | aes_impl.h | 45 #define AES_BLOCK_LEN 16 /* bytes */ macro 47 #define RC_LENGTH (5 * ((AES_BLOCK_LEN) / 4 - 2))
|
/freebsd/sys/crypto/via/ |
H A D | padlock_cipher.c | 188 uint8_t iv[AES_BLOCK_LEN] __aligned(16); in padlock_cipher_process() 225 padlock_cbc(abuf, abuf, crp->crp_payload_length / AES_BLOCK_LEN, key, in padlock_cipher_process()
|
H A D | padlock.c | 144 if (csp->csp_ivlen != AES_BLOCK_LEN) in padlock_probesession() 211 if ((crp->crp_payload_length % AES_BLOCK_LEN) != 0) { in padlock_process()
|
/freebsd/sys/crypto/openssl/amd64/ |
H A D | ossl_aes_gcm.c | 120 ares = (ares + 1) % AES_BLOCK_LEN; in gcm_aad_avx512() 132 lenblks = len & ((size_t)(-AES_BLOCK_LEN)); in gcm_aad_avx512() 312 if ((i = (len & (size_t)-AES_BLOCK_LEN))) { in gcm_aad_aesni() 462 res = MIN(len, (AES_BLOCK_LEN - ctx->gcm.mres) % AES_BLOCK_LEN); in gcm_encrypt_aesni() 624 res = MIN(len, (AES_BLOCK_LEN - ctx->gcm.mres) % AES_BLOCK_LEN); in gcm_decrypt_aesni()
|
/freebsd/tests/sys/opencrypto/ |
H A D | cryptodevh.py | 144 AES_BLOCK_LEN = RIJNDAEL128_BLOCK_LEN variable 146 EALG_MAX_BLOCK_LEN = AES_BLOCK_LEN
|
/freebsd/sys/dev/cxgbe/crypto/ |
H A D | t6_kern_tls.c | 413 explicit_iv_size = AES_BLOCK_LEN; in t6_tls_tag_alloc() 554 V_SCMD_IV_SIZE(AES_BLOCK_LEN / 2) | V_SCMD_NUM_IVS(0); in t6_tls_tag_alloc() 693 AES_BLOCK_LEN); in ktls_tcp_payload_length() 737 return (rounddown(offset, AES_BLOCK_LEN)); in ktls_payload_offset() 809 imm_len += AES_BLOCK_LEN; in ktls_wr_len() 1436 AES_BLOCK_LEN); in ktls_write_tls_wr() 1556 imm_len += AES_BLOCK_LEN; in ktls_write_tls_wr() 1666 cipher_start = AES_BLOCK_LEN + 1; in ktls_write_tls_wr() 1789 offset / AES_BLOCK_LEN); in ktls_write_tls_wr() 1791 memcpy(iv, hdr + 1, AES_BLOCK_LEN); in ktls_write_tls_wr() [all...] |
/freebsd/sys/crypto/ccp/ |
H A D | ccp_hardware.c | 1363 csp->csp_ivlen < AES_BLOCK_LEN) in ccp_collect_iv() 1364 memset(&iv[csp->csp_ivlen], 0, AES_BLOCK_LEN - csp->csp_ivlen); in ccp_collect_iv() 1375 ccp_byteswap(iv, AES_BLOCK_LEN); in ccp_collect_iv() 1483 if ((crp->crp_payload_length % AES_BLOCK_LEN) != 0) { in ccp_do_blkcipher() 1495 if ((qp->cq_sg_crp->sg_segs[i].ss_len % AES_BLOCK_LEN) != 0) { in ccp_do_blkcipher() 1506 iv_len = AES_BLOCK_LEN; in ccp_do_blkcipher() 1950 if ((qp->cq_sg_ulptx->sg_segs[i].ss_len % AES_BLOCK_LEN) != 0) { in ccp_gcm() 1969 s->blkcipher.iv, AES_BLOCK_LEN); in ccp_gcm()
|
/freebsd/sys/dev/cxgbe/tom/ |
H A D | t4_tls.c | 250 explicit_iv_size = AES_BLOCK_LEN; in tls_alloc_ktls() 351 AES_BLOCK_LEN + 1, 16)) 590 MPASS(toep->tls.iv_len <= AES_BLOCK_LEN); in t4_push_ktls() 591 wr_len += AES_BLOCK_LEN; in t4_push_ktls() 676 buf += AES_BLOCK_LEN; in t4_push_ktls()
|