Home
last modified time | relevance | path

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

123

/bsp/bouffalo_lab/libraries/bl_mcu_sdk/drivers/lhal/src/
A Dbflb_sec_sha.c97 if (ctx->sha_feed) { in bflb_sha1_update()
110 ctx->total[1]++; in bflb_sha1_update()
301 high = (ctx->total[0] >> 29) | (ctx->total[1] << 3); in bflb_sha1_finish()
310 bflb_sha1_update(dev, ctx, (uint8_t *)ctx->sha_padding, padn); in bflb_sha1_finish()
312 bflb_sha1_update(dev, ctx, (uint8_t *)ctx->sha_padding, 8); in bflb_sha1_finish()
388 high = (ctx->total[0] >> 61) | (ctx->total[1] << 3); in bflb_sha512_finish()
397 bflb_sha512_update(dev, ctx, (uint8_t *)ctx->sha_padding, padn); in bflb_sha512_finish()
399 bflb_sha512_update(dev, ctx, (uint8_t *)ctx->sha_padding, 16); in bflb_sha512_finish()
757 high = (ctx->total[0] >> 29) | (ctx->total[1] << 3); in bflb_sha1_link_finish()
766 bflb_sha1_link_update(dev, ctx, (uint8_t *)ctx->sha_padding, padn); in bflb_sha1_link_finish()
[all …]
/bsp/hc32/libraries/hc32_drivers/
A Ddrv_crypto.c40 if (ctx->crc_cfg.poly != DEFAULT_CRC16_CCITT_POLY && ctx->crc_cfg.poly != DEFAULT_CRC32_POLY) in _crc_update()
50 switch (ctx->crc_cfg.flags) in _crc_update()
73 if (ctx->crc_cfg.xorout) in _crc_update()
83 switch (ctx->crc_cfg.width) in _crc_update()
106 if (16U == ctx->crc_cfg.width) in _crc_update()
161 switch (ctx->parent.type) in _hash_update()
193 switch (ctx->parent.type) in _hash_finish()
234 switch (ctx->parent.type) in _cryp_crypt()
256 …if (ctx->key_bitlen != (AES_KEY_SIZE_16BYTE * 8U) && ctx->key_bitlen != (AES_KEY_SIZE_24BYTE * 8U)… in _cryp_crypt()
275 … if (LL_OK != AES_Encrypt(info->in, info->length, ctx->key, (ctx->key_bitlen / 8U), info->out)) in _cryp_crypt()
[all …]
/bsp/n32g452xx/Libraries/rt_drivers/
A Ddrv_crypto.c37 if (ctx ->crc_cfg.poly != CRC16_PLOY) in _get_crc16()
53 CRC->CRC16D = ctx ->crc_cfg.last_val; in _get_crc16()
76 if (ctx ->crc_cfg.poly != CRC32_PLOY) in _get_crc32()
82 switch (ctx ->crc_cfg.flags & 0x03) in _get_crc32()
141 if (ctx ->crc_cfg.flags >> 2) in _crc_update()
147 if (ctx ->crc_cfg.width == 16) in _crc_update()
151 else if (ctx ->crc_cfg.width == 32) in _crc_update()
252 if (ctx->contex) in _crypto_destroy()
253 rt_free(ctx->contex); in _crypto_destroy()
382 struct rt_hwcrypto_ctx *ctx; in crc_demo() local
[all …]
/bsp/stm32/libraries/HAL_Drivers/drivers/
A Ddrv_crypto.c67 switch (ctx ->crc_cfg.flags) in _crc_update()
87 switch(ctx ->crc_cfg.width) in _crc_update()
130 …if (ctx->crc_cfg.flags != 0 || ctx->crc_cfg.last_val != 0xFFFFFFFF || ctx->crc_cfg.xorout != 0 || … in _crc_update()
196 switch (ctx->parent.type) in _hash_update()
244 switch (ctx->parent.type) in _hash_finish()
299 switch (ctx->parent.type) in _cryp_crypt()
410 ctx->contex = hrng; in _crypto_create()
443 ctx->contex = hcrc; in _crypto_create()
473 ctx->contex = hash; in _crypto_create()
509 ctx->contex = cryp; in _crypto_create()
[all …]
/bsp/stm32/stm32mp157a-st-discovery/board/ports/crypto/
A Dcrypto_sample.c78 struct rt_hwcrypto_ctx *ctx; in hw_crc_sample() local
91 rt_hwcrypto_crc_cfg(ctx, &cfg); in hw_crc_sample()
97 rt_hwcrypto_crc_destroy(ctx); in hw_crc_sample()
137 if (ctx == RT_NULL) in hw_hash_sample()
163 rt_hwcrypto_hash_destroy(ctx); in hw_hash_sample()
169 if (ctx == RT_NULL) in hw_hash_sample()
195 rt_hwcrypto_hash_destroy(ctx); in hw_hash_sample()
201 if (ctx == RT_NULL) in hw_hash_sample()
232 if (ctx == RT_NULL) in hw_hash_sample()
271 struct rt_hwcrypto_ctx *ctx; in hw_aes_cbc() local
[all …]
/bsp/stm32/stm32mp157a-st-ev1/board/ports/
A Dcrypto_sample.c44 struct rt_hwcrypto_ctx *ctx; in hw_crc_sample() local
57 rt_hwcrypto_crc_cfg(ctx, &cfg); in hw_crc_sample()
63 rt_hwcrypto_crc_destroy(ctx); in hw_crc_sample()
107 if (ctx == RT_NULL) in hw_hash_sample()
139 rt_hwcrypto_hash_destroy(ctx); in hw_hash_sample()
143 if (ctx == RT_NULL) in hw_hash_sample()
175 rt_hwcrypto_hash_destroy(ctx); in hw_hash_sample()
179 if (ctx == RT_NULL) in hw_hash_sample()
210 rt_hwcrypto_hash_destroy(ctx); in hw_hash_sample()
214 if (ctx == RT_NULL) in hw_hash_sample()
[all …]
/bsp/stm32/stm32h750-weact-ministm32h7xx/board/port/st7735/
A Dst7735_reg.c46 int32_t st7735_read_reg(st7735_ctx_t *ctx, uint8_t reg, uint8_t *pdata) in st7735_read_reg() argument
48 return ctx->ReadReg(ctx->handle, reg, pdata); in st7735_read_reg()
59 int32_t st7735_write_reg(st7735_ctx_t *ctx, uint8_t reg, uint8_t *pdata, uint32_t length) in st7735_write_reg() argument
61 return ctx->WriteReg(ctx->handle, reg, pdata, length); in st7735_write_reg()
71 int32_t st7735_send_data(st7735_ctx_t *ctx, uint8_t *pdata, uint32_t length) in st7735_send_data() argument
73 return ctx->SendData(ctx->handle, pdata, length); in st7735_send_data()
83 int32_t st7735_recv_data(st7735_ctx_t *ctx, uint8_t *pdata, uint32_t length) in st7735_recv_data() argument
85 return ctx->RecvData(ctx->handle, pdata, length); in st7735_recv_data()
/bsp/synwit/libraries/SWM341_drivers/
A Ddrv_crypto.c53 switch (ctx->crc_cfg.poly) in swm_crc_update()
72 switch (ctx->crc_cfg.width) in swm_crc_update()
87 switch (ctx->crc_cfg.flags) in swm_crc_update()
119 ctx->crc_cfg.last_val = result; in swm_crc_update()
121 swm_crc_cfg.last_val = ctx->crc_cfg.last_val; in swm_crc_update()
166 switch (ctx->type & HWCRYPTO_MAIN_TYPE_MASK) in swm_crypto_create()
178 ctx->contex = crc_cfg; in swm_crypto_create()
198 ctx->contex = rng_cfg; in swm_crypto_create()
215 switch (ctx->type & HWCRYPTO_MAIN_TYPE_MASK) in swm_crypto_destroy()
232 rt_free(ctx->contex); in swm_crypto_destroy()
[all …]
/bsp/synwit/libraries/SWM320_drivers/
A Ddrv_crypto.c63 crc_cfg->inival = ctx->crc_cfg.last_val; in swm_crc_update()
65 switch (ctx->crc_cfg.poly) in swm_crc_update()
77 switch (ctx->crc_cfg.width) in swm_crc_update()
94 switch (ctx->crc_cfg.flags) in swm_crc_update()
116 ctx->crc_cfg.last_val = result; in swm_crc_update()
118 swm_crc_cfg.last_val = ctx->crc_cfg.last_val; in swm_crc_update()
137 switch (ctx->type & HWCRYPTO_MAIN_TYPE_MASK) in swm_crypto_create()
155 ctx->contex = crc_cfg; in swm_crypto_create()
170 switch (ctx->type & HWCRYPTO_MAIN_TYPE_MASK) in swm_crypto_destroy()
181 rt_free(ctx->contex); in swm_crypto_destroy()
[all …]
/bsp/bouffalo_lab/libraries/bl_mcu_sdk/drivers/lhal/include/
A Dbflb_sec_sha.h98 void bflb_sha1_start(struct bflb_device_s *dev, struct bflb_sha1_ctx_s *ctx);
106 void bflb_sha256_start(struct bflb_device_s *dev, struct bflb_sha256_ctx_s *ctx);
114 void bflb_sha512_start(struct bflb_device_s *dev, struct bflb_sha512_ctx_s *ctx);
156 void bflb_sha1_finish(struct bflb_device_s *dev, struct bflb_sha1_ctx_s *ctx, uint8_t *output);
165 void bflb_sha256_finish(struct bflb_device_s *dev, struct bflb_sha256_ctx_s *ctx, uint8_t *output);
227 struct bflb_sha1_link_ctx_s *ctx,
241 struct bflb_sha256_link_ctx_s *ctx,
255 struct bflb_sha512_link_ctx_s *ctx,
267 struct bflb_sha1_link_ctx_s *ctx,
278 struct bflb_sha256_link_ctx_s *ctx,
[all …]
/bsp/hc32/tests/
A Dtest_crypto.c64 struct rt_hwcrypto_ctx *ctx; in crc_test() local
95 rt_hwcrypto_crc_cfg(ctx, &cfg); in crc_test()
103 result = rt_hwcrypto_crc_update(ctx, temp_in, sizeof(temp_in) / 2U); in crc_test()
111 rt_hwcrypto_crc_destroy(ctx); in crc_test()
120 struct rt_hwcrypto_ctx *ctx; in aes_test() local
130 if (ctx == RT_NULL) in aes_test()
186 rt_hwcrypto_symmetric_destroy(ctx); in aes_test()
197 struct rt_hwcrypto_ctx *ctx; in hash_sha256_test() local
200 if (ctx != RT_NULL) in hash_sha256_test()
202 rt_hwcrypto_hash_update(ctx, (rt_uint8_t *)in, rt_strlen(in)); in hash_sha256_test()
[all …]
/bsp/nuvoton/libraries/m031/rtt_port/
A Ddrv_crypto.c28 static rt_err_t nu_hwcrypto_create(struct rt_hwcrypto_ctx *ctx);
29 static void nu_hwcrypto_destroy(struct rt_hwcrypto_ctx *ctx);
31 static void nu_hwcrypto_reset(struct rt_hwcrypto_ctx *ctx);
54 static rt_err_t nu_hwcrypto_create(struct rt_hwcrypto_ctx *ctx) in nu_hwcrypto_create() argument
58 switch (ctx->type & HWCRYPTO_MAIN_TYPE_MASK) in nu_hwcrypto_create()
63 ctx->contex = RT_NULL; in nu_hwcrypto_create()
65 ((struct hwcrypto_crc *)ctx)->ops = &nu_crc_ops; in nu_hwcrypto_create()
78 static void nu_hwcrypto_destroy(struct rt_hwcrypto_ctx *ctx) in nu_hwcrypto_destroy() argument
80 if (ctx->contex) in nu_hwcrypto_destroy()
81 rt_free(ctx->contex); in nu_hwcrypto_destroy()
[all …]
A Ddrv_crc.c104 rt_uint32_t nu_crc_update(struct hwcrypto_crc *ctx, const rt_uint8_t *in, rt_size_t length) in nu_crc_update() argument
111 switch (ctx->crc_cfg.poly) in nu_crc_update()
129 …u32CRCAttr |= (ctx->crc_cfg.flags & CRC_FLAG_REFOUT) ? CRC_CHECKSUM_RVS : 0; //CRC Checksum Reverse in nu_crc_update()
130 … u32CRCAttr |= (ctx->crc_cfg.flags & CRC_FLAG_REFIN) ? CRC_WDATA_RVS : 0; //CRC Write Data Reverse in nu_crc_update()
133 crc_result = nu_crc_run(u32OpMode, ctx->crc_cfg.last_val, u32CRCAttr, (uint8_t *)in, length); in nu_crc_update()
136 ctx->crc_cfg.last_val = crc_result; in nu_crc_update()
137 return crc_result ^ 0x00 ^ ctx->crc_cfg.xorout; in nu_crc_update()
/bsp/w60x/drivers/
A Ddrv_crypto.c82 switch (ctx->crc_cfg.poly) in _crc_update()
119 ctx->crc_cfg.last_val = crc_result; in _crc_update()
603 ctx->contex = RT_NULL; in _crypto_create()
607 ctx->contex = RT_NULL; in _crypto_create()
618 ctx->contex = contex; in _crypto_create()
630 ctx->contex = RT_NULL; in _crypto_create()
634 ctx->contex = RT_NULL; in _crypto_create()
638 ctx->contex = RT_NULL; in _crypto_create()
640 ctx->contex = RT_NULL; in _crypto_create()
643 ctx->contex = RT_NULL; in _crypto_create()
[all …]
/bsp/nxp/imx/imxrt/libraries/drivers/vglite/VGLite/
A Dvg_lite.c3363 memset(ctx->ts_record, 0, sizeof(ctx->ts_record)); in _allocate_command_buffer()
6059 (ctx->scissor[0] + ctx->scissor[2] <= x) || in vg_lite_clear()
6061 (ctx->scissor[1] + ctx->scissor[3] <= y)) in vg_lite_clear()
6069 … right = (right < ctx->scissor[0] + ctx->scissor[2] ? right : ctx->scissor[0] + ctx->scissor[2]); in vg_lite_clear()
6070 …bottom = (bottom < ctx->scissor[1] + ctx->scissor[3] ? bottom : ctx->scissor[1] + ctx->scissor[3]); in vg_lite_clear()
6939 memcpy(CMDBUF_BUFFER(*ctx) + CMDBUF_OFFSET(*ctx), ctx->ts_record, 80); in vg_lite_draw()
7138 _memset(&ctx->s_ftable, 0, sizeof(ctx->s_ftable)); in vg_lite_close()
7150 _memset(ctx, 0, sizeof(*ctx)); in vg_lite_close()
8437 memcpy(CMDBUF_BUFFER(*ctx) + CMDBUF_OFFSET(*ctx), ctx->ts_record, 80); in vg_lite_draw_pattern()
8908 memcpy(CMDBUF_BUFFER(*ctx) + CMDBUF_OFFSET(*ctx), ctx->ts_record, 80); in vg_lite_draw_linear_gradient()
[all …]
/bsp/qemu-virt64-riscv/applications/test/test_vector/
A Dtest_vector.c76 void **ctx = param; in vector_child() local
77 uint64_t *reg = ctx[0]; in vector_child()
83 rt_hw_vector_ctx_restore(ctx[0]); in vector_child()
95 rt_hw_vector_ctx_save(ctx[0]); in vector_child()
97 rt_memcpy(ctx[1], ctx[0], VECTOR_CTX_BYTES); in vector_child()
102 rt_hw_vector_ctx_save(ctx[0]); in vector_child()
104 uassert_false(rt_memcmp(ctx[1], ctx[0], VECTOR_CTX_BYTES)); in vector_child()
/bsp/nuvoton/libraries/m2354/rtt_port/
A Ddrv_crypto.c620 RT_ASSERT(ctx != RT_NULL); in nu_hwcrypto_create()
622 switch (ctx->type & HWCRYPTO_MAIN_TYPE_MASK) in nu_hwcrypto_create()
627 ctx->contex = RT_NULL; in nu_hwcrypto_create()
637 ctx->contex = RT_NULL; in nu_hwcrypto_create()
647 ctx->contex = RT_NULL; in nu_hwcrypto_create()
658 if (ctx->contex == RT_NULL) in nu_hwcrypto_create()
673 nu_hwcrypto_reset(ctx); in nu_hwcrypto_create()
680 RT_ASSERT(ctx != RT_NULL); in nu_hwcrypto_destroy()
682 if (ctx->contex) in nu_hwcrypto_destroy()
683 rt_free(ctx->contex); in nu_hwcrypto_destroy()
[all …]
A Ddrv_crc.c103 rt_uint32_t nu_crc_update(struct hwcrypto_crc *ctx, const rt_uint8_t *in, rt_size_t length) in nu_crc_update() argument
110 switch (ctx->crc_cfg.poly) in nu_crc_update()
128 …u32CRCAttr |= (ctx->crc_cfg.flags & CRC_FLAG_REFOUT) ? CRC_CHECKSUM_RVS : 0; //CRC Checksum Reverse in nu_crc_update()
129 … u32CRCAttr |= (ctx->crc_cfg.flags & CRC_FLAG_REFIN) ? CRC_WDATA_RVS : 0; //CRC Write Data Reverse in nu_crc_update()
132 crc_result = nu_crc_run(u32OpMode, ctx->crc_cfg.last_val, u32CRCAttr, (uint8_t *)in, length); in nu_crc_update()
135 ctx->crc_cfg.last_val = crc_result; in nu_crc_update()
136 return crc_result ^ 0x00 ^ ctx->crc_cfg.xorout; in nu_crc_update()
/bsp/nuvoton/libraries/m460/rtt_port/
A Ddrv_crypto.c619 RT_ASSERT(ctx != RT_NULL); in nu_hwcrypto_create()
621 switch (ctx->type & HWCRYPTO_MAIN_TYPE_MASK) in nu_hwcrypto_create()
626 ctx->contex = RT_NULL; in nu_hwcrypto_create()
636 ctx->contex = RT_NULL; in nu_hwcrypto_create()
646 ctx->contex = RT_NULL; in nu_hwcrypto_create()
657 if (ctx->contex == RT_NULL) in nu_hwcrypto_create()
672 nu_hwcrypto_reset(ctx); in nu_hwcrypto_create()
679 RT_ASSERT(ctx != RT_NULL); in nu_hwcrypto_destroy()
681 if (ctx->contex) in nu_hwcrypto_destroy()
682 rt_free(ctx->contex); in nu_hwcrypto_destroy()
[all …]
A Ddrv_crc.c103 rt_uint32_t nu_crc_update(struct hwcrypto_crc *ctx, const rt_uint8_t *in, rt_size_t length) in nu_crc_update() argument
110 switch (ctx->crc_cfg.poly) in nu_crc_update()
128 …u32CRCAttr |= (ctx->crc_cfg.flags & CRC_FLAG_REFOUT) ? CRC_CHECKSUM_RVS : 0; //CRC Checksum Reverse in nu_crc_update()
129 … u32CRCAttr |= (ctx->crc_cfg.flags & CRC_FLAG_REFIN) ? CRC_WDATA_RVS : 0; //CRC Write Data Reverse in nu_crc_update()
132 crc_result = nu_crc_run(u32OpMode, ctx->crc_cfg.last_val, u32CRCAttr, (uint8_t *)in, length); in nu_crc_update()
135 ctx->crc_cfg.last_val = crc_result; in nu_crc_update()
136 return crc_result ^ 0x00 ^ ctx->crc_cfg.xorout; in nu_crc_update()
/bsp/nuvoton/libraries/n9h30/rtt_port/
A Ddrv_crypto.c812 RT_ASSERT(ctx != RT_NULL); in nu_hwcrypto_create()
819 ctx->contex = RT_NULL; in nu_hwcrypto_create()
827 ctx->contex = RT_NULL; in nu_hwcrypto_create()
835 ctx->contex = RT_NULL; in nu_hwcrypto_create()
846 if (ctx->contex == RT_NULL) in nu_hwcrypto_create()
859 if (ctx->contex == RT_NULL) in nu_hwcrypto_create()
870 ctx->contex = RT_NULL; in nu_hwcrypto_create()
888 RT_ASSERT(ctx != RT_NULL); in nu_hwcrypto_destroy()
890 if (ctx->contex) in nu_hwcrypto_destroy()
891 rt_free(ctx->contex); in nu_hwcrypto_destroy()
[all …]
/bsp/nuvoton/libraries/nuc980/rtt_port/
A Ddrv_crypto.c619 RT_ASSERT(ctx != RT_NULL); in nu_hwcrypto_create()
621 switch (ctx->type & HWCRYPTO_MAIN_TYPE_MASK) in nu_hwcrypto_create()
626 ctx->contex = RT_NULL; in nu_hwcrypto_create()
637 if (ctx->contex == RT_NULL) in nu_hwcrypto_create()
648 ctx->contex = RT_NULL; in nu_hwcrypto_create()
663 nu_hwcrypto_reset(ctx); in nu_hwcrypto_create()
670 RT_ASSERT(ctx != RT_NULL); in nu_hwcrypto_destroy()
672 if (ctx->contex) in nu_hwcrypto_destroy()
673 rt_free(ctx->contex); in nu_hwcrypto_destroy()
693 switch (ctx->type & HWCRYPTO_MAIN_TYPE_MASK) in nu_hwcrypto_reset()
[all …]
/bsp/nuvoton/libraries/m480/rtt_port/
A Ddrv_crc.c103 rt_uint32_t nu_crc_update(struct hwcrypto_crc *ctx, const rt_uint8_t *in, rt_size_t length) in nu_crc_update() argument
110 switch (ctx->crc_cfg.poly) in nu_crc_update()
128 …u32CRCAttr |= (ctx->crc_cfg.flags & CRC_FLAG_REFOUT) ? CRC_CHECKSUM_RVS : 0; //CRC Checksum Reverse in nu_crc_update()
129 … u32CRCAttr |= (ctx->crc_cfg.flags & CRC_FLAG_REFIN) ? CRC_WDATA_RVS : 0; //CRC Write Data Reverse in nu_crc_update()
132 crc_result = nu_crc_run(u32OpMode, ctx->crc_cfg.last_val, u32CRCAttr, (uint8_t *)in, length); in nu_crc_update()
135 ctx->crc_cfg.last_val = crc_result; in nu_crc_update()
136 return crc_result ^ 0x00 ^ ctx->crc_cfg.xorout; in nu_crc_update()
A Ddrv_crypto.c802 RT_ASSERT(ctx != RT_NULL); in nu_hwcrypto_create()
809 ctx->contex = RT_NULL; in nu_hwcrypto_create()
819 ctx->contex = RT_NULL; in nu_hwcrypto_create()
829 ctx->contex = RT_NULL; in nu_hwcrypto_create()
838 ctx->contex = RT_NULL; in nu_hwcrypto_create()
850 if (ctx->contex == RT_NULL) in nu_hwcrypto_create()
865 nu_hwcrypto_reset(ctx); in nu_hwcrypto_create()
872 RT_ASSERT(ctx != RT_NULL); in nu_hwcrypto_destroy()
874 if (ctx->contex) in nu_hwcrypto_destroy()
875 rt_free(ctx->contex); in nu_hwcrypto_destroy()
[all …]
/bsp/hpmicro/libraries/hpm_sdk/soc/HPM6700/HPM6750/
A Dhpm_romapi.h266 hpm_stat_t (*init)(sm3_context_t *ctx);
270 hpm_stat_t (*finalize)(sm3_context_t *ctx, uint8_t output[32]);
277 void (*setkey_enc)(sm4_context_t *ctx, const uint8_t key[16]);
279 void (*setkey_dec)(sm4_context_t *ctx, const uint8_t key[16]);
343 static inline hpm_stat_t rom_enter_bootloader(void *ctx) in rom_enter_bootloader() argument
345 return ROM_API_TABLE_ROOT->run_bootloader(ctx); in rom_enter_bootloader()
916 static inline hpm_stat_t rom_sm3_init(sm3_context_t *ctx) in rom_sm3_init() argument
918 return ROM_API_TABLE_ROOT->sm3_api_if->init(ctx); in rom_sm3_init()
944 return ROM_API_TABLE_ROOT->sm3_api_if->finalize(ctx, output); in rom_sm3_finalize()
962 ROM_API_TABLE_ROOT->sm4_api_if->setkey_enc(ctx, key); in rom_sm4_setkey_enc()
[all …]

Completed in 80 milliseconds

123