Home
last modified time | relevance | path

Searched refs:algo (Results 1 – 25 of 85) sorted by relevance

1234

/optee_os/out/arm/export-ta_arm64/host_include/
A Dutee_defines.h57 if (algo == TEE_ALG_SM2_PKE) in __tee_alg_get_class()
69 #define TEE_ALG_GET_CLASS(algo) __tee_alg_get_class(algo) argument
73 switch (algo) { in __tee_alg_get_main_alg()
82 return algo & 0xff; in __tee_alg_get_main_alg()
85 #define TEE_ALG_GET_MAIN_ALG(algo) __tee_alg_get_main_alg(algo) argument
88 #define TEE_ALG_GET_CHAIN_MODE(algo) (((algo) >> 8) & 0xF) argument
104 return (algo >> 12) & 0xF; in __tee_alg_get_digest_hash()
107 #define TEE_ALG_GET_DIGEST_HASH(algo) __tee_alg_get_digest_hash(algo) argument
110 #define TEE_ALG_GET_INTERNAL_HASH(algo) (((algo) >> 20) & 0x7) argument
176 switch (algo) { in __tee_alg_get_digest_size()
[all …]
/optee_os/out/arm/export-ta_arm64/include/
A Dutee_defines.h57 if (algo == TEE_ALG_SM2_PKE) in __tee_alg_get_class()
69 #define TEE_ALG_GET_CLASS(algo) __tee_alg_get_class(algo) argument
73 switch (algo) { in __tee_alg_get_main_alg()
82 return algo & 0xff; in __tee_alg_get_main_alg()
85 #define TEE_ALG_GET_MAIN_ALG(algo) __tee_alg_get_main_alg(algo) argument
88 #define TEE_ALG_GET_CHAIN_MODE(algo) (((algo) >> 8) & 0xF) argument
104 return (algo >> 12) & 0xF; in __tee_alg_get_digest_hash()
107 #define TEE_ALG_GET_DIGEST_HASH(algo) __tee_alg_get_digest_hash(algo) argument
110 #define TEE_ALG_GET_INTERNAL_HASH(algo) (((algo) >> 20) & 0x7) argument
176 switch (algo) { in __tee_alg_get_digest_size()
[all …]
/optee_os/lib/libutee/include/
A Dutee_defines.h57 if (algo == TEE_ALG_SM2_PKE) in __tee_alg_get_class()
69 #define TEE_ALG_GET_CLASS(algo) __tee_alg_get_class(algo) argument
73 switch (algo) { in __tee_alg_get_main_alg()
82 return algo & 0xff; in __tee_alg_get_main_alg()
85 #define TEE_ALG_GET_MAIN_ALG(algo) __tee_alg_get_main_alg(algo) argument
88 #define TEE_ALG_GET_CHAIN_MODE(algo) (((algo) >> 8) & 0xF) argument
104 return (algo >> 12) & 0xF; in __tee_alg_get_digest_hash()
107 #define TEE_ALG_GET_DIGEST_HASH(algo) __tee_alg_get_digest_hash(algo) argument
110 #define TEE_ALG_GET_INTERNAL_HASH(algo) (((algo) >> 20) & 0x7) argument
176 switch (algo) { in __tee_alg_get_digest_size()
[all …]
/optee_os/out/arm/export-ta_arm32/host_include/
A Dutee_defines.h57 if (algo == TEE_ALG_SM2_PKE) in __tee_alg_get_class()
69 #define TEE_ALG_GET_CLASS(algo) __tee_alg_get_class(algo) argument
73 switch (algo) { in __tee_alg_get_main_alg()
82 return algo & 0xff; in __tee_alg_get_main_alg()
85 #define TEE_ALG_GET_MAIN_ALG(algo) __tee_alg_get_main_alg(algo) argument
88 #define TEE_ALG_GET_CHAIN_MODE(algo) (((algo) >> 8) & 0xF) argument
104 return (algo >> 12) & 0xF; in __tee_alg_get_digest_hash()
107 #define TEE_ALG_GET_DIGEST_HASH(algo) __tee_alg_get_digest_hash(algo) argument
110 #define TEE_ALG_GET_INTERNAL_HASH(algo) (((algo) >> 20) & 0x7) argument
176 switch (algo) { in __tee_alg_get_digest_size()
[all …]
/optee_os/out/arm/export-ta_arm32/include/
A Dutee_defines.h57 if (algo == TEE_ALG_SM2_PKE) in __tee_alg_get_class()
69 #define TEE_ALG_GET_CLASS(algo) __tee_alg_get_class(algo) argument
73 switch (algo) { in __tee_alg_get_main_alg()
82 return algo & 0xff; in __tee_alg_get_main_alg()
85 #define TEE_ALG_GET_MAIN_ALG(algo) __tee_alg_get_main_alg(algo) argument
88 #define TEE_ALG_GET_CHAIN_MODE(algo) (((algo) >> 8) & 0xF) argument
104 return (algo >> 12) & 0xF; in __tee_alg_get_digest_hash()
107 #define TEE_ALG_GET_DIGEST_HASH(algo) __tee_alg_get_digest_hash(algo) argument
110 #define TEE_ALG_GET_INTERNAL_HASH(algo) (((algo) >> 20) & 0x7) argument
176 switch (algo) { in __tee_alg_get_digest_size()
[all …]
/optee_os/core/pta/tests/
A Daes_perf.c45 if (algo == TEE_ALG_AES_GCM) in free_ctx()
70 switch (algo) { in init_ctx()
90 switch (algo) { in init_ctx()
111 free_ctx(ctx, algo); in init_ctx()
141 if (algo == TEE_ALG_AES_GCM) in do_update()
173 uint32_t algo = 0; in core_aes_perf_tests() local
181 algo = TEE_ALG_AES_ECB_NOPAD; in core_aes_perf_tests()
187 algo = TEE_ALG_AES_CTR; in core_aes_perf_tests()
190 algo = TEE_ALG_AES_XTS; in core_aes_perf_tests()
193 algo = TEE_ALG_AES_GCM; in core_aes_perf_tests()
[all …]
/optee_os/core/lib/libtomcrypt/
A Decc.c59 if ((algo != 0) && (algo != TEE_ALG_ECDSA_P192) && in ecc_get_curve_info()
60 (algo != TEE_ALG_ECDH_P192)) in ecc_get_curve_info()
67 if ((algo != 0) && (algo != TEE_ALG_ECDSA_P224) && in ecc_get_curve_info()
68 (algo != TEE_ALG_ECDH_P224)) in ecc_get_curve_info()
75 if ((algo != 0) && (algo != TEE_ALG_ECDSA_P256) && in ecc_get_curve_info()
83 if ((algo != 0) && (algo != TEE_ALG_ECDSA_P384) && in ecc_get_curve_info()
91 if ((algo != 0) && (algo != TEE_ALG_ECDSA_P521) && in ecc_get_curve_info()
99 if ((algo != 0) && (algo != TEE_ALG_SM2_PKE) && in ecc_get_curve_info()
101 (algo != TEE_ALG_SM2_KEP)) in ecc_get_curve_info()
255 if (algo == 0) in _ltc_ecc_sign()
[all …]
A Ddsa.c95 TEE_Result crypto_acipher_dsa_sign(uint32_t algo, struct dsa_keypair *key, in crypto_acipher_dsa_sign() argument
113 if (algo != TEE_ALG_DSA_SHA1 && in crypto_acipher_dsa_sign()
114 algo != TEE_ALG_DSA_SHA224 && in crypto_acipher_dsa_sign()
115 algo != TEE_ALG_DSA_SHA256) { in crypto_acipher_dsa_sign()
120 res = tee_alg_get_digest_size(TEE_DIGEST_HASH_TO_ALGO(algo), in crypto_acipher_dsa_sign()
164 TEE_Result crypto_acipher_dsa_verify(uint32_t algo, struct dsa_public_key *key, in crypto_acipher_dsa_verify() argument
180 if (algo != TEE_ALG_DSA_SHA1 && in crypto_acipher_dsa_verify()
181 algo != TEE_ALG_DSA_SHA224 && in crypto_acipher_dsa_verify()
182 algo != TEE_ALG_DSA_SHA256) { in crypto_acipher_dsa_verify()
A Drsa.c28 switch (algo) { in tee_algo_to_ltc_hashindex()
304 res = tee_algo_to_ltc_hashindex(algo, &ltc_hashindex); in crypto_acipher_rsaes_decrypt()
315 if (algo == TEE_ALG_RSAES_PKCS1_V1_5) { in crypto_acipher_rsaes_decrypt()
375 TEE_Result crypto_acipher_rsaes_encrypt(uint32_t algo, in crypto_acipher_rsaes_encrypt() argument
399 res = tee_algo_to_ltc_hashindex(algo, &ltc_hashindex); in crypto_acipher_rsaes_encrypt()
403 if (algo == TEE_ALG_RSAES_PKCS1_V1_5) in crypto_acipher_rsaes_encrypt()
455 switch (algo) { in crypto_acipher_rsassa_sign()
523 TEE_Result crypto_acipher_rsassa_verify(uint32_t algo, in crypto_acipher_rsassa_verify() argument
539 if (algo != TEE_ALG_RSASSA_PKCS1_V1_5) { in crypto_acipher_rsassa_verify()
558 if (algo != TEE_ALG_RSASSA_PKCS1_V1_5) { in crypto_acipher_rsassa_verify()
[all …]
A Dacipher_helpers.h41 uint32_t algo, size_t *key_size_bytes);
44 uint32_t algo, size_t *key_size_bytes);
55 TEE_Result sm2_ltc_dsa_sign(uint32_t algo, struct ecc_keypair *key,
59 TEE_Result sm2_ltc_dsa_verify(uint32_t algo, struct ecc_public_key *key,
64 sm2_ltc_dsa_sign(uint32_t algo __unused, struct ecc_keypair *key __unused, in sm2_ltc_dsa_sign()
72 sm2_ltc_dsa_verify(uint32_t algo __unused, struct ecc_public_key *key __unused, in sm2_ltc_dsa_verify()
/optee_os/core/drivers/crypto/se050/core/
A Decc.c23 switch (algo) { in algo_tee2se050()
111 if (algo && algo != TEE_ALG_ECDSA_P192 && in ecc_get_key_size()
112 algo != TEE_ALG_ECDH_P192) in ecc_get_key_size()
118 if (algo && algo != TEE_ALG_ECDSA_P224 && in ecc_get_key_size()
125 if (algo && algo != TEE_ALG_ECDSA_P256 && in ecc_get_key_size()
132 if (algo && algo != TEE_ALG_ECDSA_P384 && in ecc_get_key_size()
139 if (algo && algo != TEE_ALG_ECDSA_P521 && in ecc_get_key_size()
154 uint32_t algo; in ecc_prepare_msg() member
166 if (algo == map[i].algo) in ecc_prepare_msg()
611 return sign(sdata->algo, in do_sign()
[all …]
/optee_os/lib/libmbedtls/core/
A Decc.c62 if ((algo != 0) && (algo != TEE_ALG_ECDSA_P192) && in ecc_get_keysize()
63 (algo != TEE_ALG_ECDH_P192)) in ecc_get_keysize()
69 if ((algo != 0) && (algo != TEE_ALG_ECDSA_P224) && in ecc_get_keysize()
70 (algo != TEE_ALG_ECDH_P224)) in ecc_get_keysize()
76 if ((algo != 0) && (algo != TEE_ALG_ECDSA_P256) && in ecc_get_keysize()
77 (algo != TEE_ALG_ECDH_P256)) in ecc_get_keysize()
83 if ((algo != 0) && (algo != TEE_ALG_ECDSA_P384) && in ecc_get_keysize()
84 (algo != TEE_ALG_ECDH_P384)) in ecc_get_keysize()
90 if ((algo != 0) && (algo != TEE_ALG_ECDSA_P521) && in ecc_get_keysize()
191 if (algo == 0) in ecc_sign()
[all …]
A Drsa.c40 switch (algo) { in tee_algo_to_mbedtls_hash_algo()
374 if (algo == TEE_ALG_RSAES_PKCS1_V1_5) { in crypto_acipher_rsaes_decrypt()
400 if (algo != TEE_ALG_RSAES_PKCS1_V1_5) { in crypto_acipher_rsaes_decrypt()
401 md_algo = tee_algo_to_mbedtls_hash_algo(algo); in crypto_acipher_rsaes_decrypt()
468 if (algo == TEE_ALG_RSAES_PKCS1_V1_5) in crypto_acipher_rsaes_encrypt()
483 if (algo != TEE_ALG_RSAES_PKCS1_V1_5) { in crypto_acipher_rsaes_encrypt()
484 md_algo = tee_algo_to_mbedtls_hash_algo(algo); in crypto_acipher_rsaes_encrypt()
526 switch (algo) { in crypto_acipher_rsassa_sign()
565 md_algo = tee_algo_to_mbedtls_hash_algo(algo); in crypto_acipher_rsassa_sign()
636 switch (algo) { in crypto_acipher_rsassa_verify()
[all …]
/optee_os/core/drivers/crypto/crypto_api/acipher/
A Decc.c48 static bool algo_is_valid(uint32_t curve, uint32_t algo) in algo_is_valid() argument
50 unsigned int algo_op = TEE_ALG_GET_CLASS(algo); in algo_is_valid()
51 unsigned int algo_id = TEE_ALG_GET_MAIN_ALG(algo); in algo_is_valid()
52 unsigned int algo_curve = TEE_ALG_GET_DIGEST_HASH(algo); in algo_is_valid()
61 " is valid", algo, curve); in algo_is_valid()
67 algo, curve); in algo_is_valid()
131 static TEE_Result ecc_sign(uint32_t algo, struct ecc_keypair *key, in ecc_sign() argument
146 if (!algo_is_valid(key->curve, algo)) in ecc_sign()
171 sdata.algo = algo; in ecc_sign()
218 if (!algo_is_valid(key->curve, algo)) in ecc_verify()
[all …]
A Drsa.c221 if (algo == TEE_ALG_RSAES_PKCS1_V1_5) { in crypto_acipher_rsaes_decrypt()
258 TEE_Result crypto_acipher_rsaes_encrypt(uint32_t algo, in crypto_acipher_rsaes_encrypt() argument
298 if (algo == TEE_ALG_RSAES_PKCS1_V1_5) { in crypto_acipher_rsaes_encrypt()
357 if (algo != TEE_ALG_RSASSA_PKCS1_V1_5) { in crypto_acipher_rsassa_sign()
359 rsa_ssa.hash_algo = TEE_DIGEST_HASH_TO_ALGO(algo); in crypto_acipher_rsassa_sign()
397 rsa_ssa.algo = algo; in crypto_acipher_rsassa_sign()
420 algo, ret); in crypto_acipher_rsassa_sign()
439 if (algo != TEE_ALG_RSASSA_PKCS1_V1_5) { in crypto_acipher_rsassa_verify()
441 rsa_ssa.hash_algo = TEE_DIGEST_HASH_TO_ALGO(algo); in crypto_acipher_rsassa_verify()
473 rsa_ssa.algo = algo; in crypto_acipher_rsassa_verify()
[all …]
A Ddsa.c121 TEE_Result crypto_acipher_dsa_sign(uint32_t algo, struct dsa_keypair *key, in crypto_acipher_dsa_sign() argument
159 sdata.algo = algo; in crypto_acipher_dsa_sign()
175 CRYPTO_TRACE("Sign algo (0x%" PRIx32 ") returned 0x%" PRIx32, algo, in crypto_acipher_dsa_sign()
181 TEE_Result crypto_acipher_dsa_verify(uint32_t algo, struct dsa_public_key *key, in crypto_acipher_dsa_verify() argument
213 sdata.algo = algo; in crypto_acipher_dsa_verify()
226 CRYPTO_TRACE("Verify algo (0x%" PRIx32 ") returned 0x%" PRIx32, algo, in crypto_acipher_dsa_verify()
/optee_os/core/tee/
A Dtee_cryp_utl.c20 TEE_Result tee_alg_get_digest_size(uint32_t algo, size_t *size) in tee_alg_get_digest_size() argument
22 size_t digest_size = TEE_ALG_GET_DIGEST_SIZE(algo); in tee_alg_get_digest_size()
32 TEE_Result tee_hash_createdigest(uint32_t algo, const uint8_t *data, in tee_hash_createdigest() argument
39 res = crypto_hash_alloc_ctx(&ctx, algo); in tee_hash_createdigest()
60 TEE_Result tee_cipher_get_block_size(uint32_t algo, size_t *size) in tee_cipher_get_block_size() argument
62 switch (algo) { in tee_cipher_get_block_size()
98 TEE_Result tee_do_cipher_update(void *ctx, uint32_t algo, in tee_do_cipher_update() argument
112 res = tee_cipher_get_block_size(algo, &block_size); in tee_do_cipher_update()
116 if (!last_block && algo != TEE_ALG_AES_CTR) in tee_do_cipher_update()
119 switch (algo) { in tee_do_cipher_update()
/optee_os/core/drivers/crypto/caam/include/
A Dcaam_desc_helper.h287 (CMD_OP_TYPE | OP_TYPE(CLASS2) | (algo) | ALGO_AS(INIT) | ALGO_ENCRYPT)
293 (CMD_OP_TYPE | OP_TYPE(CLASS2) | (algo) | ALGO_AS(UPDATE) | \
300 (CMD_OP_TYPE | OP_TYPE(CLASS2) | (algo) | ALGO_AS(FINAL) | ALGO_ENCRYPT)
306 (CMD_OP_TYPE | OP_TYPE(CLASS2) | (algo) | ALGO_AS(INIT_FINAL) | \
313 (CMD_OP_TYPE | OP_TYPE(CLASS2) | (algo) | ALGO_AS(INIT) | \
320 (CMD_OP_TYPE | OP_TYPE(CLASS2) | (algo) | ALGO_AS(INIT_FINAL) | \
327 (CMD_OP_TYPE | OP_TYPE(CLASS2) | (algo) | ALGO_AS(INIT) | \
334 (CMD_OP_TYPE | OP_TYPE(CLASS2) | (algo) | ALGO_AS(FINAL) | \
341 (CMD_OP_TYPE | OP_TYPE(CLASS1) | (algo) | ALGO_AS(INIT_FINAL) | \
348 (CMD_OP_TYPE | OP_TYPE(CLASS1) | (algo) | ALGO_AS(INIT) | \
[all …]
/optee_os/core/drivers/crypto/stm32/
A Dcipher.c25 enum stm32_cryp_algo_mode algo; member
44 (c->algo == STM32_CRYP_MODE_TDES_ECB || in stm32_cipher_initialize()
45 c->algo == STM32_CRYP_MODE_TDES_CBC)) { in stm32_cipher_initialize()
57 return stm32_cryp_init(&c->cryp, !dinit->encrypt, c->algo, in stm32_cipher_initialize()
91 static TEE_Result alloc_ctx(void **ctx, enum stm32_cryp_algo_mode algo) in alloc_ctx() argument
98 c->algo = algo; in alloc_ctx()
110 static TEE_Result stm32_cipher_allocate(void **ctx, uint32_t algo) in stm32_cipher_allocate() argument
115 switch (algo) { in stm32_cipher_allocate()
A Dauthenc.c32 enum stm32_cryp_algo_mode algo; member
217 if (c->algo == STM32_CRYP_MODE_AES_GCM) { in stm32_ae_initialize()
221 } else if (c->algo == STM32_CRYP_MODE_AES_CCM) { in stm32_ae_initialize()
225 res = stm32_cryp_init(&c->cryp, !dinit->encrypt, c->algo, in stm32_ae_initialize()
231 if (c->algo == STM32_CRYP_MODE_AES_CCM) in stm32_ae_initialize()
326 static TEE_Result alloc_ctx(void **ctx, enum stm32_cryp_algo_mode algo) in alloc_ctx() argument
333 c->algo = algo; in alloc_ctx()
345 static TEE_Result stm32_ae_allocate(void **ctx, uint32_t algo) in stm32_ae_allocate() argument
348 switch (algo) { in stm32_ae_allocate()
/optee_os/core/crypto/
A Dcrypto.c17 TEE_Result crypto_hash_alloc_ctx(void **ctx, uint32_t algo) in crypto_hash_alloc_ctx() argument
26 res = drvcrypt_hash_alloc_ctx(&c, algo); in crypto_hash_alloc_ctx()
29 switch (algo) { in crypto_hash_alloc_ctx()
106 res = drvcrypt_cipher_alloc_ctx(&c, algo); in crypto_cipher_alloc_ctx()
109 switch (algo) { in crypto_cipher_alloc_ctx()
203 uint32_t class = TEE_ALG_GET_CLASS(algo); in crypto_cipher_get_block_size()
209 switch (TEE_ALG_GET_MAIN_ALG(algo)) { in crypto_cipher_get_block_size()
234 res = drvcrypt_mac_alloc_ctx(&c, algo); in crypto_mac_alloc_ctx()
237 switch (algo) { in crypto_mac_alloc_ctx()
341 res = drvcrypt_authenc_alloc_ctx(&c, algo); in crypto_authenc_alloc_ctx()
[all …]
/optee_os/core/drivers/crypto/crypto_api/mac/
A Dmac.c13 TEE_Result drvcrypt_mac_alloc_ctx(struct crypto_mac_ctx **ctx, uint32_t algo) in drvcrypt_mac_alloc_ctx() argument
17 unsigned int algo_id = TEE_ALG_GET_MAIN_ALG(algo); in drvcrypt_mac_alloc_ctx()
19 CRYPTO_TRACE("mac alloc_ctx algo 0x%" PRIX32, algo); in drvcrypt_mac_alloc_ctx()
29 ret = mac_alloc(ctx, algo); in drvcrypt_mac_alloc_ctx()
/optee_os/core/include/tee/
A Dtee_cryp_utl.h12 TEE_Result tee_alg_get_digest_size(uint32_t algo, size_t *size);
13 TEE_Result tee_hash_createdigest(uint32_t algo, const uint8_t *data,
16 TEE_Result tee_cipher_get_block_size(uint32_t algo, size_t *size);
17 TEE_Result tee_do_cipher_update(void *ctx, uint32_t algo,
/optee_os/core/include/crypto/
A Dcrypto.h30 TEE_Result crypto_hash_alloc_ctx(void **ctx, uint32_t algo);
38 TEE_Result crypto_cipher_alloc_ctx(void **ctx, uint32_t algo);
47 TEE_Result crypto_cipher_get_block_size(uint32_t algo, size_t *size);
52 TEE_Result crypto_mac_alloc_ctx(void **ctx, uint32_t algo);
60 TEE_Result crypto_authenc_alloc_ctx(void **ctx, uint32_t algo);
214 TEE_Result crypto_acipher_rsaes_decrypt(uint32_t algo, struct rsa_keypair *key,
218 TEE_Result crypto_acipher_rsaes_encrypt(uint32_t algo,
224 TEE_Result crypto_acipher_rsassa_sign(uint32_t algo, struct rsa_keypair *key,
228 TEE_Result crypto_acipher_rsassa_verify(uint32_t algo,
233 TEE_Result crypto_acipher_dsa_sign(uint32_t algo, struct dsa_keypair *key,
[all …]
/optee_os/core/drivers/crypto/crypto_api/hash/
A Dhash.c13 TEE_Result drvcrypt_hash_alloc_ctx(struct crypto_hash_ctx **ctx, uint32_t algo) in drvcrypt_hash_alloc_ctx() argument
18 CRYPTO_TRACE("hash alloc_ctx algo 0x%" PRIX32, algo); in drvcrypt_hash_alloc_ctx()
25 ret = hash_alloc(ctx, algo); in drvcrypt_hash_alloc_ctx()

Completed in 58 milliseconds

1234