Home
last modified time | relevance | path

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

1234

/optee_os-3.20.0/lib/libutee/include/
A Dutee_defines.h59 if (algo == TEE_ALG_SM2_PKE) in __tee_alg_get_class()
73 #define TEE_ALG_GET_CLASS(algo) __tee_alg_get_class(algo) argument
77 switch (algo) { in __tee_alg_get_main_alg()
90 return algo & 0xff; in __tee_alg_get_main_alg()
93 #define TEE_ALG_GET_MAIN_ALG(algo) __tee_alg_get_main_alg(algo) argument
96 #define TEE_ALG_GET_CHAIN_MODE(algo) (((algo) >> 8) & 0xF) argument
112 return (algo >> 12) & 0xF; in __tee_alg_get_digest_hash()
115 #define TEE_ALG_GET_DIGEST_HASH(algo) __tee_alg_get_digest_hash(algo) argument
118 #define TEE_ALG_GET_INTERNAL_HASH(algo) (((algo) >> 20) & 0x7) argument
184 switch (algo) { in __tee_alg_get_digest_size()
[all …]
/optee_os-3.20.0/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-3.20.0/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()
260 if (algo == 0) in _ltc_ecc_sign()
[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()
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.c31 switch (algo) { in tee_algo_to_ltc_hashindex()
317 TEE_Result crypto_acipher_rsaes_decrypt(uint32_t algo,
352 res = tee_algo_to_ltc_hashindex(algo, &ltc_hashindex); in sw_crypto_acipher_rsaes_decrypt()
363 if (algo == TEE_ALG_RSAES_PKCS1_V1_5) { in sw_crypto_acipher_rsaes_decrypt()
422 TEE_Result crypto_acipher_rsaes_encrypt(uint32_t algo,
459 if (algo == TEE_ALG_RSAES_PKCS1_V1_5) in sw_crypto_acipher_rsaes_encrypt()
517 switch (algo) { in sw_crypto_acipher_rsassa_sign()
585 TEE_Result crypto_acipher_rsassa_verify(uint32_t algo,
615 if (algo != TEE_ALG_RSASSA_PKCS1_V1_5) { in sw_crypto_acipher_rsassa_verify()
634 if (algo != TEE_ALG_RSASSA_PKCS1_V1_5) { in sw_crypto_acipher_rsassa_verify()
[all …]
/optee_os-3.20.0/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()
99 TEE_Result tee_do_cipher_update(void *ctx, uint32_t algo, in tee_do_cipher_update() argument
113 res = tee_cipher_get_block_size(algo, &block_size); in tee_do_cipher_update()
117 if (!last_block && algo != TEE_ALG_AES_CTR) in tee_do_cipher_update()
120 switch (algo) { in tee_do_cipher_update()
/optee_os-3.20.0/core/drivers/crypto/se050/core/
A Decc.c38 if (!algo) in oefid_algo_supported()
43 switch (algo) { in oefid_algo_supported()
59 switch (algo) { in algo_tee2se050()
147 if (algo && algo != TEE_ALG_ECDSA_P192 && in ecc_get_key_size()
154 if (algo && algo != TEE_ALG_ECDSA_P224 && in ecc_get_key_size()
161 if (algo && algo != TEE_ALG_ECDSA_P256 && in ecc_get_key_size()
168 if (algo && algo != TEE_ALG_ECDSA_P384 && in ecc_get_key_size()
175 if (algo && algo != TEE_ALG_ECDSA_P521 && in ecc_get_key_size()
196 uint32_t algo; in ecc_prepare_msg() member
208 if (algo == map[i].algo) in ecc_prepare_msg()
[all …]
/optee_os-3.20.0/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-3.20.0/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-3.20.0/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()
/optee_os-3.20.0/core/drivers/crypto/crypto_api/acipher/
A Decc.c71 static bool algo_is_valid(uint32_t curve, uint32_t algo) in algo_is_valid() argument
73 unsigned int algo_op = TEE_ALG_GET_CLASS(algo); in algo_is_valid()
74 unsigned int algo_id = TEE_ALG_GET_MAIN_ALG(algo); in algo_is_valid()
75 unsigned int algo_curve = TEE_ALG_GET_DIGEST_HASH(algo); in algo_is_valid()
84 " is valid", algo, curve); in algo_is_valid()
90 algo, curve); in algo_is_valid()
154 static TEE_Result ecc_sign(uint32_t algo, struct ecc_keypair *key, in ecc_sign() argument
169 if (!algo_is_valid(key->curve, algo)) in ecc_sign()
194 sdata.algo = algo; in ecc_sign()
241 if (!algo_is_valid(key->curve, algo)) in ecc_verify()
[all …]
A Drsa.c223 if (algo == TEE_ALG_RSAES_PKCS1_V1_5) { in crypto_acipher_rsaes_decrypt()
248 rsa_data.algo = algo; in crypto_acipher_rsaes_decrypt()
301 if (algo == TEE_ALG_RSAES_PKCS1_V1_5) { in crypto_acipher_rsaes_encrypt()
334 rsa_data.algo = algo; in crypto_acipher_rsaes_encrypt()
361 if (algo != TEE_ALG_RSASSA_PKCS1_V1_5) { in crypto_acipher_rsassa_sign()
363 rsa_ssa.hash_algo = TEE_DIGEST_HASH_TO_ALGO(algo); in crypto_acipher_rsassa_sign()
401 rsa_ssa.algo = algo; in crypto_acipher_rsassa_sign()
424 algo, ret); in crypto_acipher_rsassa_sign()
443 if (algo != TEE_ALG_RSASSA_PKCS1_V1_5) { in crypto_acipher_rsassa_verify()
479 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-3.20.0/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()
83 if ((algo != 0) && (algo != TEE_ALG_ECDSA_P384) && in ecc_get_keysize()
90 if ((algo != 0) && (algo != TEE_ALG_ECDSA_P521) && in ecc_get_keysize()
97 if (algo != 0 && algo != TEE_ALG_SM2_DSA_SM3 && in ecc_get_keysize()
98 algo != TEE_ALG_SM2_KEP && algo != TEE_ALG_SM2_PKE) in ecc_get_keysize()
223 if (algo == 0) in ecc_sign()
[all …]
A Dsm2-dsa.h13 TEE_Result sm2_mbedtls_dsa_sign(uint32_t algo, struct ecc_keypair *key,
17 TEE_Result sm2_mbedtls_dsa_verify(uint32_t algo, struct ecc_public_key *key,
A Drsa.c42 switch (algo) { in tee_algo_to_mbedtls_hash_algo()
425 if (algo == TEE_ALG_RSAES_PKCS1_V1_5) { in sw_crypto_acipher_rsaes_decrypt()
451 if (algo != TEE_ALG_RSAES_PKCS1_V1_5) { in sw_crypto_acipher_rsaes_decrypt()
452 md_algo = tee_algo_to_mbedtls_hash_algo(algo); in sw_crypto_acipher_rsaes_decrypt()
527 if (algo == TEE_ALG_RSAES_PKCS1_V1_5) in sw_crypto_acipher_rsaes_encrypt()
542 if (algo != TEE_ALG_RSAES_PKCS1_V1_5) { in sw_crypto_acipher_rsaes_encrypt()
543 md_algo = tee_algo_to_mbedtls_hash_algo(algo); in sw_crypto_acipher_rsaes_encrypt()
591 switch (algo) { in sw_crypto_acipher_rsassa_sign()
630 md_algo = tee_algo_to_mbedtls_hash_algo(algo); in sw_crypto_acipher_rsassa_sign()
717 switch (algo) { in sw_crypto_acipher_rsassa_verify()
[all …]
/optee_os-3.20.0/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-3.20.0/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()
/optee_os-3.20.0/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()
206 uint32_t class = TEE_ALG_GET_CLASS(algo); in crypto_cipher_get_block_size()
212 switch (TEE_ALG_GET_MAIN_ALG(algo)) { in crypto_cipher_get_block_size()
237 res = drvcrypt_mac_alloc_ctx(&c, algo); in crypto_mac_alloc_ctx()
240 switch (algo) { in crypto_mac_alloc_ctx()
344 res = drvcrypt_authenc_alloc_ctx(&c, algo); in crypto_authenc_alloc_ctx()
[all …]
A Dsigned_hdr.c52 static bool is_weak_hash_algo(uint32_t algo) in is_weak_hash_algo() argument
54 return algo == TEE_ALG_MD5 || algo == TEE_ALG_SHA1 || in is_weak_hash_algo()
55 algo == TEE_ALG_MD5SHA1; in is_weak_hash_algo()
71 if (TEE_ALG_GET_MAIN_ALG(shdr->algo) != TEE_MAIN_ALGO_RSA) in shdr_verify_signature()
74 hash_algo = TEE_DIGEST_HASH_TO_ALGO(shdr->algo); in shdr_verify_signature()
98 crypto_acipher_rsassa_verify, shdr->algo, &key, in shdr_verify_signature()
274 if (crypto_hash_alloc_ctx(&ctx, TEE_DIGEST_HASH_TO_ALGO(shdr->algo))) { in shdr_load_pub_key()
314 key->main_algo = TEE_ALG_GET_MAIN_ALG(subkey->algo); in shdr_load_pub_key()
357 if (TEE_ALG_GET_MAIN_ALG(shdr->algo) != key->main_algo) in shdr_verify_signature2()
360 hash_algo = TEE_DIGEST_HASH_TO_ALGO(shdr->algo); in shdr_verify_signature2()
[all …]
/optee_os-3.20.0/core/drivers/crypto/versal/
A Drsa.c46 return sw_crypto_acipher_rsaes_encrypt(rsa_data->algo, in do_encrypt()
55 return sw_crypto_acipher_rsaes_encrypt(rsa_data->algo, in do_encrypt()
138 return sw_crypto_acipher_rsaes_decrypt(rsa_data->algo, in do_decrypt()
211 switch (p->algo) { in do_ssa_sign()
221 return sw_crypto_acipher_rsassa_sign(p->algo, in do_ssa_sign()
230 return sw_crypto_acipher_rsassa_sign(p->algo, in do_ssa_sign()
242 return sw_crypto_acipher_rsassa_sign(p->algo, in do_ssa_sign()
258 switch (p->algo) { in do_ssa_verify()
268 return sw_crypto_acipher_rsassa_verify(p->algo, in do_ssa_verify()
277 return sw_crypto_acipher_rsassa_verify(p->algo, in do_ssa_verify()
[all …]
/optee_os-3.20.0/core/include/crypto/
A Dcrypto.h31 TEE_Result crypto_hash_alloc_ctx(void **ctx, uint32_t algo);
39 TEE_Result crypto_cipher_alloc_ctx(void **ctx, uint32_t algo);
48 TEE_Result crypto_cipher_get_block_size(uint32_t algo, size_t *size);
53 TEE_Result crypto_mac_alloc_ctx(void **ctx, uint32_t algo);
61 TEE_Result crypto_authenc_alloc_ctx(void **ctx, uint32_t algo);
250 TEE_Result crypto_acipher_rsaes_decrypt(uint32_t algo, struct rsa_keypair *key,
254 TEE_Result crypto_acipher_rsaes_encrypt(uint32_t algo,
260 TEE_Result crypto_acipher_rsassa_sign(uint32_t algo, struct rsa_keypair *key,
264 TEE_Result crypto_acipher_rsassa_verify(uint32_t algo,
269 TEE_Result crypto_acipher_dsa_sign(uint32_t algo, struct dsa_keypair *key,
[all …]
A Dcrypto_impl.h281 uint32_t algo __unused) in drvcrypt_hash_alloc_ctx()
289 uint32_t algo);
293 uint32_t algo __unused) in drvcrypt_cipher_alloc_ctx()
305 uint32_t algo __unused) in drvcrypt_mac_alloc_ctx()
314 uint32_t algo);
318 uint32_t algo __unused) in drvcrypt_authenc_alloc_ctx()
334 TEE_Result (*verify)(uint32_t algo, struct ecc_public_key *key,
353 TEE_Result (*sign)(uint32_t algo, struct ecc_keypair *key,
452 TEE_Result sw_crypto_acipher_rsaes_decrypt(uint32_t algo,
459 TEE_Result sw_crypto_acipher_rsaes_encrypt(uint32_t algo,
[all …]
/optee_os-3.20.0/core/drivers/crypto/crypto_api/oid/
A Dhash_oid.c32 const struct drvcrypt_oid *drvcrypt_get_alg_hash_oid(uint32_t algo) in drvcrypt_get_alg_hash_oid() argument
34 uint32_t main_alg = TEE_ALG_GET_MAIN_ALG(algo); in drvcrypt_get_alg_hash_oid()

Completed in 37 milliseconds

1234