Home
last modified time | relevance | path

Searched refs:sctx (Results 26 – 50 of 75) sorted by relevance

123

/openbmc/linux/drivers/crypto/nx/
H A Dnx-sha512.c46 memset(sctx, 0, sizeof *sctx); in nx_sha512_init()
48 sctx->state[0] = __cpu_to_be64(SHA512_H0); in nx_sha512_init()
56 sctx->count[0] = 0; in nx_sha512_init()
83 memcpy(sctx->buf + buf_len, data, len); in nx_sha512_update()
84 sctx->count[0] += len; in nx_sha512_update()
114 (u8 *) sctx->buf, in nx_sha512_update()
176 memcpy(sctx->buf, data, leftover); in nx_sha512_update()
177 sctx->count[0] += len; in nx_sha512_update()
219 count0 = sctx->count[0] * 8; in nx_sha512_final()
261 memcpy(out, sctx, sizeof(*sctx)); in nx_sha512_export()
[all …]
H A Dnx-aes-xcbc.c160 memset(sctx, 0, sizeof *sctx); in nx_xcbc_init()
183 total = sctx->count + len; in nx_xcbc_update()
190 memcpy(sctx->buffer + sctx->count, data, len); in nx_xcbc_update()
191 sctx->count += len; in nx_xcbc_update()
228 if (sctx->count) { in nx_xcbc_update()
229 data_len = sctx->count; in nx_xcbc_update()
231 (u8 *) sctx->buffer, in nx_xcbc_update()
279 sctx->count = 0; in nx_xcbc_update()
285 sctx->count = leftover; in nx_xcbc_update()
323 len = sctx->count; in nx_xcbc_final()
[all …]
/openbmc/linux/fs/btrfs/
H A Dscrub.c328 if (!sctx) in scrub_free_ctx()
334 kvfree(sctx); in scrub_free_ctx()
352 sctx = kvzalloc(sizeof(*sctx), GFP_KERNEL); in scrub_setup_ctx()
353 if (!sctx) in scrub_setup_ctx()
368 sctx->stripes[i].sctx = sctx; in scrub_setup_ctx()
382 return sctx; in scrub_setup_ctx()
1012 struct scrub_ctx *sctx = stripe->sctx; in scrub_stripe_read_repair_worker() local
1721 scrub_throttle_dev_io(sctx, sctx->stripes[0].dev, in submit_initial_group_read()
1819 stripe = &sctx->stripes[sctx->cur_stripe]; in queue_scrub_stripe()
2198 sctx->raid56_data_stripes[i].sctx = sctx; in scrub_stripe()
[all …]
/openbmc/linux/include/crypto/
H A Dsm3.h48 static inline void sm3_init(struct sm3_state *sctx) in sm3_init() argument
50 sctx->state[0] = SM3_IVA; in sm3_init()
51 sctx->state[1] = SM3_IVB; in sm3_init()
52 sctx->state[2] = SM3_IVC; in sm3_init()
53 sctx->state[3] = SM3_IVD; in sm3_init()
54 sctx->state[4] = SM3_IVE; in sm3_init()
55 sctx->state[5] = SM3_IVF; in sm3_init()
56 sctx->state[6] = SM3_IVG; in sm3_init()
57 sctx->state[7] = SM3_IVH; in sm3_init()
58 sctx->count = 0; in sm3_init()
[all …]
/openbmc/linux/arch/s390/crypto/
H A Daes_s390.c97 if (!sctx->fc) in aes_set_key()
100 sctx->key_len = key_len; in aes_set_key()
113 cpacf_km(sctx->fc, &sctx->key, out, in, AES_BLOCK_SIZE); in crypto_aes_encrypt()
214 if (!sctx->fc) in ecb_aes_set_key()
217 sctx->key_len = key_len; in ecb_aes_set_key()
237 cpacf_km(sctx->fc | modifier, sctx->key, in ecb_aes_crypt()
310 if (!sctx->fc) in cbc_aes_set_key()
337 memcpy(param.key, sctx->key, sctx->key_len); in cbc_aes_crypt()
542 if (!sctx->fc) in ctr_aes_set_key()
586 cpacf_kmctr(sctx->fc, sctx->key, walk.dst.virt.addr, in ctr_aes_crypt()
[all …]
H A Dsha512_s390.c41 struct s390_sha_ctx *sctx = shash_desc_ctx(desc); in sha512_export() local
44 octx->count[0] = sctx->count; in sha512_export()
46 memcpy(octx->state, sctx->state, sizeof(octx->state)); in sha512_export()
47 memcpy(octx->buf, sctx->buf, sizeof(octx->buf)); in sha512_export()
53 struct s390_sha_ctx *sctx = shash_desc_ctx(desc); in sha512_import() local
58 sctx->count = ictx->count[0]; in sha512_import()
60 memcpy(sctx->state, ictx->state, sizeof(ictx->state)); in sha512_import()
61 memcpy(sctx->buf, ictx->buf, sizeof(ictx->buf)); in sha512_import()
62 sctx->func = CPACF_KIMD_SHA_512; in sha512_import()
/openbmc/u-boot/tools/
H A Dmxsimage.c336 sctx = sctx->sect; in sb_encrypt_sb_sections_header()
421 sctx = sctx->sect; in sb_encrypt_image()
719 sctx = calloc(1, sizeof(*sctx)); in sb_build_section()
1371 sctx = sctx->sect; in sb_postfill_image_header()
1443 sctx = sctx->sect; in sb_fixup_sections_and_tags()
1954 sctx = calloc(1, sizeof(*sctx)); in sb_verify_sections_cmds()
2012 sctx = sctx->sect; in sb_verify_sections_cmds()
2153 sctx = sctx->sect; in sb_free_image()
2269 sctx = sctx->sect; in sb_build_image()
2284 sctx = sctx->sect; in sb_build_image()
[all …]
/openbmc/linux/arch/arm64/crypto/
H A Dsha1-ce-glue.c56 struct sha1_ce_state *sctx = shash_desc_ctx(desc); in sha1_ce_update() local
61 sctx->finalize = 0; in sha1_ce_update()
70 struct sha1_ce_state *sctx = shash_desc_ctx(desc); in sha1_ce_finup() local
80 sctx->finalize = finalize; in sha1_ce_finup()
90 struct sha1_ce_state *sctx = shash_desc_ctx(desc); in sha1_ce_final() local
95 sctx->finalize = 0; in sha1_ce_final()
102 struct sha1_ce_state *sctx = shash_desc_ctx(desc); in sha1_ce_export() local
104 memcpy(out, &sctx->sst, sizeof(struct sha1_state)); in sha1_ce_export()
110 struct sha1_ce_state *sctx = shash_desc_ctx(desc); in sha1_ce_import() local
112 memcpy(&sctx->sst, in, sizeof(struct sha1_state)); in sha1_ce_import()
[all …]
H A Dsha2-ce-glue.c67 struct sha256_ce_state *sctx = shash_desc_ctx(desc); in sha256_ce_update() local
73 sctx->finalize = 0; in sha256_ce_update()
82 struct sha256_ce_state *sctx = shash_desc_ctx(desc); in sha256_ce_finup() local
97 sctx->finalize = finalize; in sha256_ce_finup()
107 struct sha256_ce_state *sctx = shash_desc_ctx(desc); in sha256_ce_final() local
114 sctx->finalize = 0; in sha256_ce_final()
121 struct sha256_ce_state *sctx = shash_desc_ctx(desc); in sha256_ce_export() local
123 memcpy(out, &sctx->sst, sizeof(struct sha256_state)); in sha256_ce_export()
129 struct sha256_ce_state *sctx = shash_desc_ctx(desc); in sha256_ce_import() local
131 memcpy(&sctx->sst, in, sizeof(struct sha256_state)); in sha256_ce_import()
[all …]
H A Dsm3-neon-glue.c56 struct sm3_state *sctx = shash_desc_ctx(desc); in sm3_neon_finup() local
59 sm3_update(sctx, data, len); in sm3_neon_finup()
60 sm3_final(sctx, out); in sm3_neon_finup()
H A Dsm3-ce-glue.c59 struct sm3_state *sctx = shash_desc_ctx(desc); in sm3_ce_finup() local
62 sm3_update(sctx, data, len); in sm3_ce_finup()
63 sm3_final(sctx, out); in sm3_ce_finup()
/openbmc/linux/crypto/
H A Dsm3.c76 a = sctx->state[0]; in sm3_transform()
77 b = sctx->state[1]; in sm3_transform()
78 c = sctx->state[2]; in sm3_transform()
79 d = sctx->state[3]; in sm3_transform()
80 e = sctx->state[4]; in sm3_transform()
81 f = sctx->state[5]; in sm3_transform()
82 g = sctx->state[6]; in sm3_transform()
195 sm3_block(sctx, sctx->buffer, 1, W); in sm3_update()
229 sm3_block(sctx, sctx->buffer, 1, W); in sm3_final()
234 sm3_block(sctx, sctx->buffer, 1, W); in sm3_final()
[all …]
H A Dsm3_generic.c46 struct sm3_state *sctx = shash_desc_ctx(desc); in crypto_sm3_finup() local
49 sm3_update(sctx, data, len); in crypto_sm3_finup()
50 sm3_final(sctx, hash); in crypto_sm3_finup()
/openbmc/linux/lib/crypto/
H A Dsha256.c127 sha256_transform(sctx->state, input, W); in sha256_transform_blocks()
142 lib_sha256_base_do_finalize(sctx, sha256_transform_blocks); in __sha256_final()
143 lib_sha256_base_finish(sctx, out, digest_size); in __sha256_final()
146 void sha256_final(struct sha256_state *sctx, u8 *out) in sha256_final() argument
148 __sha256_final(sctx, out, 32); in sha256_final()
152 void sha224_final(struct sha256_state *sctx, u8 *out) in sha224_final() argument
154 __sha256_final(sctx, out, 28); in sha224_final()
160 struct sha256_state sctx; in sha256() local
162 sha256_init(&sctx); in sha256()
163 sha256_update(&sctx, data, len); in sha256()
[all …]
/openbmc/u-boot/lib/
H A Dsha512.c208 sctx->count[0] += len; in sha512_base_do_update()
209 if (sctx->count[0] < len) in sha512_base_do_update()
210 sctx->count[1]++; in sha512_base_do_update()
218 memcpy(sctx->buf + partial, data, p); in sha512_base_do_update()
222 sha512_block_fn(sctx, sctx->buf, 1); in sha512_base_do_update()
229 sha512_block_fn(sctx, data, blocks); in sha512_base_do_update()
235 memcpy(sctx->buf + partial, data, len); in sha512_base_do_update()
244 sctx->buf[partial++] = 0x80; in sha512_base_do_finalize()
249 sha512_block_fn(sctx, sctx->buf, 1); in sha512_base_do_finalize()
253 bits[0] = cpu_to_be64(sctx->count[1] << 3 | sctx->count[0] >> 61); in sha512_base_do_finalize()
[all …]
/openbmc/linux/drivers/crypto/
H A Dpadlock-sha.c273 *sctx = (struct sha1_state){ in padlock_sha1_init_nano()
291 partial = sctx->count & 0x3f; in padlock_sha1_update_nano()
292 sctx->count += len; in padlock_sha1_update_nano()
304 src = sctx->buffer; in padlock_sha1_update_nano()
356 *sctx = (struct sha256_state){ in padlock_sha256_init_nano()
375 partial = sctx->count & 0x3f; in padlock_sha256_update_nano()
376 sctx->count += len; in padlock_sha256_update_nano()
388 src = sctx->buf; in padlock_sha256_update_nano()
441 void *sctx = shash_desc_ctx(desc); in padlock_sha_export_nano() local
443 memcpy(out, sctx, statesize); in padlock_sha_export_nano()
[all …]
/openbmc/linux/arch/x86/crypto/
H A Dsm3_avx_glue.c26 struct sm3_state *sctx = shash_desc_ctx(desc); in sm3_avx_update() local
29 (sctx->count % SM3_BLOCK_SIZE) + len < SM3_BLOCK_SIZE) { in sm3_avx_update()
30 sm3_update(sctx, data, len); in sm3_avx_update()
51 struct sm3_state *sctx = shash_desc_ctx(desc); in sm3_avx_finup() local
54 sm3_update(sctx, data, len); in sm3_avx_finup()
56 sm3_final(sctx, out); in sm3_avx_finup()
/openbmc/linux/arch/s390/purgatory/
H A Dpurgatory.c19 struct sha256_state sctx; in verify_sha256_digest() local
21 sha256_init(&sctx); in verify_sha256_digest()
25 sha256_update(&sctx, (uint8_t *)(ptr->start), ptr->len); in verify_sha256_digest()
27 sha256_final(&sctx, digest); in verify_sha256_digest()
/openbmc/linux/tools/perf/util/
H A Dexpr.l85 static int literal(yyscan_t scanner, const struct expr_scanner_ctx *sctx) in literal() argument
89 yylval->num = expr__get_literal(expr_get_text(scanner), sctx); in literal()
91 if (!sctx->is_test) in literal()
108 struct expr_scanner_ctx *sctx = expr_get_extra(yyscanner); variable
118 {literal} { return literal(yyscanner, sctx); }
120 {symbol} { return str(yyscanner, ID, sctx->runtime); }
/openbmc/linux/arch/x86/purgatory/
H A Dpurgatory.c28 struct sha256_state sctx; in verify_sha256_digest() local
30 sha256_init(&sctx); in verify_sha256_digest()
34 sha256_update(&sctx, (uint8_t *)(ptr->start), ptr->len); in verify_sha256_digest()
36 sha256_final(&sctx, digest); in verify_sha256_digest()
/openbmc/linux/drivers/misc/
H A Dfastrpc.c298 struct fastrpc_session_ctx *sctx; member
446 if (fl->sctx && fl->sctx->sid) in fastrpc_buf_alloc()
1145 if (!fl->sctx) in fastrpc_internal_invoke()
1546 fastrpc_session_free(cctx, fl->sctx); in fastrpc_device_release()
1584 fl->sctx = fastrpc_session_alloc(cctx); in fastrpc_device_open()
1585 if (!fl->sctx) { in fastrpc_device_open()
1796 struct device *dev = fl->sctx->dev; in fastrpc_req_munmap_impl()
1827 struct device *dev = fl->sctx->dev; in fastrpc_req_munmap()
1858 struct device *dev = fl->sctx->dev; in fastrpc_req_mmap()
1959 struct device *dev = fl->sctx->dev; in fastrpc_req_mem_unmap_impl()
[all …]
/openbmc/linux/arch/arm/crypto/
H A Dsha1-ce-glue.c32 struct sha1_state *sctx = shash_desc_ctx(desc); in sha1_ce_update() local
35 (sctx->count % SHA1_BLOCK_SIZE) + len < SHA1_BLOCK_SIZE) in sha1_ce_update()
H A Dsha1_neon_glue.c35 struct sha1_state *sctx = shash_desc_ctx(desc); in sha1_neon_update() local
38 (sctx->count % SHA1_BLOCK_SIZE) + len < SHA1_BLOCK_SIZE) in sha1_neon_update()
H A Dsha256_neon_glue.c30 struct sha256_state *sctx = shash_desc_ctx(desc); in crypto_sha256_neon_update() local
33 (sctx->count % SHA256_BLOCK_SIZE) + len < SHA256_BLOCK_SIZE) in crypto_sha256_neon_update()
H A Dsha512-neon-glue.c29 struct sha512_state *sctx = shash_desc_ctx(desc); in sha512_neon_update() local
32 (sctx->count[0] % SHA512_BLOCK_SIZE) + len < SHA512_BLOCK_SIZE) in sha512_neon_update()

123