Home
last modified time | relevance | path

Searched refs:lmd_res (Results 1 – 3 of 3) sorted by relevance

/optee_os/lib/libmbedtls/core/
H A Drsa.c23 static TEE_Result get_tee_result(int lmd_res) in get_tee_result() argument
25 switch (lmd_res) { in get_tee_result()
103 int lmd_res = 0; in rsa_complete_from_key_pair() local
123 lmd_res = mbedtls_rsa_deduce_primes(&rsa->N, &rsa->E, &rsa->D, in rsa_complete_from_key_pair()
125 if (lmd_res) { in rsa_complete_from_key_pair()
127 -lmd_res); in rsa_complete_from_key_pair()
131 lmd_res = mbedtls_rsa_deduce_crt(&rsa->P, &rsa->Q, &rsa->D, in rsa_complete_from_key_pair()
133 if (lmd_res) { in rsa_complete_from_key_pair()
135 -lmd_res); in rsa_complete_from_key_pair()
148 return get_tee_result(lmd_res); in rsa_complete_from_key_pair()
[all …]
H A Decc.c24 static TEE_Result get_tee_result(int lmd_res) in get_tee_result() argument
26 switch (lmd_res) { in get_tee_result()
110 int lmd_res = 0; in ecc_generate_keypair() local
130 lmd_res = mbedtls_ecdsa_genkey(&ecdsa, gid, mbd_rand, NULL); in ecc_generate_keypair()
131 if (lmd_res != 0) { in ecc_generate_keypair()
169 int lmd_res = 0; in ecc_sign() local
192 lmd_res = mbedtls_ecp_group_load(&ecdsa.grp, gid); in ecc_sign()
193 if (lmd_res != 0) { in ecc_sign()
217 lmd_res = mbedtls_ecdsa_sign(&ecdsa.grp, &r, &s, &ecdsa.d, msg, in ecc_sign()
219 if (lmd_res == 0) { in ecc_sign()
[all …]
H A Ddh.c50 int lmd_res = 0; in crypto_acipher_gen_dh_key() local
78 lmd_res = mbedtls_dhm_make_public(&dhm, (int)xbytes, buf, in crypto_acipher_gen_dh_key()
80 if (lmd_res != 0) { in crypto_acipher_gen_dh_key()
81 FMSG("mbedtls_dhm_make_public err, return is 0x%x", -lmd_res); in crypto_acipher_gen_dh_key()
102 int lmd_res = 0; in crypto_acipher_dh_shared_secret() local
125 lmd_res = mbedtls_dhm_calc_secret(&dhm, buf, len, in crypto_acipher_dh_shared_secret()
127 if (lmd_res != 0) { in crypto_acipher_dh_shared_secret()
128 FMSG("mbedtls_dhm_calc_secret failed, ret is 0x%x", -lmd_res); in crypto_acipher_dh_shared_secret()