/crypto/ |
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()
|
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() 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 …]
|
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() 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 …]
|
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 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 …]
|
D | shash.c | 46 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 …]
|
D | skcipher.c | 98 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 …]
|
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()
|
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()
|
D | xctr.c | 79 unsigned long alignmask = crypto_cipher_alignmask(tfm); in crypto_xctr_crypt_inplace() local 83 u8 *keystream = PTR_ALIGN(tmp + 0, alignmask + 1); in crypto_xctr_crypt_inplace()
|
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()
|
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 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 …]
|
D | drbg.c | 1737 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()
|