| /linux/arch/arm64/crypto/ |
| H A D | aes-neonbs-glue.c | 60 u8 rk[13 * (8 * AES_BLOCK_SIZE) + 32]; 62 } __aligned(AES_BLOCK_SIZE); 110 while (walk.nbytes >= AES_BLOCK_SIZE) { in __ecb_crypt() 111 unsigned int blocks = walk.nbytes / AES_BLOCK_SIZE; in __ecb_crypt() 115 walk.stride / AES_BLOCK_SIZE); in __ecb_crypt() 121 walk.nbytes - blocks * AES_BLOCK_SIZE); in __ecb_crypt() 172 while (walk.nbytes >= AES_BLOCK_SIZE) { in cbc_encrypt() 173 unsigned int blocks = walk.nbytes / AES_BLOCK_SIZE; in cbc_encrypt() 181 err = skcipher_walk_done(&walk, walk.nbytes % AES_BLOCK_SIZE); in cbc_encrypt() 195 while (walk.nbytes >= AES_BLOCK_SIZE) { in cbc_decrypt() [all …]
|
| /linux/net/mac80211/ |
| H A D | fils_aead.c | 28 u8 d[AES_BLOCK_SIZE], tmp[AES_BLOCK_SIZE] = {}; in aes_s2v() 35 crypto_shash_digest(desc, tmp, AES_BLOCK_SIZE, d); in aes_s2v() 41 crypto_xor(d, tmp, AES_BLOCK_SIZE); in aes_s2v() 46 if (len[i] >= AES_BLOCK_SIZE) { in aes_s2v() 49 crypto_shash_update(desc, addr[i], len[i] - AES_BLOCK_SIZE); in aes_s2v() 50 crypto_xor(d, addr[i] + len[i] - AES_BLOCK_SIZE, in aes_s2v() 51 AES_BLOCK_SIZE); in aes_s2v() 60 crypto_shash_finup(desc, d, AES_BLOCK_SIZE, v); in aes_s2v() 71 u8 v[AES_BLOCK_SIZE]; in aes_siv_encrypt() 106 memcpy(out, v, AES_BLOCK_SIZE); in aes_siv_encrypt() [all …]
|
| /linux/lib/crypto/ |
| H A D | aescfb.c | 42 int len, const u8 iv[AES_BLOCK_SIZE]) in aescfb_encrypt() argument 44 u8 ks[AES_BLOCK_SIZE]; in aescfb_encrypt() 49 crypto_xor_cpy(dst, src, ks, min(len, AES_BLOCK_SIZE)); in aescfb_encrypt() 52 dst += AES_BLOCK_SIZE; in aescfb_encrypt() 53 src += AES_BLOCK_SIZE; in aescfb_encrypt() 54 len -= AES_BLOCK_SIZE; in aescfb_encrypt() 71 int len, const u8 iv[AES_BLOCK_SIZE]) in aescfb_decrypt() argument 73 u8 ks[2][AES_BLOCK_SIZE]; in aescfb_decrypt() 78 if (len > AES_BLOCK_SIZE) in aescfb_decrypt() 86 crypto_xor_cpy(dst, src, ks[i], min(len, AES_BLOCK_SIZE)); in aescfb_decrypt() [all...] |
| H A D | aes.c | 345 u8 out[AES_BLOCK_SIZE], in aes_encrypt_generic() argument 346 const u8 in[AES_BLOCK_SIZE]) in aes_encrypt_generic() argument 403 u8 out[AES_BLOCK_SIZE], in aes_decrypt_generic() argument 404 const u8 in[AES_BLOCK_SIZE]) in aes_decrypt_generic() argument 461 u8 out[AES_BLOCK_SIZE], in aes_encrypt_arch() argument 462 const u8 in[AES_BLOCK_SIZE]) in aes_encrypt_arch() argument 468 u8 out[AES_BLOCK_SIZE], in aes_decrypt_arch() argument 469 const u8 in[AES_BLOCK_SIZE]) in aes_decrypt_arch() argument 501 void aes_encrypt(aes_encrypt_arg key, u8 out[AES_BLOCK_SIZE], in aes_encrypt() argument 502 const u8 in[AES_BLOCK_SIZE]) in aes_encrypt() argument [all …]
|
| H A D | aesgcm.c | 48 u8 kin[AES_BLOCK_SIZE] = {}; in aesgcm_expandkey() 92 u8 buf[AES_BLOCK_SIZE]; in aesgcm_mac() 110 u8 buf[AES_BLOCK_SIZE]; in aesgcm_crypt() 123 crypto_xor_cpy(dst, src, buf, min(len, AES_BLOCK_SIZE)); in aesgcm_crypt() 125 dst += AES_BLOCK_SIZE; in aesgcm_crypt() 126 src += AES_BLOCK_SIZE; in aesgcm_crypt() 127 len -= AES_BLOCK_SIZE; in aesgcm_crypt() 182 u8 tagbuf[AES_BLOCK_SIZE]; in aesgcm_decrypt() 696 u8 tagbuf[AES_BLOCK_SIZE]; in libaesgcm_init()
|
| /linux/drivers/crypto/ccp/ |
| H A D | ccp-crypto.h | 109 u8 k1[AES_BLOCK_SIZE]; 110 u8 k2[AES_BLOCK_SIZE]; 115 u8 iv[AES_BLOCK_SIZE]; 118 u8 tag[AES_BLOCK_SIZE]; 122 u8 rfc3686_iv[AES_BLOCK_SIZE]; 142 u8 iv[AES_BLOCK_SIZE]; 146 u8 buf[AES_BLOCK_SIZE]; 150 u8 pad[AES_BLOCK_SIZE]; 158 u8 iv[AES_BLOCK_SIZE]; 161 u8 buf[AES_BLOCK_SIZE]; [all …]
|
| H A D | ccp-crypto-aes.c | 34 memcpy(req->iv, rctx->iv, AES_BLOCK_SIZE); in ccp_aes_complete() 80 (req->cryptlen & (AES_BLOCK_SIZE - 1))) in ccp_aes_crypt() 87 memcpy(rctx->iv, req->iv, AES_BLOCK_SIZE); in ccp_aes_crypt() 89 iv_len = AES_BLOCK_SIZE; in ccp_aes_crypt() 217 .base.cra_blocksize = AES_BLOCK_SIZE, 257 .blocksize = AES_BLOCK_SIZE, 266 .blocksize = AES_BLOCK_SIZE, 267 .ivsize = AES_BLOCK_SIZE, 276 .ivsize = AES_BLOCK_SIZE,
|
| H A D | ccp-crypto-aes-xts.c | 70 memcpy(req->iv, rctx->iv, AES_BLOCK_SIZE); in ccp_aes_xts_complete() 164 memcpy(rctx->iv, req->iv, AES_BLOCK_SIZE); in ccp_aes_xts_crypt() 165 sg_init_one(&rctx->iv_sg, rctx->iv, AES_BLOCK_SIZE); in ccp_aes_xts_crypt() 177 rctx->cmd.u.xts.iv_len = AES_BLOCK_SIZE; in ccp_aes_xts_crypt() 249 alg->base.cra_blocksize = AES_BLOCK_SIZE; in ccp_register_aes_xts_alg() 260 alg->ivsize = AES_BLOCK_SIZE; in ccp_register_aes_xts_alg()
|
| H A D | ccp-crypto-aes-galois.c | 108 rctx->iv[AES_BLOCK_SIZE - 1] = 1; in ccp_aes_gcm_crypt() 112 iv_len = AES_BLOCK_SIZE; in ccp_aes_gcm_crypt() 172 .maxauthsize = AES_BLOCK_SIZE, 178 .cra_blocksize = AES_BLOCK_SIZE, 203 .ivsize = AES_BLOCK_SIZE,
|
| /linux/drivers/crypto/ |
| H A D | padlock-aes.c | 36 #define ecb_fetch_bytes (ecb_fetch_blocks * AES_BLOCK_SIZE) 40 #define cbc_fetch_bytes (cbc_fetch_blocks * AES_BLOCK_SIZE) 218 u8 buf[AES_BLOCK_SIZE * (MAX_ECB_FETCH_BLOCKS - 1) + PADLOCK_ALIGNMENT - 1]; in ecb_crypt_copy() 221 memcpy(tmp, in, count * AES_BLOCK_SIZE); in ecb_crypt_copy() 232 u8 buf[AES_BLOCK_SIZE * (MAX_CBC_FETCH_BLOCKS - 1) + PADLOCK_ALIGNMENT - 1]; in cbc_crypt_copy() 235 memcpy(tmp, in, count * AES_BLOCK_SIZE); in cbc_crypt_copy() 329 .cra_blocksize = AES_BLOCK_SIZE, 359 nbytes / AES_BLOCK_SIZE); in ecb_aes_encrypt() 360 nbytes &= AES_BLOCK_SIZE - 1; in ecb_aes_encrypt() 384 nbytes / AES_BLOCK_SIZE); in ecb_aes_decrypt() [all …]
|
| H A D | geode-aes.c | 173 geode_aes_crypt(tctx, in, out, AES_BLOCK_SIZE, NULL, in geode_encrypt() 188 geode_aes_crypt(tctx, in, out, AES_BLOCK_SIZE, NULL, in geode_decrypt() 224 .cra_blocksize = AES_BLOCK_SIZE, 286 round_down(nbytes, AES_BLOCK_SIZE), in geode_skcipher_crypt() 288 err = skcipher_walk_done(&walk, nbytes % AES_BLOCK_SIZE); in geode_skcipher_crypt() 321 .base.cra_blocksize = AES_BLOCK_SIZE, 332 .ivsize = AES_BLOCK_SIZE, 339 .base.cra_blocksize = AES_BLOCK_SIZE,
|
| /linux/drivers/crypto/ccree/ |
| H A D | cc_aead.h | 17 #define CCM_CONFIG_BUF_SIZE (AES_BLOCK_SIZE * 3) 52 u8 ctr_iv[AES_BLOCK_SIZE] ____cacheline_aligned; 55 u8 gcm_iv_inc1[AES_BLOCK_SIZE] ____cacheline_aligned; 56 u8 gcm_iv_inc2[AES_BLOCK_SIZE] ____cacheline_aligned; 57 u8 hkey[AES_BLOCK_SIZE] ____cacheline_aligned;
|
| H A D | cc_buffer_mgr.c | 296 AES_BLOCK_SIZE + areq_ctx->ccm_hdr_size); in cc_set_aead_conf_buf() 309 (AES_BLOCK_SIZE + areq_ctx->ccm_hdr_size), in cc_set_aead_conf_buf() 472 AES_BLOCK_SIZE, DMA_BIDIRECTIONAL); in cc_unmap_aead_request() 477 AES_BLOCK_SIZE, DMA_TO_DEVICE); in cc_unmap_aead_request() 482 AES_BLOCK_SIZE, DMA_TO_DEVICE); in cc_unmap_aead_request() 487 AES_BLOCK_SIZE, DMA_TO_DEVICE); in cc_unmap_aead_request() 494 AES_BLOCK_SIZE, DMA_TO_DEVICE); in cc_unmap_aead_request() 990 dma_addr = dma_map_single(dev, addr, AES_BLOCK_SIZE, in cc_map_aead_request() 995 AES_BLOCK_SIZE, addr); in cc_map_aead_request() 1009 dma_addr = dma_map_single(dev, areq_ctx->hkey, AES_BLOCK_SIZE, in cc_map_aead_request() [all …]
|
| /linux/lib/crypto/powerpc/ |
| H A D | aes.h | 62 u8 out[AES_BLOCK_SIZE], in aes_encrypt_arch() argument 63 const u8 in[AES_BLOCK_SIZE]) in aes_encrypt_arch() argument 71 u8 out[AES_BLOCK_SIZE], in aes_decrypt_arch() argument 72 const u8 in[AES_BLOCK_SIZE]) in aes_decrypt_arch() argument 167 u8 out[AES_BLOCK_SIZE], in aes_encrypt_arch() argument 168 const u8 in[AES_BLOCK_SIZE]) in aes_encrypt_arch() argument 196 static void aes_decrypt_arch(const struct aes_key *key, u8 out[AES_BLOCK_SIZE], in aes_decrypt_arch() argument 197 const u8 in[AES_BLOCK_SIZE]) in aes_decrypt_arch() argument
|
| /linux/net/ceph/ |
| H A D | crypto.c | 270 char iv[AES_BLOCK_SIZE] __aligned(8); in ceph_aes_crypt() 271 int pad_byte = AES_BLOCK_SIZE - (in_len & (AES_BLOCK_SIZE - 1)); in ceph_aes_crypt() 282 memcpy(iv, aes_iv, AES_BLOCK_SIZE); in ceph_aes_crypt() 312 if (pad_byte > 0 && pad_byte <= AES_BLOCK_SIZE && in ceph_aes_crypt() 343 sgt.sgl, sgt.nents, buf_len, AES_BLOCK_SIZE, in ceph_krb5_encrypt() 381 WARN_ON(data_off != AES_BLOCK_SIZE); in ceph_krb5_decrypt() 418 return AES_BLOCK_SIZE; in ceph_crypt_data_offset() 431 return data_len + AES_BLOCK_SIZE - in ceph_crypt_buflen() 432 (data_len & (AES_BLOCK_SIZE - 1)); in ceph_crypt_buflen() 435 return AES_BLOCK_SIZE + data_len + 24; in ceph_crypt_buflen()
|
| /linux/drivers/crypto/ti/ |
| H A D | dthev2-aes.c | 88 #define AES_IV_SIZE AES_BLOCK_SIZE 89 #define AES_BLOCK_WORDS (AES_BLOCK_SIZE / sizeof(u32)) 412 if (req->cryptlen % AES_BLOCK_SIZE) { in dthe_aes_crypt() 472 .cra_alignmask = AES_BLOCK_SIZE - 1, 473 .cra_blocksize = AES_BLOCK_SIZE, 495 .cra_alignmask = AES_BLOCK_SIZE - 1, 496 .cra_blocksize = AES_BLOCK_SIZE, 520 .cra_alignmask = AES_BLOCK_SIZE - 1, 521 .cra_blocksize = AES_BLOCK_SIZE,
|
| /linux/drivers/crypto/caam/ |
| H A D | caamalg_qi.c | 1487 .cra_blocksize = AES_BLOCK_SIZE, 1494 .ivsize = AES_BLOCK_SIZE, 1542 .ivsize = AES_BLOCK_SIZE, 1543 .chunksize = AES_BLOCK_SIZE, 1563 .chunksize = AES_BLOCK_SIZE, 1577 .cra_blocksize = AES_BLOCK_SIZE, 1584 .ivsize = AES_BLOCK_SIZE, 1603 .maxauthsize = AES_BLOCK_SIZE, 1622 .maxauthsize = AES_BLOCK_SIZE, 1642 .maxauthsize = AES_BLOCK_SIZE, [all …]
|
| H A D | caamalg.c | 1978 .cra_blocksize = AES_BLOCK_SIZE, 1987 .ivsize = AES_BLOCK_SIZE, 1999 .cra_blocksize = AES_BLOCK_SIZE, 2006 .ivsize = AES_BLOCK_SIZE, 2063 .ivsize = AES_BLOCK_SIZE, 2064 .chunksize = AES_BLOCK_SIZE, 2087 .chunksize = AES_BLOCK_SIZE, 2104 .cra_blocksize = AES_BLOCK_SIZE, 2111 .ivsize = AES_BLOCK_SIZE, 2141 .cra_blocksize = AES_BLOCK_SIZE, [all …]
|
| /linux/drivers/crypto/stm32/ |
| H A D | stm32-cryp.c | 144 #define AES_BLOCK_32 (AES_BLOCK_SIZE / sizeof(u32)) 668 written = min_t(size_t, AES_BLOCK_SIZE - len, alen); in stm32_cryp_write_ccm_first_header() 689 memcpy(iv, cryp->areq->iv, AES_BLOCK_SIZE); in stm32_cryp_ccm_init() 690 memset(iv + AES_BLOCK_SIZE - 1 - iv[0], 0, iv[0] + 1); in stm32_cryp_ccm_init() 691 iv[AES_BLOCK_SIZE - 1] = 1; in stm32_cryp_ccm_init() 695 memcpy(b0, iv, AES_BLOCK_SIZE); in stm32_cryp_ccm_init() 704 b0[AES_BLOCK_SIZE - 2] = textlen >> 8; in stm32_cryp_ccm_init() 705 b0[AES_BLOCK_SIZE - 1] = textlen & 0xFF; in stm32_cryp_ccm_init() 1236 if (req->cryptlen % AES_BLOCK_SIZE) in stm32_cryp_aes_ecb_encrypt() 1247 if (req->cryptlen % AES_BLOCK_SIZE) in stm32_cryp_aes_ecb_decrypt() [all …]
|
| /linux/drivers/crypto/cavium/nitrox/ |
| H A D | nitrox_skcipher.c | 390 .cra_blocksize = AES_BLOCK_SIZE, 397 .ivsize = AES_BLOCK_SIZE, 409 .cra_blocksize = AES_BLOCK_SIZE, 416 .ivsize = AES_BLOCK_SIZE, 428 .cra_blocksize = AES_BLOCK_SIZE, 435 .ivsize = AES_BLOCK_SIZE, 466 .cra_blocksize = AES_BLOCK_SIZE, 473 .ivsize = AES_BLOCK_SIZE,
|
| /linux/drivers/crypto/inside-secure/ |
| H A D | safexcel_hash.c | 354 if (unlikely(req->xcbcmac && req->processed > AES_BLOCK_SIZE)) { in safexcel_ahash_send_req() 355 if (unlikely(cache_len < AES_BLOCK_SIZE)) { in safexcel_ahash_send_req() 359 extra = AES_BLOCK_SIZE - cache_len; in safexcel_ahash_send_req() 376 for (i = 0; i < AES_BLOCK_SIZE / 4; i++) { in safexcel_ahash_send_req() 385 cache_len = AES_BLOCK_SIZE; in safexcel_ahash_send_req() 390 crypto_xor(req->cache, (const u8 *)req->state, AES_BLOCK_SIZE); in safexcel_ahash_send_req() 808 } else if (unlikely(ctx->cbcmac && req->len == AES_BLOCK_SIZE && in safexcel_ahash_final() 811 memset(areq->result, 0, AES_BLOCK_SIZE); in safexcel_ahash_final() 813 } else if (unlikely(req->xcbcmac && req->len == AES_BLOCK_SIZE && in safexcel_ahash_final() 818 for (i = 0; i < AES_BLOCK_SIZE / sizeof(u32); i++) { in safexcel_ahash_final() [all …]
|
| /linux/drivers/crypto/inside-secure/eip93/ |
| H A D | eip93-aead.c | 268 .ivsize = AES_BLOCK_SIZE, 279 .cra_blocksize = AES_BLOCK_SIZE, 296 .ivsize = AES_BLOCK_SIZE, 307 .cra_blocksize = AES_BLOCK_SIZE, 324 .ivsize = AES_BLOCK_SIZE, 335 .cra_blocksize = AES_BLOCK_SIZE, 352 .ivsize = AES_BLOCK_SIZE, 363 .cra_blocksize = AES_BLOCK_SIZE,
|
| /linux/drivers/crypto/virtio/ |
| H A D | virtio_crypto_skcipher_algs.c | 425 req->cryptlen - AES_BLOCK_SIZE, in __virtio_crypto_skcipher_do_req() 426 AES_BLOCK_SIZE, 0); in __virtio_crypto_skcipher_do_req() 477 if (req->cryptlen % AES_BLOCK_SIZE) in virtio_crypto_skcipher_encrypt() 500 if (req->cryptlen % AES_BLOCK_SIZE) in virtio_crypto_skcipher_decrypt() 554 req->cryptlen - AES_BLOCK_SIZE, in virtio_crypto_skcipher_finalize_req() 555 AES_BLOCK_SIZE, 0); in virtio_crypto_skcipher_finalize_req() 572 .base.cra_blocksize = AES_BLOCK_SIZE, 582 .ivsize = AES_BLOCK_SIZE,
|
| /linux/drivers/crypto/tegra/ |
| H A D | tegra-se-aes.c | 216 data_count = rctx->len / AES_BLOCK_SIZE; in tegra_aes_prep_cmd() 217 res_bits = (rctx->len % AES_BLOCK_SIZE) * 8; in tegra_aes_prep_cmd() 279 if (rctx->len % AES_BLOCK_SIZE) in tegra_aes_do_one_req() 280 rctx->len += AES_BLOCK_SIZE - (rctx->len % AES_BLOCK_SIZE); in tegra_aes_do_one_req() 527 .ivsize = AES_BLOCK_SIZE, 533 .cra_blocksize = AES_BLOCK_SIZE, 554 .cra_blocksize = AES_BLOCK_SIZE, 570 .ivsize = AES_BLOCK_SIZE, 592 .ivsize = AES_BLOCK_SIZE, 597 .cra_blocksize = AES_BLOCK_SIZE, [all …]
|
| /linux/drivers/crypto/qce/ |
| H A D | skcipher.c | 365 .blocksize = AES_BLOCK_SIZE, 374 .blocksize = AES_BLOCK_SIZE, 375 .ivsize = AES_BLOCK_SIZE, 384 .chunksize = AES_BLOCK_SIZE, 385 .ivsize = AES_BLOCK_SIZE, 393 .blocksize = AES_BLOCK_SIZE, 394 .ivsize = AES_BLOCK_SIZE,
|