/Linux-v4.19/crypto/ |
D | poly1305_generic.c | 39 struct poly1305_desc_ctx *dctx = shash_desc_ctx(desc); in crypto_poly1305_init() local 41 memset(dctx->h, 0, sizeof(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() 50 static void poly1305_setrkey(struct poly1305_desc_ctx *dctx, const u8 *key) in poly1305_setrkey() argument 53 dctx->r[0] = (get_unaligned_le32(key + 0) >> 0) & 0x3ffffff; in poly1305_setrkey() 54 dctx->r[1] = (get_unaligned_le32(key + 3) >> 2) & 0x3ffff03; in poly1305_setrkey() 55 dctx->r[2] = (get_unaligned_le32(key + 6) >> 4) & 0x3ffc0ff; in poly1305_setrkey() 56 dctx->r[3] = (get_unaligned_le32(key + 9) >> 6) & 0x3f03fff; in poly1305_setrkey() [all …]
|
D | ghash-generic.c | 26 struct ghash_desc_ctx *dctx = shash_desc_ctx(desc); in ghash_init() local 28 memset(dctx, 0, sizeof(*dctx)); in ghash_init() 55 struct ghash_desc_ctx *dctx = shash_desc_ctx(desc); in ghash_update() local 57 u8 *dst = dctx->buffer; in ghash_update() 59 if (dctx->bytes) { in ghash_update() 60 int n = min(srclen, dctx->bytes); in ghash_update() 61 u8 *pos = dst + (GHASH_BLOCK_SIZE - dctx->bytes); in ghash_update() 63 dctx->bytes -= n; in ghash_update() 69 if (!dctx->bytes) in ghash_update() 81 dctx->bytes = GHASH_BLOCK_SIZE - srclen; in ghash_update() [all …]
|
D | vmac.c | 399 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 …]
|
D | deflate.c | 184 struct deflate_ctx *dctx = ctx; in __deflate_compress() local 185 struct z_stream_s *stream = &dctx->comp_stream; in __deflate_compress() 212 struct deflate_ctx *dctx = crypto_tfm_ctx(tfm); in deflate_compress() local 214 return __deflate_compress(src, slen, dst, dlen, dctx); in deflate_compress() 229 struct deflate_ctx *dctx = ctx; in __deflate_decompress() local 230 struct z_stream_s *stream = &dctx->decomp_stream; in __deflate_decompress() 268 struct deflate_ctx *dctx = crypto_tfm_ctx(tfm); in deflate_decompress() local 270 return __deflate_decompress(src, slen, dst, dlen, dctx); in deflate_decompress()
|
D | zstd.c | 30 ZSTD_DCtx *dctx; member 75 ctx->dctx = ZSTD_initDCtx(ctx->dwksp, wksp_size); in zstd_decomp_init() 76 if (!ctx->dctx) { in zstd_decomp_init() 98 ctx->dctx = NULL; in zstd_decomp_exit() 193 out_len = ZSTD_decompressDCtx(zctx->dctx, dst, *dlen, src, slen); in __zstd_decompress()
|
D | des_generic.c | 784 struct des_ctx *dctx = crypto_tfm_ctx(tfm); in des_setkey() local 798 memcpy(dctx->expkey, tmp, sizeof(dctx->expkey)); in des_setkey() 885 struct des3_ede_ctx *dctx = crypto_tfm_ctx(tfm); in des3_ede_setkey() local 887 u32 *expkey = dctx->expkey; in des3_ede_setkey() 894 struct des3_ede_ctx *dctx = crypto_tfm_ctx(tfm); in des3_ede_encrypt() local 895 const u32 *K = dctx->expkey; in des3_ede_encrypt() 925 struct des3_ede_ctx *dctx = crypto_tfm_ctx(tfm); in des3_ede_decrypt() local 926 const u32 *K = dctx->expkey + DES3_EDE_EXPKEY_WORDS - 2; in des3_ede_decrypt()
|
/Linux-v4.19/drivers/crypto/vmx/ |
D | ghash.c | 100 struct p8_ghash_desc_ctx *dctx = shash_desc_ctx(desc); in p8_ghash_init() local 102 dctx->bytes = 0; in p8_ghash_init() 103 memset(dctx->shash, 0, GHASH_DIGEST_SIZE); in p8_ghash_init() 104 dctx->fallback_desc.tfm = ctx->fallback; in p8_ghash_init() 105 dctx->fallback_desc.flags = desc->flags; in p8_ghash_init() 106 return crypto_shash_init(&dctx->fallback_desc); in p8_ghash_init() 132 struct p8_ghash_desc_ctx *dctx = shash_desc_ctx(desc); in p8_ghash_update() local 135 return crypto_shash_update(&dctx->fallback_desc, src, in p8_ghash_update() 138 if (dctx->bytes) { in p8_ghash_update() 139 if (dctx->bytes + srclen < GHASH_DIGEST_SIZE) { in p8_ghash_update() [all …]
|
/Linux-v4.19/arch/s390/crypto/ |
D | ghash_s390.c | 32 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-v4.19/lib/zstd/ |
D | decompress.c | 106 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() 114 …dctx->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 …]
|
D | huf.h | 104 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…
|
D | huf_decompress.c | 363 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 …]
|
D | zstd_internal.h | 214 int ZSTD_isSkipFrame(ZSTD_DCtx *dctx); 257 size_t ZSTD_freeDCtx(ZSTD_DCtx *dctx);
|
/Linux-v4.19/arch/x86/crypto/ |
D | poly1305_glue.c | 67 static unsigned int poly1305_simd_blocks(struct poly1305_desc_ctx *dctx, in poly1305_simd_blocks() argument 74 sctx = container_of(dctx, struct poly1305_simd_desc_ctx, base); in poly1305_simd_blocks() 76 if (unlikely(!dctx->sset)) { in poly1305_simd_blocks() 77 datalen = crypto_poly1305_setdesckey(dctx, src, srclen); in poly1305_simd_blocks() 86 memcpy(sctx->u, dctx->r, sizeof(sctx->u)); in poly1305_simd_blocks() 87 poly1305_simd_mult(sctx->u, dctx->r); in poly1305_simd_blocks() 91 poly1305_simd_mult(sctx->u + 5, dctx->r); in poly1305_simd_blocks() 93 poly1305_simd_mult(sctx->u + 10, dctx->r); in poly1305_simd_blocks() 97 poly1305_4block_avx2(dctx->h, src, dctx->r, blocks, sctx->u); in poly1305_simd_blocks() 104 memcpy(sctx->u, dctx->r, sizeof(sctx->u)); in poly1305_simd_blocks() [all …]
|
D | ghash-clmulni-intel_glue.c | 48 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() 88 if (dctx->bytes) { in ghash_update() 89 int n = min(srclen, dctx->bytes); in ghash_update() 90 u8 *pos = dst + (GHASH_BLOCK_SIZE - dctx->bytes); in ghash_update() 92 dctx->bytes -= n; in ghash_update() 98 if (!dctx->bytes) in ghash_update() 108 dctx->bytes = GHASH_BLOCK_SIZE - srclen; in ghash_update() [all …]
|
/Linux-v4.19/drivers/crypto/ |
D | padlock-sha.c | 38 struct padlock_sha_desc *dctx = shash_desc_ctx(desc); in padlock_sha_init() local 41 dctx->fallback.tfm = ctx->fallback; in padlock_sha_init() 42 dctx->fallback.flags = desc->flags & CRYPTO_TFM_REQ_MAY_SLEEP; in padlock_sha_init() 43 return crypto_shash_init(&dctx->fallback); in padlock_sha_init() 49 struct padlock_sha_desc *dctx = shash_desc_ctx(desc); in padlock_sha_update() local 51 dctx->fallback.flags = desc->flags & CRYPTO_TFM_REQ_MAY_SLEEP; in padlock_sha_update() 52 return crypto_shash_update(&dctx->fallback, data, length); in padlock_sha_update() 57 struct padlock_sha_desc *dctx = shash_desc_ctx(desc); in padlock_sha_export() local 59 return crypto_shash_export(&dctx->fallback, out); in padlock_sha_export() 64 struct padlock_sha_desc *dctx = shash_desc_ctx(desc); in padlock_sha_import() local [all …]
|
/Linux-v4.19/include/linux/ |
D | zstd.h | 457 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-v4.19/arch/sparc/crypto/ |
D | des_glue.c | 46 struct des_sparc64_ctx *dctx = crypto_tfm_ctx(tfm); in des_set_key() local 61 des_sparc64_key_expand((const u32 *) key, &dctx->encrypt_expkey[0]); in des_set_key() 62 encrypt_to_decrypt(&dctx->decrypt_expkey[0], &dctx->encrypt_expkey[0]); in des_set_key() 203 struct des3_ede_sparc64_ctx *dctx = crypto_tfm_ctx(tfm); in des3_ede_set_key() local 223 memcpy(&dctx->encrypt_expkey[0], &k1[0], sizeof(k1)); in des3_ede_set_key() 224 encrypt_to_decrypt(&dctx->encrypt_expkey[DES_EXPKEY_WORDS / 2], &k2[0]); in des3_ede_set_key() 225 memcpy(&dctx->encrypt_expkey[(DES_EXPKEY_WORDS / 2) * 2], in des3_ede_set_key() 228 encrypt_to_decrypt(&dctx->decrypt_expkey[0], &k3[0]); in des3_ede_set_key() 229 memcpy(&dctx->decrypt_expkey[DES_EXPKEY_WORDS / 2], in des3_ede_set_key() 231 encrypt_to_decrypt(&dctx->decrypt_expkey[(DES_EXPKEY_WORDS / 2) * 2], in des3_ede_set_key()
|
/Linux-v4.19/include/crypto/ |
D | poly1305.h | 34 unsigned int crypto_poly1305_setdesckey(struct poly1305_desc_ctx *dctx,
|