Home
last modified time | relevance | path

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

/OK3568_Linux_fs/kernel/crypto/
H A Dxcbc.c54 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()
74 unsigned long alignmask = crypto_shash_alignmask(pdesc->tfm); in crypto_xcbc_digest_init() local
77 u8 *prev = PTR_ALIGN(&ctx->ctx[0], alignmask + 1) + bs; in crypto_xcbc_digest_init()
89 unsigned long alignmask = crypto_shash_alignmask(parent); in crypto_xcbc_digest_update() local
94 u8 *odds = PTR_ALIGN(&ctx->ctx[0], alignmask + 1); in crypto_xcbc_digest_update()
135 unsigned long alignmask = crypto_shash_alignmask(parent); in crypto_xcbc_digest_final() local
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
[all …]
H A Dcmac.c53 unsigned long alignmask = crypto_shash_alignmask(parent); in crypto_cmac_digest_setkey() local
57 (alignmask | (__alignof__(__be64) - 1)) + 1); in crypto_cmac_digest_setkey()
107 unsigned long alignmask = crypto_shash_alignmask(pdesc->tfm); in crypto_cmac_digest_init() local
110 u8 *prev = PTR_ALIGN((void *)ctx->ctx, alignmask + 1) + bs; in crypto_cmac_digest_init()
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()
168 unsigned long alignmask = crypto_shash_alignmask(parent); in crypto_cmac_digest_final() local
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
[all …]
H A Dcipher.c24 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()
H A Dahash.c43 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
85 if (walk->entrylen && (walk->offset & alignmask) && !err) { in crypto_hash_walk_done()
88 walk->offset = ALIGN(walk->offset, alignmask + 1); in crypto_hash_walk_done()
129 walk->alignmask = crypto_ahash_alignmask(crypto_ahash_reqtfm(req)); in crypto_hash_walk_first()
140 unsigned long alignmask = crypto_ahash_alignmask(tfm); in ahash_setkey_unaligned() local
145 absize = keylen + alignmask; in ahash_setkey_unaligned()
150 alignbuffer = (u8 *)ALIGN((unsigned long)buffer, alignmask + 1); in ahash_setkey_unaligned()
[all …]
H A Dshash.c46 unsigned long alignmask = crypto_shash_alignmask(tfm); in shash_setkey_unaligned() local
51 absize = keylen + (alignmask & ~(crypto_tfm_ctx_alignment() - 1)); in shash_setkey_unaligned()
56 alignbuffer = (u8 *)ALIGN((unsigned long)buffer, alignmask + 1); in shash_setkey_unaligned()
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
[all …]
H A Dskcipher.c98 addr = (u8 *)ALIGN((unsigned long)walk->buffer, walk->alignmask + 1); in skcipher_done_slow()
194 data = PTR_ALIGN(&p->buffer[0], walk->alignmask + 1); in skcipher_walk_complete()
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()
274 walk->dst.virt.addr = PTR_ALIGN(buffer, alignmask + 1); in skcipher_next_slow()
367 if (unlikely((walk->in.offset | walk->out.offset) & walk->alignmask)) { in skcipher_walk_next()
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()
[all …]
H A Daead.c25 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()
H A Dctr.c32 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()
H A Dtestmgr.c559 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
754 err = build_test_sglist(&tsgls->src, cfg->src_divs, alignmask, in build_cipher_test_sglists()
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()
802 #define do_setkey(setkey_f, tfm, key, ksize, cfg, alignmask) \ argument
807 err = prepare_keybuf((key), (ksize), (cfg), (alignmask), \
1128 unsigned int alignmask, in build_hash_sglist() argument
[all …]
H A Dcfb.c46 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()
H A Ddrbg.c1737 unsigned int alignmask; in drbg_init_sym_kernel() local
1775 alignmask = crypto_skcipher_alignmask(sk_tfm); in drbg_init_sym_kernel()
1776 drbg->outscratchpadbuf = kmalloc(DRBG_OUTSCRATCHLEN + alignmask, in drbg_init_sym_kernel()
1783 alignmask + 1); in drbg_init_sym_kernel()
1788 return alignmask; in drbg_init_sym_kernel()
/OK3568_Linux_fs/kernel/drivers/crypto/rockchip/cryptodev_linux/
H A Dmain.c225 …if (unlikely(ses_ptr->alignmask && !IS_ALIGNED((unsigned long)cop->src, ses_ptr->alignmask + 1))) { in crypto_run()
227 cop->src, ses_ptr->alignmask + 1); in crypto_run()
231 …if (unlikely(ses_ptr->alignmask && !IS_ALIGNED((unsigned long)cop->dst, ses_ptr->alignmask + 1))) { in crypto_run()
233 cop->dst, ses_ptr->alignmask + 1); in crypto_run()
H A Dcryptlib.h21 int alignmask; member
91 int alignmask; member
H A Dauthenc.c63 if (ses->alignmask) { in get_userbuf_tls()
64 if (!IS_ALIGNED((unsigned long)caop->dst, ses->alignmask + 1)) in get_userbuf_tls()
66 caop->dst, ses->alignmask + 1); in get_userbuf_tls()
117 if (ses->alignmask) { in get_userbuf_srtp()
118 if (!IS_ALIGNED((unsigned long)caop->dst, ses->alignmask + 1)) in get_userbuf_srtp()
120 caop->dst, ses->alignmask + 1); in get_userbuf_srtp()
121 if (!IS_ALIGNED((unsigned long)caop->auth_src, ses->alignmask + 1)) in get_userbuf_srtp()
123 caop->auth_src, ses->alignmask + 1); in get_userbuf_srtp()
H A Dcryptlib.c193 out->alignmask = cryptodev_crypto_blkcipher_alignmask(out->async.s); in cryptodev_cipher_init()
205 out->alignmask = crypto_aead_alignmask(out->async.as); in cryptodev_cipher_init()
375 hdata->alignmask = crypto_ahash_alignmask(hdata->async.s); in cryptodev_hash_init()
H A Dioctl.c309 ses_new->alignmask = max(ses_new->cdata.alignmask, in crypto_create_session()
310 ses_new->hdata.alignmask); in crypto_create_session()
311 ddebug(2, "got alignmask %d", ses_new->alignmask); in crypto_create_session()
919 siop->alignmask = ses_ptr->alignmask; in get_session_info()
H A Dcryptodev.h166 uint32_t alignmask; member
/OK3568_Linux_fs/kernel/include/crypto/
H A Dscatterwalk.h49 unsigned int alignmask) in scatterwalk_aligned() argument
51 return !(walk->offset & alignmask); in scatterwalk_aligned()
/OK3568_Linux_fs/kernel/include/crypto/internal/
H A Dskcipher.h66 unsigned int alignmask; member
H A Dhash.h21 unsigned int alignmask; member
/OK3568_Linux_fs/kernel/include/uapi/linux/
H A Dcryptodev.h154 __u16 alignmask; /* alignment constraints */ member
/OK3568_Linux_fs/external/security/librkcrypto/include/
H A Dcryptodev.h154 __u16 alignmask; /* alignment constraints */ member