Home
last modified time | relevance | path

Searched refs:dctx (Results 1 – 25 of 48) sorted by relevance

12

/linux/arch/mips/crypto/
A Dpoly1305-glue.c27 dctx->buflen = 0; in poly1305_init_arch()
35 dctx->buflen = 0; in mips_poly1305_init()
36 dctx->rset = 0; in mips_poly1305_init()
50 dctx->rset = 1; in mips_poly1305_blocks()
78 memcpy(dctx->buf + dctx->buflen, src, bytes); in mips_poly1305_update()
84 mips_poly1305_blocks(dctx, dctx->buf, POLY1305_BLOCK_SIZE, 1); in mips_poly1305_update()
108 memcpy(dctx->buf + dctx->buflen, src, bytes); in poly1305_update_arch()
114 poly1305_blocks_mips(&dctx->h, dctx->buf, in poly1305_update_arch()
138 dctx->buf[dctx->buflen++] = 1; in poly1305_final_arch()
139 memset(dctx->buf + dctx->buflen, 0, in poly1305_final_arch()
[all …]
/linux/arch/arm64/crypto/
A Dpoly1305-glue.c35 dctx->buflen = 0; in poly1305_init_arch()
43 dctx->buflen = 0; in neon_poly1305_init()
44 dctx->rset = 0; in neon_poly1305_init()
58 dctx->rset = 1; in neon_poly1305_blocks()
87 memcpy(dctx->buf + dctx->buflen, src, bytes); in neon_poly1305_do_update()
93 neon_poly1305_blocks(dctx, dctx->buf, in neon_poly1305_do_update()
131 memcpy(dctx->buf + dctx->buflen, src, bytes); in poly1305_update_arch()
173 dctx->buf[dctx->buflen++] = 1; in poly1305_final_arch()
174 memset(dctx->buf + dctx->buflen, 0, in poly1305_final_arch()
179 poly1305_emit(&dctx->h, dst, dctx->s); in poly1305_final_arch()
[all …]
A Dpolyval-ce-glue.c96 memset(dctx, 0, sizeof(*dctx)); in polyval_arm64_init()
110 if (dctx->bytes) { in polyval_arm64_update()
111 n = min(srclen, dctx->bytes); in polyval_arm64_update()
112 pos = dctx->buffer + POLYVAL_BLOCK_SIZE - dctx->bytes; in polyval_arm64_update()
114 dctx->bytes -= n; in polyval_arm64_update()
120 if (!dctx->bytes) in polyval_arm64_update()
121 internal_polyval_mul(dctx->buffer, in polyval_arm64_update()
134 dctx->bytes = POLYVAL_BLOCK_SIZE - srclen; in polyval_arm64_update()
135 pos = dctx->buffer; in polyval_arm64_update()
148 if (dctx->bytes) { in polyval_arm64_final()
[all …]
/linux/arch/arm/crypto/
A Dpoly1305-glue.c39 dctx->buflen = 0; in poly1305_init_arch()
47 dctx->buflen = 0; in arm_poly1305_init()
48 dctx->rset = 0; in arm_poly1305_init()
62 dctx->rset = 1; in arm_poly1305_blocks()
91 memcpy(dctx->buf + dctx->buflen, src, bytes); in arm_poly1305_do_update()
97 arm_poly1305_blocks(dctx, dctx->buf, in arm_poly1305_do_update()
148 memcpy(dctx->buf + dctx->buflen, src, bytes); in poly1305_update_arch()
154 poly1305_blocks_arm(&dctx->h, dctx->buf, in poly1305_update_arch()
191 dctx->buf[dctx->buflen++] = 1; in poly1305_final_arch()
192 memset(dctx->buf + dctx->buflen, 0, in poly1305_final_arch()
[all …]
/linux/arch/powerpc/crypto/
A Dpoly1305-p10-glue.c42 dctx->buflen = 0; in crypto_poly1305_p10_init()
43 dctx->rset = 0; in crypto_poly1305_p10_init()
44 dctx->sset = false; in crypto_poly1305_p10_init()
63 dctx->rset = 1; in crypto_poly1305_setdctxkey()
85 memcpy(dctx->buf + dctx->buflen, src, bytes); in crypto_poly1305_p10_update()
91 if (likely(!crypto_poly1305_setdctxkey(dctx, dctx->buf, in crypto_poly1305_p10_update()
94 poly1305_64s(&dctx->h, dctx->buf, in crypto_poly1305_p10_update()
141 dctx->buf[dctx->buflen++] = 1; in crypto_poly1305_p10_final()
142 memset(dctx->buf + dctx->buflen, 0, in crypto_poly1305_p10_final()
145 poly1305_64s(&dctx->h, dctx->buf, POLY1305_BLOCK_SIZE, 0); in crypto_poly1305_p10_final()
[all …]
A Dghash.c50 dctx->bytes = 0; in p8_ghash_init()
89 crypto_xor((u8 *)dctx->shash, dctx->buffer, GHASH_BLOCK_SIZE); in __ghash_block()
124 if (dctx->bytes) { in p8_ghash_update()
126 memcpy(dctx->buffer + dctx->bytes, src, in p8_ghash_update()
128 dctx->bytes += srclen; in p8_ghash_update()
131 memcpy(dctx->buffer + dctx->bytes, src, in p8_ghash_update()
138 dctx->bytes = 0; in p8_ghash_update()
148 dctx->bytes = srclen; in p8_ghash_update()
159 if (dctx->bytes) { in p8_ghash_final()
161 dctx->buffer[i] = 0; in p8_ghash_final()
[all …]
/linux/crypto/
A Dpoly1305_generic.c27 dctx->buflen = 0; in crypto_poly1305_init()
28 dctx->rset = 0; in crypto_poly1305_init()
29 dctx->sset = false; in crypto_poly1305_init()
37 if (!dctx->sset) { in crypto_poly1305_setdesckey()
42 dctx->rset = 2; in crypto_poly1305_setdesckey()
51 dctx->sset = true; in crypto_poly1305_setdesckey()
68 poly1305_core_blocks(&dctx->h, &dctx->core_r, src, in poly1305_blocks()
80 memcpy(dctx->buf + dctx->buflen, src, bytes); in crypto_poly1305_update()
83 dctx->buflen += bytes; in crypto_poly1305_update()
86 poly1305_blocks(dctx, dctx->buf, in crypto_poly1305_update()
[all …]
A Dghash-generic.c50 memset(dctx, 0, sizeof(*dctx)); in ghash_init()
83 u8 *dst = dctx->buffer; in ghash_update()
85 if (dctx->bytes) { in ghash_update()
89 dctx->bytes -= n; in ghash_update()
95 if (!dctx->bytes) in ghash_update()
117 u8 *dst = dctx->buffer; in ghash_flush()
119 if (dctx->bytes) { in ghash_flush()
122 while (dctx->bytes--) in ghash_flush()
128 dctx->bytes = 0; in ghash_flush()
135 u8 *buf = dctx->buffer; in ghash_final()
[all …]
A Ddes_generic.c22 struct des_ctx *dctx = crypto_tfm_ctx(tfm); in des_setkey() local
25 err = des_expand_key(dctx, key, keylen); in des_setkey()
33 memset(dctx, 0, sizeof(*dctx)); in des_setkey()
39 const struct des_ctx *dctx = crypto_tfm_ctx(tfm); in crypto_des_encrypt() local
41 des_encrypt(dctx, dst, src); in crypto_des_encrypt()
48 des_decrypt(dctx, dst, src); in crypto_des_decrypt()
54 struct des3_ede_ctx *dctx = crypto_tfm_ctx(tfm); in des3_ede_setkey() local
57 err = des3_ede_expand_key(dctx, key, keylen); in des3_ede_setkey()
65 memset(dctx, 0, sizeof(*dctx)); in des3_ede_setkey()
74 des3_ede_encrypt(dctx, dst, src); in crypto_des3_ede_encrypt()
[all …]
A Dpolyval-generic.c147 memset(dctx, 0, sizeof(*dctx)); in polyval_init()
161 if (dctx->bytes) { in polyval_update()
162 n = min(srclen, dctx->bytes); in polyval_update()
163 pos = dctx->buffer + dctx->bytes - 1; in polyval_update()
165 dctx->bytes -= n; in polyval_update()
171 if (!dctx->bytes) in polyval_update()
178 gf128mul_4k_lle(&dctx->buffer128, ctx->gf128); in polyval_update()
184 dctx->bytes = POLYVAL_BLOCK_SIZE - srclen; in polyval_update()
185 pos = dctx->buffer + POLYVAL_BLOCK_SIZE - 1; in polyval_update()
198 if (dctx->bytes) in polyval_final()
[all …]
A Dvmac.c426 dctx->polytmp[0] = ch; in vhash_blocks()
427 dctx->polytmp[1] = cl; in vhash_blocks()
485 dctx->partial_size = 0; in vmac_init()
487 memcpy(dctx->polytmp, tctx->polykey, sizeof(dctx->polytmp)); in vmac_init()
488 dctx->nonce_size = 0; in vmac_init()
501 memcpy(&dctx->nonce.bytes[dctx->nonce_size], p, n); in vmac_update()
502 dctx->nonce_size += n; in vmac_update()
507 if (dctx->partial_size) { in vmac_update()
509 memcpy(&dctx->partial[dctx->partial_size], p, n); in vmac_update()
514 vhash_blocks(tctx, dctx, dctx->partial_words, 1); in vmac_update()
[all …]
/linux/lib/zstd/decompress/
A Dzstd_decompress.c275 dctx->inBuff = (char*)(dctx+1); in ZSTD_initStaticDCtx()
349 dctx->dictID = dctx->fParams.dictID; in ZSTD_DCtx_selectFrameDDict()
662 RETURN_ERROR_IF(dctx->fParams.dictID && (dctx->dictID != dctx->fParams.dictID), in ZSTD_decodeFrameHeader()
1272 dctx->dictEnd = dctx->previousDstEnd; in ZSTD_refDictContent()
1389 dctx->litEntropy = dctx->fseEntropy = 1; in ZSTD_decompress_insertDictionary()
1407 dctx->litEntropy = dctx->fseEntropy = 0; in ZSTD_decompressBegin()
1412 dctx->LLTptr = dctx->entropy.LLTable; in ZSTD_decompressBegin()
1413 dctx->MLTptr = dctx->entropy.MLTable; in ZSTD_decompressBegin()
1414 dctx->OFTptr = dctx->entropy.OFTable; in ZSTD_decompressBegin()
1415 dctx->HUFptr = dctx->entropy.hufTable; in ZSTD_decompressBegin()
[all …]
A Dzstd_decompress_block.c80 dctx->litBufferEnd = dctx->litBuffer + litSize; in ZSTD_allocateLiteralsBuffer()
101 dctx->litBuffer = dctx->litExtraBuffer; in ZSTD_allocateLiteralsBuffer()
102 dctx->litBufferEnd = dctx->litBuffer + litSize; in ZSTD_allocateLiteralsBuffer()
181 dctx->HUFptr, ZSTD_DCtx_get_bmi2(dctx)); in ZSTD_decodeLiteralsBlock()
185 dctx->HUFptr, ZSTD_DCtx_get_bmi2(dctx)); in ZSTD_decodeLiteralsBlock()
217 dctx->litPtr = dctx->litBuffer; in ZSTD_decodeLiteralsBlock()
258 dctx->litPtr = dctx->litBuffer; in ZSTD_decodeLiteralsBlock()
265 dctx->litBufferEnd = dctx->litPtr + litSize; in ZSTD_decodeLiteralsBlock()
303 dctx->litPtr = dctx->litBuffer; in ZSTD_decodeLiteralsBlock()
1280 if (dctx->dictEnd != dctx->dictContentEndForFuzzing) return 0;
[all …]
A Dzstd_ddict.c58 assert(dctx != NULL); in ZSTD_copyDDictParameters()
60 dctx->dictID = ddict->dictID; in ZSTD_copyDDictParameters()
61 dctx->prefixStart = ddict->dictContent; in ZSTD_copyDDictParameters()
62 dctx->virtualStart = ddict->dictContent; in ZSTD_copyDDictParameters()
64 dctx->previousDstEnd = dctx->dictEnd; in ZSTD_copyDDictParameters()
66 dctx->dictContentBeginForFuzzing = dctx->prefixStart; in ZSTD_copyDDictParameters()
67 dctx->dictContentEndForFuzzing = dctx->previousDstEnd; in ZSTD_copyDDictParameters()
70 dctx->litEntropy = 1; in ZSTD_copyDDictParameters()
71 dctx->fseEntropy = 1; in ZSTD_copyDDictParameters()
80 dctx->litEntropy = 0; in ZSTD_copyDDictParameters()
[all …]
/linux/arch/x86/crypto/
A Dpoly1305_glue.c139 dctx->buflen = 0; in poly1305_init_arch()
140 dctx->sset = true; in poly1305_init_arch()
154 dctx->rset = 1; in crypto_poly1305_setdctxkey()
175 memcpy(dctx->buf + dctx->buflen, src, bytes); in poly1305_update_arch()
182 poly1305_simd_blocks(&dctx->h, dctx->buf, POLY1305_BLOCK_SIZE, 1); in poly1305_update_arch()
183 dctx->buflen = 0; in poly1305_update_arch()
206 dctx->buf[dctx->buflen++] = 1; in poly1305_final_arch()
207 memset(dctx->buf + dctx->buflen, 0, in poly1305_final_arch()
209 poly1305_simd_blocks(&dctx->h, dctx->buf, POLY1305_BLOCK_SIZE, 0); in poly1305_final_arch()
212 poly1305_simd_emit(&dctx->h, dst, dctx->s); in poly1305_final_arch()
[all …]
A Dpolyval-clmulni_glue.c105 memset(dctx, 0, sizeof(*dctx)); in polyval_x86_init()
119 if (dctx->bytes) { in polyval_x86_update()
120 n = min(srclen, dctx->bytes); in polyval_x86_update()
121 pos = dctx->buffer + POLYVAL_BLOCK_SIZE - dctx->bytes; in polyval_x86_update()
123 dctx->bytes -= n; in polyval_x86_update()
129 if (!dctx->bytes) in polyval_x86_update()
130 internal_polyval_mul(dctx->buffer, in polyval_x86_update()
143 dctx->bytes = POLYVAL_BLOCK_SIZE - srclen; in polyval_x86_update()
144 pos = dctx->buffer; in polyval_x86_update()
157 if (dctx->bytes) { in polyval_x86_final()
[all …]
A Dghash-clmulni-intel_glue.c49 memset(dctx, 0, sizeof(*dctx)); in ghash_init()
100 u8 *dst = dctx->buffer; in ghash_update()
103 if (dctx->bytes) { in ghash_update()
107 dctx->bytes -= n; in ghash_update()
113 if (!dctx->bytes) in ghash_update()
133 u8 *dst = dctx->buffer; in ghash_flush()
135 if (dctx->bytes) { in ghash_flush()
138 while (dctx->bytes--) in ghash_flush()
146 dctx->bytes = 0; in ghash_flush()
235 memcpy(dctx, in, sizeof(*dctx)); in ghash_async_import()
[all …]
/linux/arch/riscv/crypto/
A Dghash-riscv64-glue.c83 if (dctx->bytes) { in riscv64_ghash_update()
85 memcpy(dctx->buffer + dctx->bytes, src, srclen); in riscv64_ghash_update()
86 dctx->bytes += srclen; in riscv64_ghash_update()
89 memcpy(dctx->buffer + dctx->bytes, src, in riscv64_ghash_update()
91 riscv64_ghash_blocks(tctx, dctx, dctx->buffer, in riscv64_ghash_update()
95 dctx->bytes = 0; in riscv64_ghash_update()
106 memcpy(dctx->buffer, src, srclen); in riscv64_ghash_update()
107 dctx->bytes = srclen; in riscv64_ghash_update()
119 if (dctx->bytes) { in riscv64_ghash_final()
121 dctx->buffer[i] = 0; in riscv64_ghash_final()
[all …]
/linux/arch/s390/crypto/
A Dghash_s390.c35 memset(dctx, 0, sizeof(*dctx)); in ghash_init()
59 u8 *buf = dctx->buffer; in ghash_update()
61 if (dctx->bytes) { in ghash_update()
64 n = min(srclen, dctx->bytes); in ghash_update()
65 dctx->bytes -= n; in ghash_update()
71 if (!dctx->bytes) { in ghash_update()
94 u8 *buf = dctx->buffer; in ghash_flush()
96 if (dctx->bytes) { in ghash_flush()
99 memset(pos, 0, dctx->bytes); in ghash_flush()
101 dctx->bytes = 0; in ghash_flush()
[all …]
/linux/fs/erofs/
A Ddecompressor.c383 if (++dctx->no >= dctx->outpages || !rq->outputsize) { in z_erofs_stream_switch_bufs()
388 if (dctx->kout) in z_erofs_stream_switch_bufs()
410 if (dctx->inbuf_pos == dctx->inbuf_sz && rq->inputsize) { in z_erofs_stream_switch_bufs()
411 if (++dctx->ni >= dctx->inpages) { in z_erofs_stream_switch_bufs()
421 dctx->kin = kmap_local_page(rq->in[dctx->ni]); in z_erofs_stream_switch_bufs()
422 *src = dctx->kin; in z_erofs_stream_switch_bufs()
424 if (dctx->kout) { in z_erofs_stream_switch_bufs()
426 dctx->kout = kmap_local_page(rq->out[dctx->no]); in z_erofs_stream_switch_bufs()
438 if (!dctx->bounced && rq->out[dctx->no] == rq->in[dctx->ni]) { in z_erofs_stream_switch_bufs()
439 memcpy(dctx->bounce, *src, dctx->inbuf_sz); in z_erofs_stream_switch_bufs()
[all …]
A Ddecompressor_zstd.c142 struct z_erofs_stream_dctx dctx = { in z_erofs_zstd_decompress() local
160 kunmap_local(dctx.kin); in z_erofs_zstd_decompress()
178 dctx.bounce = strm->bounce; in z_erofs_zstd_decompress()
182 dctx.inbuf_sz = in_buf.size; in z_erofs_zstd_decompress()
183 dctx.inbuf_pos = in_buf.pos; in z_erofs_zstd_decompress()
190 out_buf.size = dctx.avail_out; in z_erofs_zstd_decompress()
193 in_buf.size = dctx.inbuf_sz; in z_erofs_zstd_decompress()
194 in_buf.pos = dctx.inbuf_pos; in z_erofs_zstd_decompress()
206 if (dctx.kout) in z_erofs_zstd_decompress()
207 kunmap_local(dctx.kout); in z_erofs_zstd_decompress()
[all …]
A Ddecompressor_deflate.c104 struct z_erofs_stream_dctx dctx = { in z_erofs_deflate_decompress() local
115 dctx.kin = kmap_local_page(*rq->in); in z_erofs_deflate_decompress()
119 kunmap_local(dctx.kin); in z_erofs_deflate_decompress()
147 dctx.bounce = strm->bounce; in z_erofs_deflate_decompress()
150 dctx.avail_out = strm->z.avail_out; in z_erofs_deflate_decompress()
151 dctx.inbuf_sz = strm->z.avail_in; in z_erofs_deflate_decompress()
157 strm->z.avail_out = dctx.avail_out; in z_erofs_deflate_decompress()
158 strm->z.avail_in = dctx.inbuf_sz; in z_erofs_deflate_decompress()
174 if (dctx.kout) in z_erofs_deflate_decompress()
175 kunmap_local(dctx.kout); in z_erofs_deflate_decompress()
[all …]
A Ddecompressor_lzma.c153 struct z_erofs_stream_dctx dctx = { in z_erofs_lzma_decompress() local
170 kunmap_local(dctx.kin); in z_erofs_lzma_decompress()
192 dctx.bounce = strm->bounce; in z_erofs_lzma_decompress()
195 dctx.inbuf_sz = buf.in_size; in z_erofs_lzma_decompress()
196 dctx.inbuf_pos = buf.in_pos; in z_erofs_lzma_decompress()
203 buf.out_size = dctx.avail_out; in z_erofs_lzma_decompress()
206 buf.in_size = dctx.inbuf_sz; in z_erofs_lzma_decompress()
207 buf.in_pos = dctx.inbuf_pos; in z_erofs_lzma_decompress()
223 if (dctx.kout) in z_erofs_lzma_decompress()
224 kunmap_local(dctx.kout); in z_erofs_lzma_decompress()
[all …]
/linux/drivers/crypto/xilinx/
A Dzynqmp-sha.c83 struct zynqmp_sha_desc_ctx *dctx = shash_desc_ctx(desc); in zynqmp_sha_init() local
86 dctx->fbk_req.tfm = tctx->fbk_tfm; in zynqmp_sha_init()
87 return crypto_shash_init(&dctx->fbk_req); in zynqmp_sha_init()
92 struct zynqmp_sha_desc_ctx *dctx = shash_desc_ctx(desc); in zynqmp_sha_update() local
99 struct zynqmp_sha_desc_ctx *dctx = shash_desc_ctx(desc); in zynqmp_sha_final() local
101 return crypto_shash_final(&dctx->fbk_req, out); in zynqmp_sha_final()
106 struct zynqmp_sha_desc_ctx *dctx = shash_desc_ctx(desc); in zynqmp_sha_finup() local
113 struct zynqmp_sha_desc_ctx *dctx = shash_desc_ctx(desc); in zynqmp_sha_import() local
116 dctx->fbk_req.tfm = tctx->fbk_tfm; in zynqmp_sha_import()
117 return crypto_shash_import(&dctx->fbk_req, in); in zynqmp_sha_import()
[all …]
/linux/drivers/crypto/
A Dpadlock-sha.c34 struct padlock_sha_desc *dctx = shash_desc_ctx(desc); in padlock_sha_init() local
37 dctx->fallback.tfm = ctx->fallback; in padlock_sha_init()
38 return crypto_shash_init(&dctx->fallback); in padlock_sha_init()
44 struct padlock_sha_desc *dctx = shash_desc_ctx(desc); in padlock_sha_update() local
51 struct padlock_sha_desc *dctx = shash_desc_ctx(desc); in padlock_sha_export() local
53 return crypto_shash_export(&dctx->fallback, out); in padlock_sha_export()
58 struct padlock_sha_desc *dctx = shash_desc_ctx(desc); in padlock_sha_import() local
61 dctx->fallback.tfm = ctx->fallback; in padlock_sha_import()
62 return crypto_shash_import(&dctx->fallback, in); in padlock_sha_import()
87 err = crypto_shash_export(&dctx->fallback, &state); in padlock_sha1_finup()
[all …]

Completed in 58 milliseconds

12