Lines Matching refs:ltc_key

113 	ecc_key ltc_key = { };  in sm2_ltc_pke_decrypt()  local
136 res = ecc_populate_ltc_private_key(&ltc_key, key, TEE_ALG_SM2_PKE, in sm2_ltc_pke_decrypt()
149 res = sm2_bytes_to_point(C1, &ltc_key.dp, src, src_len, &C1_len); in sm2_ltc_pke_decrypt()
155 if (ltc_key.dp.cofactor != 1) { in sm2_ltc_pke_decrypt()
168 ltc_res = mp_set_int(h, ltc_key.dp.cofactor); in sm2_ltc_pke_decrypt()
174 ltc_res = ltc_ecc_mulmod(h, C1, S, ltc_key.dp.A, in sm2_ltc_pke_decrypt()
175 ltc_key.dp.prime, 1); in sm2_ltc_pke_decrypt()
181 ltc_res = ltc_ecc_is_point_at_infinity(S, ltc_key.dp.prime, in sm2_ltc_pke_decrypt()
184 ltc_res = ltc_ecc_is_point_at_infinity(C1, ltc_key.dp.prime, in sm2_ltc_pke_decrypt()
200 ltc_res = ltc_ecc_mulmod(ltc_key.k, C1, x2y2p, ltc_key.dp.A, in sm2_ltc_pke_decrypt()
201 ltc_key.dp.prime, 1); in sm2_ltc_pke_decrypt()
297 ecc_free(&ltc_key); in sm2_ltc_pke_decrypt()
335 ecc_key ltc_key = { }; in sm2_ltc_pke_encrypt() local
353 res = ecc_populate_ltc_public_key(&ltc_key, key, TEE_ALG_SM2_PKE, NULL); in sm2_ltc_pke_encrypt()
359 ltc_res = rand_bn_upto(k, ltc_key.dp.order, NULL, in sm2_ltc_pke_encrypt()
374 ltc_res = ltc_ecc_mulmod(k, &ltc_key.dp.base, C1, ltc_key.dp.A, in sm2_ltc_pke_encrypt()
375 ltc_key.dp.prime, 1); in sm2_ltc_pke_encrypt()
383 if (ltc_key.dp.cofactor != 1) { in sm2_ltc_pke_encrypt()
390 ltc_res = mp_set_int(h, ltc_key.dp.cofactor); in sm2_ltc_pke_encrypt()
396 ltc_res = ltc_ecc_mulmod(h, &ltc_key.pubkey, S, ltc_key.dp.A, in sm2_ltc_pke_encrypt()
397 ltc_key.dp.prime, 1); in sm2_ltc_pke_encrypt()
403 ltc_res = ltc_ecc_is_point_at_infinity(S, ltc_key.dp.prime, in sm2_ltc_pke_encrypt()
406 ltc_res = ltc_ecc_is_point_at_infinity(&ltc_key.pubkey, in sm2_ltc_pke_encrypt()
407 ltc_key.dp.prime, &inf); in sm2_ltc_pke_encrypt()
426 ltc_res = ltc_ecc_mulmod(k, &ltc_key.pubkey, x2y2p, ltc_key.dp.A, in sm2_ltc_pke_encrypt()
427 ltc_key.dp.prime, 1); in sm2_ltc_pke_encrypt()
511 ecc_free(&ltc_key); in sm2_ltc_pke_encrypt()