Home
last modified time | relevance | path

Searched refs:mode (Results 1 – 25 of 189) sorted by relevance

12345678

/optee_os/core/crypto/
H A Daes-cts.c37 TEE_OperationMode mode; member
50 TEE_OperationMode mode, const uint8_t *key1, in cts_init() argument
57 c->mode = mode; in cts_init()
59 res = crypto_cipher_init(c->ecb, mode, key1, key1_len, key2, key2_len, in cts_init()
64 return crypto_cipher_init(c->cbc, mode, key1, key1_len, key2, key2_len, in cts_init()
94 TEE_OperationMode mode, bool last_block, in cbc_cts_update() argument
106 mode, last_block, data, len, dst); in cbc_cts_update()
116 if (mode == TEE_MODE_ENCRYPT) { in cbc_cts_update()
125 mode, 0, data, in cbc_cts_update()
135 mode, 0, tmp_block, block_size, in cbc_cts_update()
[all …]
H A Dsm4_accel.c15 ctx->mode = SM4_ENCRYPT; in sm4_setkey_enc()
21 ctx->mode = SM4_DECRYPT; in sm4_setkey_dec()
38 if (ctx->mode == SM4_ENCRYPT) in sm4_crypt_cbc()
59 if (ctx->mode == SM4_ENCRYPT) in sm4_crypt_xts()
/optee_os/core/pta/tests/
H A Daes_perf.c52 static TEE_Result init_ctx(void **ctx, uint32_t algo, TEE_OperationMode mode, in init_ctx() argument
97 res = crypto_cipher_init(*ctx, mode, aes_key, key_len, key2, in init_ctx()
101 res = crypto_authenc_init(*ctx, mode, aes_key, key_len, aes_iv, in init_ctx()
115 static TEE_Result update_ae(void *ctx, TEE_OperationMode mode, in update_ae() argument
120 return crypto_authenc_update_payload(ctx, mode, src, len, dst, &dlen); in update_ae()
123 static TEE_Result update_cipher(void *ctx, TEE_OperationMode mode, in update_cipher() argument
126 return crypto_cipher_update(ctx, mode, false, src, len, dst); in update_cipher()
129 static TEE_Result do_update(void *ctx, uint32_t algo, TEE_OperationMode mode, in do_update() argument
133 TEE_Result (*update_func)(void *ctx, TEE_OperationMode mode, in do_update()
147 res = update_func(ctx, mode, in + m * unit_size, in do_update()
[all …]
/optee_os/core/drivers/pm/sam/
H A Dat91_pm.c28 #error Invalid suspend mode, please check CFG_ATMEL_PM_SUSPEND_MODE
53 unsigned int mode = args->a1; in at91_pm_set_suspend_mode() local
64 if (mode > AT91_PM_BACKUP) { in at91_pm_set_suspend_mode()
68 DMSG("Setting suspend mode to %u", mode); in at91_pm_set_suspend_mode()
71 soc_pm.mode = mode; in at91_pm_set_suspend_mode()
78 args->a1 = soc_pm.mode; in at91_pm_get_suspend_mode()
111 static void at91_sam_config_shdwc_ws(vaddr_t shdwc, uint32_t *mode, in at91_sam_config_shdwc_ws() argument
118 *mode |= val & AT91_SHDW_WKUPEN_MASK; in at91_sam_config_shdwc_ws()
122 static int at91_sam_config_pmc_ws(vaddr_t pmc, uint32_t mode, uint32_t polarity) in at91_sam_config_pmc_ws() argument
124 io_write32(pmc + AT91_PMC_FSMR, mode); in at91_sam_config_pmc_ws()
[all …]
/optee_os/core/lib/zlib/
H A Dinflate.c115 state->mode < HEAD || state->mode > SYNC)
131 state->mode = HEAD;
232 state->mode = HEAD; /* to pass state test in inflateReset2() */
652 if (state->mode == TYPE) state->mode = TYPEDO; /* skip check */
658 switch (state->mode) {
661 state->mode = TYPEDO;
672 state->mode = FLAGS;
683 state->mode = BAD;
688 state->mode = BAD;
697 state->mode = BAD;
[all …]
H A Dzutil.h116 # define F_OPEN(name, mode) \ argument
117 fopen((name), (mode), "mbc=60", "ctx=stm", "rfm=fix", "mrs=512")
148 # define fdopen(fd,mode) NULL /* No fdopen() */ argument
175 # define fdopen(fd,mode) NULL /* No fdopen() */ argument
180 # define fdopen(fd,mode) NULL /* No fdopen() */ argument
206 # define F_OPEN(name, mode) fopen((name), (mode)) argument
/optee_os/core/lib/libtomcrypt/src/misc/base64/
H A Dbase64_encode.c24 enum mode { enum
35 const char *codes, unsigned int mode) in s_base64_encode_internal() argument
42 linelen = (mode & ssh) ? 72 : 64; in s_base64_encode_internal()
46 if ((mode & crlf) == lf) { in s_base64_encode_internal()
48 } else if ((mode & crlf) == crlf) { in s_base64_encode_internal()
72 if (mode & cr) *p++ = '\r'; in s_base64_encode_internal()
73 if (mode & lf) *p++ = '\n'; in s_base64_encode_internal()
83 if (mode & pad) { in s_base64_encode_internal()
H A Dbase64_decode.c80 const unsigned char *map, int mode) in s_base64_decode_internal() argument
92 if ((in[x] == 0) && (x == (inlen - 1)) && (mode != strict)) { in s_base64_decode_internal()
101 if (mode == strict) { in s_base64_decode_internal()
107 if (mode == insane) { in s_base64_decode_internal()
112 if ((g > 0) && (mode != insane)) { in s_base64_decode_internal()
130 if (((y + g) != 4) && (mode == strict) && (map != map_base64url)) return CRYPT_INVALID_PACKET; in s_base64_decode_internal()
/optee_os/lib/libmbedtls/mbedtls/library/
H A Dcipher.c121 const mbedtls_cipher_mode_t mode) in mbedtls_cipher_info_from_values() argument
128 def->info->mode == mode) { in mbedtls_cipher_info_from_values()
179 mbedtls_cipher_mode_t mode, size_t taglen) in mbedtls_psa_translate_cipher_mode() argument
181 switch (mode) { in mbedtls_psa_translate_cipher_mode()
310 alg = mbedtls_psa_translate_cipher_mode(((mbedtls_cipher_mode_t) cipher_info->mode), taglen); in mbedtls_cipher_setup_psa()
354 if (MBEDTLS_MODE_ECB == ((mbedtls_cipher_mode_t) ctx->cipher_info->mode) && in mbedtls_cipher_setkey()
431 MBEDTLS_MODE_CFB == ((mbedtls_cipher_mode_t) ctx->cipher_info->mode) || in mbedtls_cipher_setkey()
432 MBEDTLS_MODE_OFB == ((mbedtls_cipher_mode_t) ctx->cipher_info->mode) || in mbedtls_cipher_setkey()
433 MBEDTLS_MODE_CTR == ((mbedtls_cipher_mode_t) ctx->cipher_info->mode)) { in mbedtls_cipher_setkey()
510 if (MBEDTLS_MODE_GCM == ((mbedtls_cipher_mode_t) ctx->cipher_info->mode)) { in mbedtls_cipher_set_iv()
[all …]
H A Dpadlock.c58 int mode, in mbedtls_padlock_xcryptecb() argument
78 *ctrl = 0x80 | ctx->nr | ((ctx->nr + (mode^1) - 10) << 9); in mbedtls_padlock_xcryptecb()
104 int mode, in mbedtls_padlock_xcryptcbc() argument
129 *ctrl = 0x80 | ctx->nr | ((ctx->nr + (mode ^ 1) - 10) << 9); in mbedtls_padlock_xcryptcbc()
H A Dpsa_crypto_cipher.c127 mbedtls_cipher_mode_t *mode, in mbedtls_cipher_values_from_psa() argument
144 *mode = MBEDTLS_MODE_STREAM; in mbedtls_cipher_values_from_psa()
149 *mode = MBEDTLS_MODE_CTR; in mbedtls_cipher_values_from_psa()
154 *mode = MBEDTLS_MODE_CFB; in mbedtls_cipher_values_from_psa()
159 *mode = MBEDTLS_MODE_OFB; in mbedtls_cipher_values_from_psa()
164 *mode = MBEDTLS_MODE_ECB; in mbedtls_cipher_values_from_psa()
169 *mode = MBEDTLS_MODE_CBC; in mbedtls_cipher_values_from_psa()
174 *mode = MBEDTLS_MODE_CBC; in mbedtls_cipher_values_from_psa()
179 *mode = MBEDTLS_MODE_CCM_STAR_NO_TAG; in mbedtls_cipher_values_from_psa()
184 *mode = MBEDTLS_MODE_CCM; in mbedtls_cipher_values_from_psa()
[all …]
H A Dcipher_wrap.h79 int (*ecb_func)(void *ctx, mbedtls_operation_t mode,
84 int (*cbc_func)(void *ctx, mbedtls_operation_t mode, size_t length,
91 int (*cfb_func)(void *ctx, mbedtls_operation_t mode, size_t length, size_t *iv_off,
113 int (*xts_func)(void *ctx, mbedtls_operation_t mode, size_t length,
H A Dchachapoly.c77 ctx->mode = MBEDTLS_CHACHAPOLY_ENCRYPT; in mbedtls_chachapoly_init()
91 ctx->mode = MBEDTLS_CHACHAPOLY_ENCRYPT; in mbedtls_chachapoly_free()
106 mbedtls_chachapoly_mode_t mode) in mbedtls_chachapoly_starts() argument
135 ctx->mode = mode; in mbedtls_chachapoly_starts()
179 if (ctx->mode == MBEDTLS_CHACHAPOLY_ENCRYPT) { in mbedtls_chachapoly_update()
245 mbedtls_chachapoly_mode_t mode, in chachapoly_crypt_and_tag() argument
256 ret = mbedtls_chachapoly_starts(ctx, nonce, mode); in chachapoly_crypt_and_tag()
/optee_os/core/include/dt-bindings/pinctrl/
H A Dstm32-pinfunc.h34 #define STM32_PINMUX(port, line, mode) (((PIN_NO(port, line)) << 8) | (mode)) argument
38 #define STM32_PINMUX_NSEC(port, line, mode) \ argument
39 (STM32_PIN_NSEC | STM32_PINMUX((port), (line), (mode)))
/optee_os/core/lib/libtomcrypt/src/misc/padding/
H A Dpadding_pad.c14 static int s_padding_padded_length(unsigned long *length, unsigned long mode) in s_padding_padded_length() argument
21 block_length = mode & 0xff; in s_padding_padded_length()
22 padding = mode & LTC_PAD_MASK; in s_padding_padded_length()
80 …ng_pad(unsigned char *data, unsigned long length, unsigned long* padded_length, unsigned long mode) in padding_pad() argument
91 if ((err = s_padding_padded_length(&l, mode)) != CRYPT_OK) { in padding_pad()
95 type = mode & LTC_PAD_MASK; in padding_pad()
/optee_os/core/arch/arm/dts/
H A Dat91-sama5d27_wlsom1.dtsi35 atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_USART>;
73 regulator-initial-mode = <2>;
79 regulator-mode = <4>;
84 regulator-mode = <4>;
92 regulator-initial-mode = <2>;
100 regulator-mode = <4>;
107 regulator-mode = <4>;
115 regulator-initial-mode = <2>;
121 regulator-mode = <4>;
126 regulator-mode = <4>;
[all …]
H A Dat91-sama7g54_ek.dts209 atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_USART>;
220 atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_TWI>;
275 regulator-initial-mode = <2>;
282 regulator-mode = <4>;
287 regulator-mode = <4>;
295 regulator-initial-mode = <2>;
302 regulator-mode = <4>;
308 regulator-mode = <4>;
316 regulator-initial-mode = <2>;
323 regulator-mode = <4>;
[all …]
/optee_os/core/drivers/crypto/hisilicon/
H A Dsec_cipher.c64 enum sec_c_mode mode, in sec_cipher_aes_get_c_key_len() argument
67 switch (mode) { in sec_cipher_aes_get_c_key_len()
108 enum sec_c_mode mode, in sec_cipher_sm4_get_c_key_len() argument
111 switch (mode) { in sec_cipher_sm4_get_c_key_len()
152 ret = sec_cipher_aes_get_c_key_len(key_len, c_ctx->mode, in sec_cipher_set_key()
156 ret = sec_cipher_sm4_get_c_key_len(key_len, c_ctx->mode, in sec_cipher_set_key()
223 ecb_ctx.mode = C_MODE_ECB; in xts_iv_update()
258 switch (c_ctx->mode) { in sec_update_iv()
287 switch (c_ctx->mode) { in sec_cipher_iv_check()
357 sqe->type2.icvw_kmode = SHIFT_U32(c_ctx->mode, SEC_CMODE_OFFSET) | in sec_cipher_bd_fill()
[all …]
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/
H A Daes.h248 int mode,
296 int mode,
341 int mode,
390 int mode,
435 int mode,
H A Dcamellia.h118 int mode,
152 int mode,
198 int mode,
/optee_os/core/lib/libtomcrypt/src/mac/omac/
H A Domac_done.c21 int err, mode; in omac_done() local
45 mode = 1; in omac_done()
47 mode = 0; in omac_done()
52 omac->block[x] ^= omac->prev[x] ^ omac->Lu[mode][x]; in omac_done()
/optee_os/core/drivers/crypto/se050/glue/
H A Di2c.c17 static int i2c_transfer(uint8_t *buffer, int len, enum rpc_i2c_mode mode) in i2c_transfer() argument
22 .mode = mode, in i2c_transfer()
/optee_os/core/arch/arm/kernel/
H A Drpc_io_i2c.c37 if (req->mode == RPC_I2C_MODE_WRITE) in rpc_io_i2c_transfer()
40 p[0] = THREAD_PARAM_VALUE(IN, req->mode, req->bus, req->chip); in rpc_io_i2c_transfer()
58 if (req->mode == RPC_I2C_MODE_READ) in rpc_io_i2c_transfer()
/optee_os/core/lib/libtomcrypt/src/pk/ecc/
H A Dltc_ecc_mulmod.c32 int first, bitbuf, bitcpy, bitcnt, mode, digidx; in ltc_ecc_mulmod() local
97 mode = 0; in ltc_ecc_mulmod()
121 if (mode == 0 && i == 0) { in ltc_ecc_mulmod()
126 if (mode == 1 && i == 0) { in ltc_ecc_mulmod()
133 mode = 2; in ltc_ecc_mulmod()
154 mode = 1; in ltc_ecc_mulmod()
159 if (mode == 2 && bitcpy > 0) { in ltc_ecc_mulmod()
/optee_os/core/tee/
H A Dtee_fs_key_manager.c73 TEE_Result tee_fs_fek_crypt(const TEE_UUID *uuid, TEE_OperationMode mode, in tee_fs_fek_crypt() argument
113 res = crypto_cipher_init(ctx, mode, tsk, sizeof(tsk), NULL, 0, NULL, 0); in tee_fs_fek_crypt()
117 res = crypto_cipher_update(ctx, mode, true, in_key, size, dst_key); in tee_fs_fek_crypt()
232 TEE_OperationMode mode) in tee_fs_crypt_block() argument
239 DMSG("%scrypt block #%u", (mode == TEE_MODE_ENCRYPT) ? "En" : "De", in tee_fs_crypt_block()
258 res = crypto_cipher_init(ctx, mode, fek, sizeof(fek), NULL, in tee_fs_crypt_block()
262 res = crypto_cipher_update(ctx, mode, true, in, size, out); in tee_fs_crypt_block()

12345678