Home
last modified time | relevance | path

Searched refs:ctx (Results 1 – 13 of 13) sorted by relevance

/lib/crypto/
Daes.c185 int aes_expandkey(struct crypto_aes_ctx *ctx, const u8 *in_key, in aes_expandkey() argument
196 ctx->key_length = key_len; in aes_expandkey()
199 ctx->key_enc[i] = get_unaligned_le32(in_key + i * sizeof(u32)); in aes_expandkey()
202 u32 *rki = ctx->key_enc + (i * kwords); in aes_expandkey()
231 ctx->key_dec[0] = ctx->key_enc[key_len + 24]; in aes_expandkey()
232 ctx->key_dec[1] = ctx->key_enc[key_len + 25]; in aes_expandkey()
233 ctx->key_dec[2] = ctx->key_enc[key_len + 26]; in aes_expandkey()
234 ctx->key_dec[3] = ctx->key_enc[key_len + 27]; in aes_expandkey()
237 ctx->key_dec[i] = inv_mix_columns(ctx->key_enc[j]); in aes_expandkey()
238 ctx->key_dec[i + 1] = inv_mix_columns(ctx->key_enc[j + 1]); in aes_expandkey()
[all …]
Darc4.c13 int arc4_setkey(struct arc4_ctx *ctx, const u8 *in_key, unsigned int key_len) in arc4_setkey() argument
17 ctx->x = 1; in arc4_setkey()
18 ctx->y = 0; in arc4_setkey()
21 ctx->S[i] = i; in arc4_setkey()
24 u32 a = ctx->S[i]; in arc4_setkey()
27 ctx->S[i] = ctx->S[j]; in arc4_setkey()
28 ctx->S[j] = a; in arc4_setkey()
37 void arc4_crypt(struct arc4_ctx *ctx, u8 *out, const u8 *in, unsigned int len) in arc4_crypt() argument
39 u32 *const S = ctx->S; in arc4_crypt()
46 x = ctx->x; in arc4_crypt()
[all …]
Ddes.c699 int des_expand_key(struct des_ctx *ctx, const u8 *key, unsigned int keylen) in des_expand_key() argument
704 return des_ekey(ctx->expkey, key) ? 0 : -ENOKEY; in des_expand_key()
781 void des_encrypt(const struct des_ctx *ctx, u8 *dst, const u8 *src) in des_encrypt() argument
783 const u32 *K = ctx->expkey; in des_encrypt()
802 void des_decrypt(const struct des_ctx *ctx, u8 *dst, const u8 *src) in des_decrypt() argument
804 const u32 *K = ctx->expkey + DES_EXPKEY_WORDS - 2; in des_decrypt()
823 int des3_ede_expand_key(struct des3_ede_ctx *ctx, const u8 *key, in des3_ede_expand_key() argument
826 u32 *pe = ctx->expkey; in des3_ede_expand_key()
/lib/mpi/
Dmpih-mul.c324 struct karatsuba_ctx *ctx) in mpihelp_mul_karatsuba_case() argument
328 if (!ctx->tspace || ctx->tspace_size < vsize) { in mpihelp_mul_karatsuba_case()
329 if (ctx->tspace) in mpihelp_mul_karatsuba_case()
330 mpi_free_limb_space(ctx->tspace); in mpihelp_mul_karatsuba_case()
331 ctx->tspace = mpi_alloc_limb_space(2 * vsize); in mpihelp_mul_karatsuba_case()
332 if (!ctx->tspace) in mpihelp_mul_karatsuba_case()
334 ctx->tspace_size = vsize; in mpihelp_mul_karatsuba_case()
337 MPN_MUL_N_RECURSE(prodp, up, vp, vsize, ctx->tspace); in mpihelp_mul_karatsuba_case()
343 if (!ctx->tp || ctx->tp_size < vsize) { in mpihelp_mul_karatsuba_case()
344 if (ctx->tp) in mpihelp_mul_karatsuba_case()
[all …]
Dmpi-internal.h127 void mpihelp_release_karatsuba_ctx(struct karatsuba_ctx *ctx);
142 struct karatsuba_ctx *ctx);
/lib/
Dlibcrc32c.c41 u32 ret, *ctx = (u32 *)shash_desc_ctx(shash); in crc32c() local
45 *ctx = crc; in crc32c()
50 ret = *ctx; in crc32c()
51 barrier_data(ctx); in crc32c()
Dlocking-selftest.c1317 if (WARN_ON(!o.ctx) || in ww_test_fail_acquire()
1355 o.ctx = (void *)~0UL; in ww_test_normal()
1358 WARN_ON(o.ctx != (void *)~0UL); in ww_test_normal()
1361 o.ctx = (void *)~0UL; in ww_test_normal()
1367 WARN_ON(o.ctx != (void *)~0UL); in ww_test_normal()
1370 o.ctx = (void *)~0UL; in ww_test_normal()
1376 WARN_ON(o.ctx != (void *)~0UL); in ww_test_normal()
1379 o.ctx = (void *)~0UL; in ww_test_normal()
1386 WARN_ON(o.ctx != (void *)~0UL); in ww_test_normal()
1389 o.ctx = (void *)~0UL; in ww_test_normal()
[all …]
Dcrc-t10dif.c61 char ctx[2]; in crc_t10dif_update() member
70 *(__u16 *)desc.ctx = crc; in crc_t10dif_update()
77 return *(__u16 *)desc.ctx; in crc_t10dif_update()
/lib/zstd/
Dcompress.c141 const seqStore_t *ZSTD_getSeqStore(const ZSTD_CCtx *ctx) /* hidden interface */ { return &(ctx->seq… in ZSTD_getSeqStore() argument
1104 static void ZSTD_compressBlock_fast(ZSTD_CCtx *ctx, const void *src, size_t srcSize) in ZSTD_compressBlock_fast() argument
1106 const U32 mls = ctx->params.cParams.searchLength; in ZSTD_compressBlock_fast()
1109 case 4: ZSTD_compressBlock_fast_generic(ctx, src, srcSize, 4); return; in ZSTD_compressBlock_fast()
1110 case 5: ZSTD_compressBlock_fast_generic(ctx, src, srcSize, 5); return; in ZSTD_compressBlock_fast()
1111 case 6: ZSTD_compressBlock_fast_generic(ctx, src, srcSize, 6); return; in ZSTD_compressBlock_fast()
1112 case 7: ZSTD_compressBlock_fast_generic(ctx, src, srcSize, 7); return; in ZSTD_compressBlock_fast()
1116 static void ZSTD_compressBlock_fast_extDict_generic(ZSTD_CCtx *ctx, const void *src, size_t srcSize… in ZSTD_compressBlock_fast_extDict_generic() argument
1118 U32 *hashTable = ctx->hashTable; in ZSTD_compressBlock_fast_extDict_generic()
1119 const U32 hBits = ctx->params.cParams.hashLog; in ZSTD_compressBlock_fast_extDict_generic()
[all …]
Dzstd_opt.h407 void ZSTD_compressBlock_opt_generic(ZSTD_CCtx *ctx, const void *src, size_t srcSize, const int ultr… in ZSTD_compressBlock_opt_generic() argument
409 seqStore_t *seqStorePtr = &(ctx->seqStore); in ZSTD_compressBlock_opt_generic()
415 const BYTE *const base = ctx->base; in ZSTD_compressBlock_opt_generic()
416 const BYTE *const prefixStart = base + ctx->dictLimit; in ZSTD_compressBlock_opt_generic()
418 const U32 maxSearches = 1U << ctx->params.cParams.searchLog; in ZSTD_compressBlock_opt_generic()
419 const U32 sufficient_len = ctx->params.cParams.targetLength; in ZSTD_compressBlock_opt_generic()
420 const U32 mls = ctx->params.cParams.searchLength; in ZSTD_compressBlock_opt_generic()
421 const U32 minMatch = (ctx->params.cParams.searchLength == 3) ? 3 : 4; in ZSTD_compressBlock_opt_generic()
429 ctx->nextToUpdate3 = ctx->nextToUpdate; in ZSTD_compressBlock_opt_generic()
435 rep[i] = ctx->rep[i]; in ZSTD_compressBlock_opt_generic()
[all …]
Dzstd_internal.h212 const seqStore_t *ZSTD_getSeqStore(const ZSTD_CCtx *ctx);
/lib/lz4/
Dlz4_compress.c466 LZ4_stream_t_internal *ctx = &((LZ4_stream_t *)state)->internal_donotuse; in LZ4_compress_fast_extState() local
480 return LZ4_compress_generic(ctx, source, in LZ4_compress_fast_extState()
485 return LZ4_compress_generic(ctx, source, in LZ4_compress_fast_extState()
491 return LZ4_compress_generic(ctx, source, in LZ4_compress_fast_extState()
496 return LZ4_compress_generic(ctx, source, in LZ4_compress_fast_extState()
523 LZ4_stream_t_internal * const ctx, in LZ4_compress_destSize_generic() argument
564 LZ4_putPosition(ip, ctx->hashTable, tableType, base); in LZ4_compress_destSize_generic()
588 match = LZ4_getPositionOnHash(h, ctx->hashTable, in LZ4_compress_destSize_generic()
593 ctx->hashTable, tableType, in LZ4_compress_destSize_generic()
671 LZ4_putPosition(ip - 2, ctx->hashTable, tableType, base); in LZ4_compress_destSize_generic()
[all …]
Dlz4hc_compress.c339 LZ4HC_CCtx_internal *const ctx, in LZ4HC_compress_generic() argument
373 ctx->end += inputSize; in LZ4HC_compress_generic()
379 ml = LZ4HC_InsertAndFindBestMatch(ctx, ip, in LZ4HC_compress_generic()
393 ml2 = LZ4HC_InsertAndGetWiderMatch(ctx, in LZ4HC_compress_generic()
455 ml3 = LZ4HC_InsertAndGetWiderMatch(ctx, in LZ4HC_compress_generic()
589 LZ4HC_CCtx_internal *ctx = &((LZ4_streamHC_t *)state)->internal_donotuse; in LZ4_compress_HC_extStateHC() local
598 LZ4HC_init(ctx, (const BYTE *)src); in LZ4_compress_HC_extStateHC()
601 return LZ4HC_compress_generic(ctx, src, dst, in LZ4_compress_HC_extStateHC()
604 return LZ4HC_compress_generic(ctx, src, dst, in LZ4_compress_HC_extStateHC()