Home
last modified time | relevance | path

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

/Linux-v5.4/drivers/crypto/vmx/
Dghash.c47 struct p8_ghash_desc_ctx *dctx = shash_desc_ctx(desc); in p8_ghash_init() local
49 dctx->bytes = 0; in p8_ghash_init()
50 memset(dctx->shash, 0, GHASH_DIGEST_SIZE); in p8_ghash_init()
76 struct p8_ghash_desc_ctx *dctx) in __ghash_block() argument
82 gcm_ghash_p8(dctx->shash, ctx->htable, in __ghash_block()
83 dctx->buffer, GHASH_DIGEST_SIZE); in __ghash_block()
88 crypto_xor((u8 *)dctx->shash, dctx->buffer, GHASH_BLOCK_SIZE); in __ghash_block()
89 gf128mul_lle((be128 *)dctx->shash, &ctx->key); in __ghash_block()
94 struct p8_ghash_desc_ctx *dctx, in __ghash_blocks() argument
101 gcm_ghash_p8(dctx->shash, ctx->htable, in __ghash_blocks()
[all …]
/Linux-v5.4/arch/s390/crypto/
Dghash_s390.c32 struct ghash_desc_ctx *dctx = shash_desc_ctx(desc); in ghash_init() local
35 memset(dctx, 0, sizeof(*dctx)); in ghash_init()
36 memcpy(dctx->key, ctx->key, GHASH_BLOCK_SIZE); in ghash_init()
59 struct ghash_desc_ctx *dctx = shash_desc_ctx(desc); in ghash_update() local
61 u8 *buf = dctx->buffer; in ghash_update()
63 if (dctx->bytes) { in ghash_update()
64 u8 *pos = buf + (GHASH_BLOCK_SIZE - dctx->bytes); in ghash_update()
66 n = min(srclen, dctx->bytes); in ghash_update()
67 dctx->bytes -= n; in ghash_update()
73 if (!dctx->bytes) { in ghash_update()
[all …]
/Linux-v5.4/crypto/
Dpoly1305_generic.c39 struct poly1305_desc_ctx *dctx = shash_desc_ctx(desc); in crypto_poly1305_init() local
41 poly1305_core_init(&dctx->h); in crypto_poly1305_init()
42 dctx->buflen = 0; in crypto_poly1305_init()
43 dctx->rset = false; in crypto_poly1305_init()
44 dctx->sset = false; in crypto_poly1305_init()
66 unsigned int crypto_poly1305_setdesckey(struct poly1305_desc_ctx *dctx, in crypto_poly1305_setdesckey() argument
69 if (!dctx->sset) { in crypto_poly1305_setdesckey()
70 if (!dctx->rset && srclen >= POLY1305_BLOCK_SIZE) { in crypto_poly1305_setdesckey()
71 poly1305_core_setkey(&dctx->r, src); in crypto_poly1305_setdesckey()
74 dctx->rset = true; in crypto_poly1305_setdesckey()
[all …]
Dghash-generic.c48 struct ghash_desc_ctx *dctx = shash_desc_ctx(desc); in ghash_init() local
50 memset(dctx, 0, sizeof(*dctx)); in ghash_init()
83 struct ghash_desc_ctx *dctx = shash_desc_ctx(desc); in ghash_update() local
85 u8 *dst = dctx->buffer; in ghash_update()
87 if (dctx->bytes) { in ghash_update()
88 int n = min(srclen, dctx->bytes); in ghash_update()
89 u8 *pos = dst + (GHASH_BLOCK_SIZE - dctx->bytes); in ghash_update()
91 dctx->bytes -= n; in ghash_update()
97 if (!dctx->bytes) in ghash_update()
109 dctx->bytes = GHASH_BLOCK_SIZE - srclen; in ghash_update()
[all …]
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()
34 memset(dctx, 0, sizeof(*dctx)); in des_setkey()
42 const struct des_ctx *dctx = crypto_tfm_ctx(tfm); in crypto_des_encrypt() local
44 des_encrypt(dctx, dst, src); in crypto_des_encrypt()
49 const struct des_ctx *dctx = crypto_tfm_ctx(tfm); in crypto_des_decrypt() local
51 des_decrypt(dctx, dst, src); in crypto_des_decrypt()
57 struct des3_ede_ctx *dctx = crypto_tfm_ctx(tfm); in des3_ede_setkey() local
60 err = des3_ede_expand_key(dctx, key, keylen); in des3_ede_setkey()
69 memset(dctx, 0, sizeof(*dctx)); in des3_ede_setkey()
[all …]
Dvmac.c399 struct vmac_desc_ctx *dctx, in vhash_blocks() argument
405 u64 ch = dctx->polytmp[0]; in vhash_blocks()
406 u64 cl = dctx->polytmp[1]; in vhash_blocks()
409 if (!dctx->first_block_processed) { in vhash_blocks()
410 dctx->first_block_processed = true; in vhash_blocks()
425 dctx->polytmp[0] = ch; in vhash_blocks()
426 dctx->polytmp[1] = cl; in vhash_blocks()
484 struct vmac_desc_ctx *dctx = shash_desc_ctx(desc); in vmac_init() local
486 dctx->partial_size = 0; in vmac_init()
487 dctx->first_block_processed = false; in vmac_init()
[all …]
Dxxhash_generic.c36 struct xxhash64_desc_ctx *dctx = shash_desc_ctx(desc); in xxhash64_init() local
38 xxh64_reset(&dctx->xxhstate, tctx->seed); in xxhash64_init()
46 struct xxhash64_desc_ctx *dctx = shash_desc_ctx(desc); in xxhash64_update() local
48 xxh64_update(&dctx->xxhstate, data, length); in xxhash64_update()
55 struct xxhash64_desc_ctx *dctx = shash_desc_ctx(desc); in xxhash64_final() local
57 put_unaligned_le64(xxh64_digest(&dctx->xxhstate), out); in xxhash64_final()
Ddeflate.c180 struct deflate_ctx *dctx = ctx; in __deflate_compress() local
181 struct z_stream_s *stream = &dctx->comp_stream; in __deflate_compress()
208 struct deflate_ctx *dctx = crypto_tfm_ctx(tfm); in deflate_compress() local
210 return __deflate_compress(src, slen, dst, dlen, dctx); in deflate_compress()
225 struct deflate_ctx *dctx = ctx; in __deflate_decompress() local
226 struct z_stream_s *stream = &dctx->decomp_stream; in __deflate_decompress()
264 struct deflate_ctx *dctx = crypto_tfm_ctx(tfm); in deflate_decompress() local
266 return __deflate_decompress(src, slen, dst, dlen, dctx); in deflate_decompress()
Dzstd.c22 ZSTD_DCtx *dctx; member
67 ctx->dctx = ZSTD_initDCtx(ctx->dwksp, wksp_size); in zstd_decomp_init()
68 if (!ctx->dctx) { in zstd_decomp_init()
90 ctx->dctx = NULL; in zstd_decomp_exit()
185 out_len = ZSTD_decompressDCtx(zctx->dctx, dst, *dlen, src, slen); in __zstd_decompress()
/Linux-v5.4/lib/zstd/
Ddecompress.c106 size_t ZSTD_decompressBegin(ZSTD_DCtx *dctx) in ZSTD_decompressBegin() argument
108 dctx->expected = ZSTD_frameHeaderSize_prefix; in ZSTD_decompressBegin()
109 dctx->stage = ZSTDds_getFrameHeaderSize; in ZSTD_decompressBegin()
110 dctx->previousDstEnd = NULL; in ZSTD_decompressBegin()
111 dctx->base = NULL; in ZSTD_decompressBegin()
112 dctx->vBase = NULL; in ZSTD_decompressBegin()
113 dctx->dictEnd = NULL; in ZSTD_decompressBegin()
114dctx->entropy.hufTable[0] = (HUF_DTable)((HufLog)*0x1000001); /* cover both little and big endian … in ZSTD_decompressBegin()
115 dctx->litEntropy = dctx->fseEntropy = 0; in ZSTD_decompressBegin()
116 dctx->dictID = 0; in ZSTD_decompressBegin()
[all …]
Dhuf.h104 size_t HUF_decompress4X_DCtx_wksp(HUF_DTable *dctx, void *dst, size_t dstSize, const void *cSrc, si…
105 size_t HUF_decompress4X_hufOnly_wksp(HUF_DTable *dctx, void *dst, size_t dstSize, const void *cSrc,…
107 size_t HUF_decompress4X2_DCtx_wksp(HUF_DTable *dctx, void *dst, size_t dstSize, const void *cSrc, s…
109 size_t HUF_decompress4X4_DCtx_wksp(HUF_DTable *dctx, void *dst, size_t dstSize, const void *cSrc, s…
201 size_t HUF_decompress1X_DCtx_wksp(HUF_DTable *dctx, void *dst, size_t dstSize, const void *cSrc, si…
202 size_t HUF_decompress1X2_DCtx_wksp(HUF_DTable *dctx, void *dst, size_t dstSize, const void *cSrc, s…
204 size_t HUF_decompress1X4_DCtx_wksp(HUF_DTable *dctx, void *dst, size_t dstSize, const void *cSrc, s…
Dhuf_decompress.c363 size_t HUF_decompress4X2_DCtx_wksp(HUF_DTable *dctx, void *dst, size_t dstSize, const void *cSrc, s… in HUF_decompress4X2_DCtx_wksp() argument
367 size_t const hSize = HUF_readDTableX2_wksp(dctx, cSrc, cSrcSize, workspace, workspaceSize); in HUF_decompress4X2_DCtx_wksp()
375 return HUF_decompress4X2_usingDTable_internal(dst, dstSize, ip, cSrcSize, dctx); in HUF_decompress4X2_DCtx_wksp()
825 size_t HUF_decompress4X4_DCtx_wksp(HUF_DTable *dctx, void *dst, size_t dstSize, const void *cSrc, s… in HUF_decompress4X4_DCtx_wksp() argument
829 size_t hSize = HUF_readDTableX4_wksp(dctx, cSrc, cSrcSize, workspace, workspaceSize); in HUF_decompress4X4_DCtx_wksp()
837 return HUF_decompress4X4_usingDTable_internal(dst, dstSize, ip, cSrcSize, dctx); in HUF_decompress4X4_DCtx_wksp()
901 size_t HUF_decompress4X_DCtx_wksp(HUF_DTable *dctx, void *dst, size_t dstSize, const void *cSrc, si… in HUF_decompress4X_DCtx_wksp() argument
919 …return algoNb ? HUF_decompress4X4_DCtx_wksp(dctx, dst, dstSize, cSrc, cSrcSize, workspace, workspa… in HUF_decompress4X_DCtx_wksp()
920 … : HUF_decompress4X2_DCtx_wksp(dctx, dst, dstSize, cSrc, cSrcSize, workspace, workspaceSize); in HUF_decompress4X_DCtx_wksp()
924 size_t HUF_decompress4X_hufOnly_wksp(HUF_DTable *dctx, void *dst, size_t dstSize, const void *cSrc,… in HUF_decompress4X_hufOnly_wksp() argument
[all …]
Dzstd_internal.h214 int ZSTD_isSkipFrame(ZSTD_DCtx *dctx);
257 size_t ZSTD_freeDCtx(ZSTD_DCtx *dctx);
/Linux-v5.4/arch/x86/crypto/
Dpoly1305_glue.c63 static unsigned int poly1305_simd_blocks(struct poly1305_desc_ctx *dctx, in poly1305_simd_blocks() argument
70 sctx = container_of(dctx, struct poly1305_simd_desc_ctx, base); in poly1305_simd_blocks()
72 if (unlikely(!dctx->sset)) { in poly1305_simd_blocks()
73 datalen = crypto_poly1305_setdesckey(dctx, src, srclen); in poly1305_simd_blocks()
82 memcpy(sctx->u, dctx->r.r, sizeof(sctx->u)); in poly1305_simd_blocks()
83 poly1305_simd_mult(sctx->u, dctx->r.r); in poly1305_simd_blocks()
87 poly1305_simd_mult(sctx->u + 5, dctx->r.r); in poly1305_simd_blocks()
89 poly1305_simd_mult(sctx->u + 10, dctx->r.r); in poly1305_simd_blocks()
93 poly1305_4block_avx2(dctx->h.h, src, dctx->r.r, blocks, in poly1305_simd_blocks()
101 memcpy(sctx->u, dctx->r.r, sizeof(sctx->u)); in poly1305_simd_blocks()
[all …]
Dghash-clmulni-intel_glue.c46 struct ghash_desc_ctx *dctx = shash_desc_ctx(desc); in ghash_init() local
48 memset(dctx, 0, sizeof(*dctx)); in ghash_init()
81 struct ghash_desc_ctx *dctx = shash_desc_ctx(desc); in ghash_update() local
83 u8 *dst = dctx->buffer; in ghash_update()
86 if (dctx->bytes) { in ghash_update()
87 int n = min(srclen, dctx->bytes); in ghash_update()
88 u8 *pos = dst + (GHASH_BLOCK_SIZE - dctx->bytes); in ghash_update()
90 dctx->bytes -= n; in ghash_update()
96 if (!dctx->bytes) in ghash_update()
106 dctx->bytes = GHASH_BLOCK_SIZE - srclen; in ghash_update()
[all …]
/Linux-v5.4/drivers/crypto/
Dpadlock-sha.c33 struct padlock_sha_desc *dctx = shash_desc_ctx(desc); in padlock_sha_init() local
36 dctx->fallback.tfm = ctx->fallback; in padlock_sha_init()
37 return crypto_shash_init(&dctx->fallback); in padlock_sha_init()
43 struct padlock_sha_desc *dctx = shash_desc_ctx(desc); in padlock_sha_update() local
45 return crypto_shash_update(&dctx->fallback, data, length); in padlock_sha_update()
50 struct padlock_sha_desc *dctx = shash_desc_ctx(desc); in padlock_sha_export() local
52 return crypto_shash_export(&dctx->fallback, out); in padlock_sha_export()
57 struct padlock_sha_desc *dctx = shash_desc_ctx(desc); in padlock_sha_import() local
60 dctx->fallback.tfm = ctx->fallback; in padlock_sha_import()
61 return crypto_shash_import(&dctx->fallback, in); in padlock_sha_import()
[all …]
/Linux-v5.4/include/linux/
Dzstd.h457 size_t ZSTD_decompress_usingDDict(ZSTD_DCtx *dctx, void *dst,
1100 size_t ZSTD_decompressBegin(ZSTD_DCtx *dctx);
1101 size_t ZSTD_decompressBegin_usingDict(ZSTD_DCtx *dctx, const void *dict,
1103 void ZSTD_copyDCtx(ZSTD_DCtx *dctx, const ZSTD_DCtx *preparedDCtx);
1104 size_t ZSTD_nextSrcSizeToDecompress(ZSTD_DCtx *dctx);
1105 size_t ZSTD_decompressContinue(ZSTD_DCtx *dctx, void *dst, size_t dstCapacity,
1115 ZSTD_nextInputType_e ZSTD_nextInputType(ZSTD_DCtx *dctx);
1152 size_t ZSTD_decompressBlock(ZSTD_DCtx *dctx, void *dst, size_t dstCapacity,
1154 size_t ZSTD_insertBlock(ZSTD_DCtx *dctx, const void *blockStart,
/Linux-v5.4/arch/sparc/crypto/
Ddes_glue.c47 struct des_sparc64_ctx *dctx = crypto_tfm_ctx(tfm); in des_set_key() local
58 des_sparc64_key_expand((const u32 *) key, &dctx->encrypt_expkey[0]); in des_set_key()
59 encrypt_to_decrypt(&dctx->decrypt_expkey[0], &dctx->encrypt_expkey[0]); in des_set_key()
200 struct des3_ede_sparc64_ctx *dctx = crypto_tfm_ctx(tfm); in des3_ede_set_key() local
216 memcpy(&dctx->encrypt_expkey[0], &k1[0], sizeof(k1)); in des3_ede_set_key()
217 encrypt_to_decrypt(&dctx->encrypt_expkey[DES_EXPKEY_WORDS / 2], &k2[0]); in des3_ede_set_key()
218 memcpy(&dctx->encrypt_expkey[(DES_EXPKEY_WORDS / 2) * 2], in des3_ede_set_key()
221 encrypt_to_decrypt(&dctx->decrypt_expkey[0], &k3[0]); in des3_ede_set_key()
222 memcpy(&dctx->decrypt_expkey[DES_EXPKEY_WORDS / 2], in des3_ede_set_key()
224 encrypt_to_decrypt(&dctx->decrypt_expkey[(DES_EXPKEY_WORDS / 2) * 2], in des3_ede_set_key()
/Linux-v5.4/include/crypto/
Ddes.h30 void des3_ede_encrypt(const struct des3_ede_ctx *dctx, u8 *dst, const u8 *src);
31 void des3_ede_decrypt(const struct des3_ede_ctx *dctx, u8 *dst, const u8 *src);
Dpoly1305.h58 unsigned int crypto_poly1305_setdesckey(struct poly1305_desc_ctx *dctx,
/Linux-v5.4/lib/crypto/
Ddes.c844 void des3_ede_encrypt(const struct des3_ede_ctx *dctx, u8 *dst, const u8 *src) in des3_ede_encrypt() argument
846 const u32 *K = dctx->expkey; in des3_ede_encrypt()
873 void des3_ede_decrypt(const struct des3_ede_ctx *dctx, u8 *dst, const u8 *src) in des3_ede_decrypt() argument
875 const u32 *K = dctx->expkey + DES3_EDE_EXPKEY_WORDS - 2; in des3_ede_decrypt()