Lines Matching refs:ltc_key

114 	ecc_key ltc_key = { };  in sm2_ltc_pke_decrypt()  local
137 res = ecc_populate_ltc_private_key(&ltc_key, key, TEE_ALG_SM2_PKE, in sm2_ltc_pke_decrypt()
150 res = sm2_bytes_to_point(C1, &ltc_key.dp, src, src_len, &C1_len); in sm2_ltc_pke_decrypt()
156 if (ltc_key.dp.cofactor != 1) { in sm2_ltc_pke_decrypt()
169 ltc_res = mp_set_int(h, ltc_key.dp.cofactor); in sm2_ltc_pke_decrypt()
175 ltc_res = ltc_ecc_mulmod(h, C1, S, ltc_key.dp.A, in sm2_ltc_pke_decrypt()
176 ltc_key.dp.prime, 1); in sm2_ltc_pke_decrypt()
182 ltc_res = ltc_ecc_is_point_at_infinity(S, ltc_key.dp.prime, in sm2_ltc_pke_decrypt()
185 ltc_res = ltc_ecc_is_point_at_infinity(C1, ltc_key.dp.prime, in sm2_ltc_pke_decrypt()
201 ltc_res = ltc_ecc_mulmod(ltc_key.k, C1, x2y2p, ltc_key.dp.A, in sm2_ltc_pke_decrypt()
202 ltc_key.dp.prime, 1); in sm2_ltc_pke_decrypt()
298 ecc_free(&ltc_key); in sm2_ltc_pke_decrypt()
336 ecc_key ltc_key = { }; in sm2_ltc_pke_encrypt() local
354 res = ecc_populate_ltc_public_key(&ltc_key, key, TEE_ALG_SM2_PKE, NULL); in sm2_ltc_pke_encrypt()
360 ltc_res = rand_bn_upto(k, ltc_key.dp.order, NULL, in sm2_ltc_pke_encrypt()
375 ltc_res = ltc_ecc_mulmod(k, &ltc_key.dp.base, C1, ltc_key.dp.A, in sm2_ltc_pke_encrypt()
376 ltc_key.dp.prime, 1); in sm2_ltc_pke_encrypt()
384 if (ltc_key.dp.cofactor != 1) { in sm2_ltc_pke_encrypt()
391 ltc_res = mp_set_int(h, ltc_key.dp.cofactor); in sm2_ltc_pke_encrypt()
397 ltc_res = ltc_ecc_mulmod(h, &ltc_key.pubkey, S, ltc_key.dp.A, in sm2_ltc_pke_encrypt()
398 ltc_key.dp.prime, 1); in sm2_ltc_pke_encrypt()
404 ltc_res = ltc_ecc_is_point_at_infinity(S, ltc_key.dp.prime, in sm2_ltc_pke_encrypt()
407 ltc_res = ltc_ecc_is_point_at_infinity(&ltc_key.pubkey, in sm2_ltc_pke_encrypt()
408 ltc_key.dp.prime, &inf); in sm2_ltc_pke_encrypt()
427 ltc_res = ltc_ecc_mulmod(k, &ltc_key.pubkey, x2y2p, ltc_key.dp.A, in sm2_ltc_pke_encrypt()
428 ltc_key.dp.prime, 1); in sm2_ltc_pke_encrypt()
512 ecc_free(&ltc_key); in sm2_ltc_pke_encrypt()