/linux/crypto/ |
A D | xcbc.c | 54 unsigned long alignmask = crypto_shash_alignmask(parent); in crypto_xcbc_digest_setkey() local 56 u8 *consts = PTR_ALIGN(&ctx->ctx[0], alignmask + 1); in crypto_xcbc_digest_setkey() 77 u8 *prev = PTR_ALIGN(&ctx->ctx[0], alignmask + 1) + bs; in crypto_xcbc_digest_init() 94 u8 *odds = PTR_ALIGN(&ctx->ctx[0], alignmask + 1); in crypto_xcbc_digest_update() 140 u8 *consts = PTR_ALIGN(&tctx->ctx[0], alignmask + 1); in crypto_xcbc_digest_final() 141 u8 *odds = PTR_ALIGN(&ctx->ctx[0], alignmask + 1); in crypto_xcbc_digest_final() 194 unsigned long alignmask; in xcbc_create() local 221 alignmask = alg->cra_alignmask | 3; in xcbc_create() 222 inst->alg.base.cra_alignmask = alignmask; in xcbc_create() 229 (alignmask & in xcbc_create() [all …]
|
A D | cmac.c | 53 unsigned long alignmask = crypto_shash_alignmask(parent); in crypto_cmac_digest_setkey() local 57 (alignmask | (__alignof__(__be64) - 1)) + 1); in crypto_cmac_digest_setkey() 122 unsigned long alignmask = crypto_shash_alignmask(parent); in crypto_cmac_digest_update() local 127 u8 *odds = PTR_ALIGN((void *)ctx->ctx, alignmask + 1); in crypto_cmac_digest_update() 174 (alignmask | (__alignof__(__be64) - 1)) + 1); in crypto_cmac_digest_final() 175 u8 *odds = PTR_ALIGN((void *)ctx->ctx, alignmask + 1); in crypto_cmac_digest_final() 228 unsigned long alignmask; in cmac_create() local 260 alignmask = alg->cra_alignmask; in cmac_create() 261 inst->alg.base.cra_alignmask = alignmask; in cmac_create() 268 + (alignmask & ~(crypto_tfm_ctx_alignment() - 1)) in cmac_create() [all …]
|
A D | cipher.c | 24 unsigned long alignmask = crypto_cipher_alignmask(tfm); in setkey_unaligned() local 29 absize = keylen + alignmask; in setkey_unaligned() 34 alignbuffer = (u8 *)ALIGN((unsigned long)buffer, alignmask + 1); in setkey_unaligned() 47 unsigned long alignmask = crypto_cipher_alignmask(tfm); in crypto_cipher_setkey() local 52 if ((unsigned long)key & alignmask) in crypto_cipher_setkey() 62 unsigned long alignmask = crypto_cipher_alignmask(tfm); in cipher_crypt_one() local 67 if (unlikely(((unsigned long)dst | (unsigned long)src) & alignmask)) { in cipher_crypt_one() 70 u8 *tmp = (u8 *)ALIGN((unsigned long)buffer, alignmask + 1); in cipher_crypt_one()
|
A D | ahash.c | 43 unsigned int alignmask = walk->alignmask; in hash_walk_next() local 51 if (offset & alignmask) { in hash_walk_next() 52 unsigned int unaligned = alignmask + 1 - (offset & alignmask); in hash_walk_next() 81 unsigned int alignmask = walk->alignmask; in crypto_hash_walk_done() local 88 walk->offset = ALIGN(walk->offset, alignmask + 1); in crypto_hash_walk_done() 140 unsigned long alignmask = crypto_ahash_alignmask(tfm); in ahash_setkey_unaligned() local 145 absize = keylen + alignmask; in ahash_setkey_unaligned() 175 unsigned long alignmask = crypto_ahash_alignmask(tfm); in crypto_ahash_setkey() local 178 if ((unsigned long)key & alignmask) in crypto_ahash_setkey() 202 unsigned long alignmask = crypto_ahash_alignmask(tfm); in ahash_save_req() local [all …]
|
A D | shash.c | 46 unsigned long alignmask = crypto_shash_alignmask(tfm); in shash_setkey_unaligned() local 73 unsigned long alignmask = crypto_shash_alignmask(tfm); in crypto_shash_setkey() local 76 if ((unsigned long)key & alignmask) in crypto_shash_setkey() 96 unsigned long alignmask = crypto_shash_alignmask(tfm); in shash_update_unaligned() local 97 unsigned int unaligned_len = alignmask + 1 - in shash_update_unaligned() 98 ((unsigned long)data & alignmask); in shash_update_unaligned() 104 u8 *buf = PTR_ALIGN(&ubuf[0], alignmask + 1); in shash_update_unaligned() 126 unsigned long alignmask = crypto_shash_alignmask(tfm); in crypto_shash_update() local 128 if ((unsigned long)data & alignmask) in crypto_shash_update() 146 u8 *buf = PTR_ALIGN(&ubuf[0], alignmask + 1); in shash_final_unaligned() [all …]
|
A D | skcipher.c | 228 unsigned alignmask = walk->alignmask; in skcipher_next_slow() local 254 n += alignmask & ~a; in skcipher_next_slow() 257 n += (bsize - 1) & ~(alignmask | a); in skcipher_next_slow() 400 unsigned alignmask = walk->alignmask; in skcipher_copy_iv() local 407 aligned_bs = ALIGN(bs, alignmask + 1); in skcipher_copy_iv() 410 size = alignmask & ~a; in skcipher_copy_iv() 418 size += (bs - 1) & ~(alignmask | a); in skcipher_copy_iv() 425 iv = PTR_ALIGN(walk->buffer, alignmask + 1); in skcipher_copy_iv() 537 walk->alignmask = crypto_aead_alignmask(tfm); in skcipher_walk_aead_common() 582 absize = keylen + alignmask; in skcipher_setkey_unaligned() [all …]
|
A D | aead.c | 25 unsigned long alignmask = crypto_aead_alignmask(tfm); in setkey_unaligned() local 30 absize = keylen + alignmask; in setkey_unaligned() 35 alignbuffer = (u8 *)ALIGN((unsigned long)buffer, alignmask + 1); in setkey_unaligned() 46 unsigned long alignmask = crypto_aead_alignmask(tfm); in crypto_aead_setkey() local 49 if ((unsigned long)key & alignmask) in crypto_aead_setkey()
|
A D | ctr.c | 32 unsigned long alignmask = crypto_cipher_alignmask(tfm); in crypto_ctr_crypt_final() local 35 u8 *keystream = PTR_ALIGN(tmp + 0, alignmask + 1); in crypto_ctr_crypt_final() 78 unsigned long alignmask = crypto_cipher_alignmask(tfm); in crypto_ctr_crypt_inplace() local 83 u8 *keystream = PTR_ALIGN(tmp + 0, alignmask + 1); in crypto_ctr_crypt_inplace()
|
A D | testmgr.c | 559 const unsigned int alignmask, in build_test_sglist() argument 605 offset += alignmask; in build_test_sglist() 744 unsigned int alignmask, in build_cipher_test_sglists() argument 770 alignmask, dst_total_len, NULL, NULL); in build_cipher_test_sglists() 781 unsigned int alignmask, in prepare_keybuf() argument 789 key_offset += alignmask; in prepare_keybuf() 1128 unsigned int alignmask, in build_hash_sglist() argument 1192 cfg, alignmask); in test_shash_vec_cfg() 1380 cfg, alignmask); in test_ahash_vec_cfg() 1948 cfg, alignmask); in test_aead_vec_cfg() [all …]
|
A D | cfb.c | 46 const unsigned long alignmask = crypto_skcipher_alignmask(tfm); in crypto_cfb_final() local 48 u8 *stream = PTR_ALIGN(tmp + 0, alignmask + 1); in crypto_cfb_final()
|
A D | drbg.c | 1760 unsigned int alignmask; in drbg_init_sym_kernel() local 1798 alignmask = crypto_skcipher_alignmask(sk_tfm); in drbg_init_sym_kernel() 1799 drbg->outscratchpadbuf = kmalloc(DRBG_OUTSCRATCHLEN + alignmask, in drbg_init_sym_kernel() 1806 alignmask + 1); in drbg_init_sym_kernel() 1811 return alignmask; in drbg_init_sym_kernel()
|
/linux/include/crypto/ |
A D | scatterwalk.h | 49 unsigned int alignmask) in scatterwalk_aligned() argument 51 return !(walk->offset & alignmask); in scatterwalk_aligned()
|
/linux/include/crypto/internal/ |
A D | skcipher.h | 66 unsigned int alignmask; member
|
A D | hash.h | 21 unsigned int alignmask; member
|