Home
last modified time | relevance | path

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

/crypto/
Dablkcipher.c140 unsigned int alignmask, in ablkcipher_next_slow() argument
143 unsigned aligned_bsize = ALIGN(bsize, alignmask + 1); in ablkcipher_next_slow()
148 n = ALIGN(sizeof(struct ablkcipher_buffer), alignmask + 1); in ablkcipher_next_slow()
149 n += (aligned_bsize * 3 - (alignmask + 1) + in ablkcipher_next_slow()
150 (alignmask & ~(crypto_tfm_ctx_alignment() - 1))); in ablkcipher_next_slow()
158 dst = (u8 *)ALIGN((unsigned long)base, alignmask + 1); in ablkcipher_next_slow()
179 unsigned int alignmask) in ablkcipher_copy_iv() argument
183 unsigned aligned_bs = ALIGN(bs, alignmask + 1); in ablkcipher_copy_iv()
185 (alignmask + 1); in ablkcipher_copy_iv()
188 size += alignmask & ~(crypto_tfm_ctx_alignment() - 1); in ablkcipher_copy_iv()
[all …]
Dcipher.c23 unsigned long alignmask = crypto_tfm_alg_alignmask(tfm); in setkey_unaligned() local
28 absize = keylen + alignmask; in setkey_unaligned()
33 alignbuffer = (u8 *)ALIGN((unsigned long)buffer, alignmask + 1); in setkey_unaligned()
45 unsigned long alignmask = crypto_tfm_alg_alignmask(tfm); in setkey() local
53 if ((unsigned long)key & alignmask) in setkey()
64 unsigned long alignmask = crypto_tfm_alg_alignmask(tfm); in cipher_crypt_unaligned() local
67 u8 *tmp = (u8 *)ALIGN((unsigned long)buffer, alignmask + 1); in cipher_crypt_unaligned()
77 unsigned long alignmask = crypto_tfm_alg_alignmask(tfm); in cipher_encrypt_unaligned() local
80 if (unlikely(((unsigned long)dst | (unsigned long)src) & alignmask)) { in cipher_encrypt_unaligned()
91 unsigned long alignmask = crypto_tfm_alg_alignmask(tfm); in cipher_decrypt_unaligned() local
[all …]
Dxcbc.c53 unsigned long alignmask = crypto_shash_alignmask(parent); in crypto_xcbc_digest_setkey() local
55 u8 *consts = PTR_ALIGN(&ctx->ctx[0], alignmask + 1); in crypto_xcbc_digest_setkey()
73 unsigned long alignmask = crypto_shash_alignmask(pdesc->tfm); in crypto_xcbc_digest_init() local
76 u8 *prev = PTR_ALIGN(&ctx->ctx[0], alignmask + 1) + bs; in crypto_xcbc_digest_init()
88 unsigned long alignmask = crypto_shash_alignmask(parent); in crypto_xcbc_digest_update() local
93 u8 *odds = PTR_ALIGN(&ctx->ctx[0], alignmask + 1); in crypto_xcbc_digest_update()
134 unsigned long alignmask = crypto_shash_alignmask(parent); in crypto_xcbc_digest_final() local
139 u8 *consts = PTR_ALIGN(&tctx->ctx[0], alignmask + 1); in crypto_xcbc_digest_final()
140 u8 *odds = PTR_ALIGN(&ctx->ctx[0], alignmask + 1); in crypto_xcbc_digest_final()
192 unsigned long alignmask; in xcbc_create() local
[all …]
Dcmac.c52 unsigned long alignmask = crypto_shash_alignmask(parent); in crypto_cmac_digest_setkey() local
56 (alignmask | (__alignof__(__be64) - 1)) + 1); in crypto_cmac_digest_setkey()
106 unsigned long alignmask = crypto_shash_alignmask(pdesc->tfm); in crypto_cmac_digest_init() local
109 u8 *prev = PTR_ALIGN((void *)ctx->ctx, alignmask + 1) + bs; in crypto_cmac_digest_init()
121 unsigned long alignmask = crypto_shash_alignmask(parent); in crypto_cmac_digest_update() local
126 u8 *odds = PTR_ALIGN((void *)ctx->ctx, alignmask + 1); in crypto_cmac_digest_update()
167 unsigned long alignmask = crypto_shash_alignmask(parent); in crypto_cmac_digest_final() local
173 (alignmask | (__alignof__(__be64) - 1)) + 1); in crypto_cmac_digest_final()
174 u8 *odds = PTR_ALIGN((void *)ctx->ctx, alignmask + 1); in crypto_cmac_digest_final()
226 unsigned long alignmask; in cmac_create() local
[all …]
Dblkcipher.c73 addr = (u8 *)ALIGN((unsigned long)walk->buffer, walk->alignmask + 1); in blkcipher_done_slow()
142 unsigned int alignmask) in blkcipher_next_slow() argument
145 unsigned aligned_bsize = ALIGN(bsize, alignmask + 1); in blkcipher_next_slow()
154 n = aligned_bsize * 3 - (alignmask + 1) + in blkcipher_next_slow()
155 (alignmask & ~(crypto_tfm_ctx_alignment() - 1)); in blkcipher_next_slow()
162 alignmask + 1); in blkcipher_next_slow()
233 if (!scatterwalk_aligned(&walk->in, walk->alignmask) || in blkcipher_walk_next()
234 !scatterwalk_aligned(&walk->out, walk->alignmask)) { in blkcipher_walk_next()
247 err = blkcipher_next_slow(desc, walk, bsize, walk->alignmask); in blkcipher_walk_next()
272 unsigned aligned_bs = ALIGN(bs, walk->alignmask + 1); in blkcipher_copy_iv()
[all …]
Dahash.c42 unsigned int alignmask = walk->alignmask; in hash_walk_next() local
53 if (offset & alignmask) { in hash_walk_next()
54 unsigned int unaligned = alignmask + 1 - (offset & alignmask); in hash_walk_next()
83 unsigned int alignmask = walk->alignmask; in crypto_hash_walk_done() local
87 if (walk->entrylen && (walk->offset & alignmask) && !err) { in crypto_hash_walk_done()
90 walk->offset = ALIGN(walk->offset, alignmask + 1); in crypto_hash_walk_done()
139 walk->alignmask = crypto_ahash_alignmask(crypto_ahash_reqtfm(req)); in crypto_hash_walk_first()
157 walk->alignmask = crypto_ahash_alignmask(crypto_ahash_reqtfm(req)); in crypto_ahash_walk_first()
171 unsigned long alignmask = crypto_ahash_alignmask(tfm); in ahash_setkey_unaligned() local
176 absize = keylen + alignmask; in ahash_setkey_unaligned()
[all …]
Dshash.c34 unsigned long alignmask = crypto_shash_alignmask(tfm); in shash_setkey_unaligned() local
39 absize = keylen + (alignmask & ~(crypto_tfm_ctx_alignment() - 1)); in shash_setkey_unaligned()
44 alignbuffer = (u8 *)ALIGN((unsigned long)buffer, alignmask + 1); in shash_setkey_unaligned()
62 unsigned long alignmask = crypto_shash_alignmask(tfm); in crypto_shash_setkey() local
65 if ((unsigned long)key & alignmask) in crypto_shash_setkey()
85 unsigned long alignmask = crypto_shash_alignmask(tfm); in shash_update_unaligned() local
86 unsigned int unaligned_len = alignmask + 1 - in shash_update_unaligned()
87 ((unsigned long)data & alignmask); in shash_update_unaligned()
93 u8 *buf = PTR_ALIGN(&ubuf[0], alignmask + 1); in shash_update_unaligned()
115 unsigned long alignmask = crypto_shash_alignmask(tfm); in crypto_shash_update() local
[all …]
Dskcipher.c97 addr = (u8 *)ALIGN((unsigned long)walk->buffer, walk->alignmask + 1); in skcipher_done_slow()
193 data = PTR_ALIGN(&p->buffer[0], walk->alignmask + 1); in skcipher_walk_complete()
227 unsigned alignmask = walk->alignmask; in skcipher_next_slow() local
253 n += alignmask & ~a; in skcipher_next_slow()
256 n += (bsize - 1) & ~(alignmask | a); in skcipher_next_slow()
273 walk->dst.virt.addr = PTR_ALIGN(buffer, alignmask + 1); in skcipher_next_slow()
366 if (unlikely((walk->in.offset | walk->out.offset) & walk->alignmask)) { in skcipher_walk_next()
399 unsigned alignmask = walk->alignmask; in skcipher_copy_iv() local
406 aligned_bs = ALIGN(bs, alignmask + 1); in skcipher_copy_iv()
409 size = alignmask & ~a; in skcipher_copy_iv()
[all …]
Daead.c30 unsigned long alignmask = crypto_aead_alignmask(tfm); in setkey_unaligned() local
35 absize = keylen + alignmask; in setkey_unaligned()
40 alignbuffer = (u8 *)ALIGN((unsigned long)buffer, alignmask + 1); in setkey_unaligned()
51 unsigned long alignmask = crypto_aead_alignmask(tfm); in crypto_aead_setkey() local
54 if ((unsigned long)key & alignmask) in crypto_aead_setkey()
Dctr.c31 unsigned long alignmask = crypto_cipher_alignmask(tfm); in crypto_ctr_crypt_final() local
34 u8 *keystream = PTR_ALIGN(tmp + 0, alignmask + 1); in crypto_ctr_crypt_final()
77 unsigned long alignmask = crypto_cipher_alignmask(tfm); in crypto_ctr_crypt_inplace() local
82 u8 *keystream = PTR_ALIGN(tmp + 0, alignmask + 1); in crypto_ctr_crypt_inplace()
Dcfb.c45 const unsigned long alignmask = crypto_skcipher_alignmask(tfm); in crypto_cfb_final() local
47 u8 *stream = PTR_ALIGN(tmp + 0, alignmask + 1); in crypto_cfb_final()
Dtestmgr.c529 const unsigned int alignmask, in build_test_sglist() argument
575 offset += alignmask; in build_test_sglist()
714 unsigned int alignmask, in build_cipher_test_sglists() argument
724 err = build_test_sglist(&tsgls->src, cfg->src_divs, alignmask, in build_cipher_test_sglists()
740 alignmask, dst_total_len, NULL, NULL); in build_cipher_test_sglists()
1038 unsigned int alignmask, in build_hash_sglist() argument
1047 return build_test_sglist(tsgl, cfg->src_divs, alignmask, vec->psize, in build_hash_sglist()
1096 const unsigned int alignmask = crypto_shash_alignmask(tfm); in test_shash_vec_cfg() local
1123 err = build_hash_sglist(tsgl, vec, cfg, alignmask, divs); in test_shash_vec_cfg()
1279 const unsigned int alignmask = crypto_ahash_alignmask(tfm); in test_ahash_vec_cfg() local
[all …]
Ddrbg.c1743 unsigned int alignmask; in drbg_init_sym_kernel() local
1781 alignmask = crypto_skcipher_alignmask(sk_tfm); in drbg_init_sym_kernel()
1782 drbg->outscratchpadbuf = kmalloc(DRBG_OUTSCRATCHLEN + alignmask, in drbg_init_sym_kernel()
1789 alignmask + 1); in drbg_init_sym_kernel()
1794 return alignmask; in drbg_init_sym_kernel()