Home
last modified time | relevance | path

Searched refs:alignmask (Results 1 – 17 of 17) sorted by relevance

/linux-4.19.296/crypto/
Dcipher.c28 unsigned long alignmask = crypto_tfm_alg_alignmask(tfm); in setkey_unaligned() local
33 absize = keylen + alignmask; in setkey_unaligned()
38 alignbuffer = (u8 *)ALIGN((unsigned long)buffer, alignmask + 1); in setkey_unaligned()
50 unsigned long alignmask = crypto_tfm_alg_alignmask(tfm); in setkey() local
58 if ((unsigned long)key & alignmask) in setkey()
69 unsigned long alignmask = crypto_tfm_alg_alignmask(tfm); in cipher_crypt_unaligned() local
72 u8 *tmp = (u8 *)ALIGN((unsigned long)buffer, alignmask + 1); in cipher_crypt_unaligned()
82 unsigned long alignmask = crypto_tfm_alg_alignmask(tfm); in cipher_encrypt_unaligned() local
85 if (unlikely(((unsigned long)dst | (unsigned long)src) & alignmask)) { in cipher_encrypt_unaligned()
96 unsigned long alignmask = crypto_tfm_alg_alignmask(tfm); in cipher_decrypt_unaligned() local
[all …]
Dablkcipher.c145 unsigned int alignmask, in ablkcipher_next_slow() argument
148 unsigned aligned_bsize = ALIGN(bsize, alignmask + 1); in ablkcipher_next_slow()
153 n = ALIGN(sizeof(struct ablkcipher_buffer), alignmask + 1); in ablkcipher_next_slow()
154 n += (aligned_bsize * 3 - (alignmask + 1) + in ablkcipher_next_slow()
155 (alignmask & ~(crypto_tfm_ctx_alignment() - 1))); in ablkcipher_next_slow()
163 dst = (u8 *)ALIGN((unsigned long)base, alignmask + 1); in ablkcipher_next_slow()
184 unsigned int alignmask) in ablkcipher_copy_iv() argument
188 unsigned aligned_bs = ALIGN(bs, alignmask + 1); in ablkcipher_copy_iv()
190 (alignmask + 1); in ablkcipher_copy_iv()
193 size += alignmask & ~(crypto_tfm_ctx_alignment() - 1); in ablkcipher_copy_iv()
[all …]
Dxcbc.c63 unsigned long alignmask = crypto_shash_alignmask(parent); in crypto_xcbc_digest_setkey() local
66 u8 *consts = PTR_ALIGN(&ctx->ctx[0], alignmask + 1); in crypto_xcbc_digest_setkey()
83 unsigned long alignmask = crypto_shash_alignmask(pdesc->tfm); in crypto_xcbc_digest_init() local
86 u8 *prev = PTR_ALIGN(&ctx->ctx[0], alignmask + 1) + bs; in crypto_xcbc_digest_init()
98 unsigned long alignmask = crypto_shash_alignmask(parent); in crypto_xcbc_digest_update() local
103 u8 *odds = PTR_ALIGN(&ctx->ctx[0], alignmask + 1); in crypto_xcbc_digest_update()
144 unsigned long alignmask = crypto_shash_alignmask(parent); in crypto_xcbc_digest_final() local
149 u8 *consts = PTR_ALIGN(&tctx->ctx[0], alignmask + 1); in crypto_xcbc_digest_final()
150 u8 *odds = PTR_ALIGN(&ctx->ctx[0], alignmask + 1); in crypto_xcbc_digest_final()
202 unsigned long alignmask; in xcbc_create() local
[all …]
Dcmac.c57 unsigned long alignmask = crypto_shash_alignmask(parent); in crypto_cmac_digest_setkey() local
61 (alignmask | (__alignof__(__be64) - 1)) + 1); in crypto_cmac_digest_setkey()
111 unsigned long alignmask = crypto_shash_alignmask(pdesc->tfm); in crypto_cmac_digest_init() local
114 u8 *prev = PTR_ALIGN((void *)ctx->ctx, alignmask + 1) + bs; in crypto_cmac_digest_init()
126 unsigned long alignmask = crypto_shash_alignmask(parent); in crypto_cmac_digest_update() local
131 u8 *odds = PTR_ALIGN((void *)ctx->ctx, alignmask + 1); in crypto_cmac_digest_update()
172 unsigned long alignmask = crypto_shash_alignmask(parent); in crypto_cmac_digest_final() local
178 (alignmask | (__alignof__(__be64) - 1)) + 1); in crypto_cmac_digest_final()
179 u8 *odds = PTR_ALIGN((void *)ctx->ctx, alignmask + 1); in crypto_cmac_digest_final()
231 unsigned long alignmask; in cmac_create() local
[all …]
Dblkcipher.c78 addr = (u8 *)ALIGN((unsigned long)walk->buffer, walk->alignmask + 1); in blkcipher_done_slow()
147 unsigned int alignmask) in blkcipher_next_slow() argument
150 unsigned aligned_bsize = ALIGN(bsize, alignmask + 1); in blkcipher_next_slow()
159 n = aligned_bsize * 3 - (alignmask + 1) + in blkcipher_next_slow()
160 (alignmask & ~(crypto_tfm_ctx_alignment() - 1)); in blkcipher_next_slow()
167 alignmask + 1); in blkcipher_next_slow()
238 if (!scatterwalk_aligned(&walk->in, walk->alignmask) || in blkcipher_walk_next()
239 !scatterwalk_aligned(&walk->out, walk->alignmask)) { in blkcipher_walk_next()
252 err = blkcipher_next_slow(desc, walk, bsize, walk->alignmask); in blkcipher_walk_next()
277 unsigned aligned_bs = ALIGN(bs, walk->alignmask + 1); in blkcipher_copy_iv()
[all …]
Dahash.c47 unsigned int alignmask = walk->alignmask; in hash_walk_next() local
58 if (offset & alignmask) { in hash_walk_next()
59 unsigned int unaligned = alignmask + 1 - (offset & alignmask); in hash_walk_next()
88 unsigned int alignmask = walk->alignmask; in crypto_hash_walk_done() local
92 if (walk->entrylen && (walk->offset & alignmask) && !err) { in crypto_hash_walk_done()
95 walk->offset = ALIGN(walk->offset, alignmask + 1); in crypto_hash_walk_done()
144 walk->alignmask = crypto_ahash_alignmask(crypto_ahash_reqtfm(req)); in crypto_hash_walk_first()
162 walk->alignmask = crypto_ahash_alignmask(crypto_ahash_reqtfm(req)); in crypto_ahash_walk_first()
176 unsigned long alignmask = crypto_ahash_alignmask(tfm); in ahash_setkey_unaligned() local
181 absize = keylen + alignmask; in ahash_setkey_unaligned()
[all …]
Dshash.c51 unsigned long alignmask = crypto_shash_alignmask(tfm); in shash_setkey_unaligned() local
56 absize = keylen + (alignmask & ~(crypto_tfm_ctx_alignment() - 1)); in shash_setkey_unaligned()
61 alignbuffer = (u8 *)ALIGN((unsigned long)buffer, alignmask + 1); in shash_setkey_unaligned()
79 unsigned long alignmask = crypto_shash_alignmask(tfm); in crypto_shash_setkey() local
82 if ((unsigned long)key & alignmask) in crypto_shash_setkey()
109 unsigned long alignmask = crypto_shash_alignmask(tfm); in shash_update_unaligned() local
110 unsigned int unaligned_len = alignmask + 1 - in shash_update_unaligned()
111 ((unsigned long)data & alignmask); in shash_update_unaligned()
112 u8 ubuf[shash_align_buffer_size(unaligned_len, alignmask)] in shash_update_unaligned()
114 u8 *buf = PTR_ALIGN(&ubuf[0], alignmask + 1); in shash_update_unaligned()
[all …]
Dskcipher.c102 addr = (u8 *)ALIGN((unsigned long)walk->buffer, walk->alignmask + 1); in skcipher_done_slow()
198 data = PTR_ALIGN(&p->buffer[0], walk->alignmask + 1); in skcipher_walk_complete()
232 unsigned alignmask = walk->alignmask; in skcipher_next_slow() local
258 n += alignmask & ~a; in skcipher_next_slow()
261 n += (bsize - 1) & ~(alignmask | a); in skcipher_next_slow()
278 walk->dst.virt.addr = PTR_ALIGN(buffer, alignmask + 1); in skcipher_next_slow()
371 if (unlikely((walk->in.offset | walk->out.offset) & walk->alignmask)) { in skcipher_walk_next()
404 unsigned alignmask = walk->alignmask; in skcipher_copy_iv() local
411 aligned_bs = ALIGN(bs, alignmask + 1); in skcipher_copy_iv()
414 size = alignmask & ~a; in skcipher_copy_iv()
[all …]
Daead.c35 unsigned long alignmask = crypto_aead_alignmask(tfm); in setkey_unaligned() local
40 absize = keylen + alignmask; in setkey_unaligned()
45 alignbuffer = (u8 *)ALIGN((unsigned long)buffer, alignmask + 1); in setkey_unaligned()
56 unsigned long alignmask = crypto_aead_alignmask(tfm); in crypto_aead_setkey() local
59 if ((unsigned long)key & alignmask) in crypto_aead_setkey()
Dctr.c59 unsigned long alignmask = crypto_cipher_alignmask(tfm); in crypto_ctr_crypt_final() local
62 u8 *keystream = PTR_ALIGN(tmp + 0, alignmask + 1); in crypto_ctr_crypt_final()
105 unsigned long alignmask = crypto_cipher_alignmask(tfm); in crypto_ctr_crypt_inplace() local
110 u8 *keystream = PTR_ALIGN(tmp + 0, alignmask + 1); in crypto_ctr_crypt_inplace()
Dcfb.c56 const unsigned long alignmask = crypto_skcipher_alignmask(tfm); in crypto_cfb_final() local
58 u8 *stream = PTR_ALIGN(tmp + 0, alignmask + 1); in crypto_cfb_final()
Dtestmgr.c580 unsigned int alignmask; in test_hash() local
592 alignmask = crypto_tfm_alg_alignmask(&tfm->base); in test_hash()
593 if (alignmask) { in test_hash()
596 alignmask + 1); in test_hash()
987 unsigned int alignmask; in test_aead() local
1005 alignmask = crypto_tfm_alg_alignmask(&tfm->base); in test_aead()
1006 if (alignmask) { in test_aead()
1009 alignmask + 1); in test_aead()
1349 unsigned int alignmask; in test_skcipher() local
1367 alignmask = crypto_tfm_alg_alignmask(&tfm->base); in test_skcipher()
[all …]
Ddrbg.c1734 unsigned int alignmask; in drbg_init_sym_kernel() local
1772 alignmask = crypto_skcipher_alignmask(sk_tfm); in drbg_init_sym_kernel()
1773 drbg->outscratchpadbuf = kmalloc(DRBG_OUTSCRATCHLEN + alignmask, in drbg_init_sym_kernel()
1780 alignmask + 1); in drbg_init_sym_kernel()
1785 return alignmask; in drbg_init_sym_kernel()
/linux-4.19.296/include/crypto/
Dscatterwalk.h54 unsigned int alignmask) in scatterwalk_aligned() argument
56 return !(walk->offset & alignmask); in scatterwalk_aligned()
Dalgapi.h118 unsigned int alignmask; member
/linux-4.19.296/include/crypto/internal/
Dskcipher.h70 unsigned int alignmask; member
Dhash.h26 unsigned int alignmask; member