Lines Matching refs:grp
29 static TEE_Result sm2_kep_compute_Z(const mbedtls_ecp_group *grp, uint8_t *Z, in sm2_kep_compute_Z() argument
65 mres = mbedtls_mpi_write_binary(&grp->A, buf, SM2_INT_SIZE_BYTES); in sm2_kep_compute_Z()
74 mres = mbedtls_mpi_write_binary(&grp->B, buf, SM2_INT_SIZE_BYTES); in sm2_kep_compute_Z()
83 mres = mbedtls_mpi_write_binary(&grp->G.X, buf, SM2_INT_SIZE_BYTES); in sm2_kep_compute_Z()
92 mres = mbedtls_mpi_write_binary(&grp->G.Y, buf, SM2_INT_SIZE_BYTES); in sm2_kep_compute_Z()
292 mbedtls_ecp_group grp = { }; in crypto_acipher_sm2_kep_derive() local
327 mbedtls_ecp_group_init(&grp); in crypto_acipher_sm2_kep_derive()
328 mres = mbedtls_ecp_group_load(&grp, MBEDTLS_ECP_DP_SM2); in crypto_acipher_sm2_kep_derive()
353 mres = mbedtls_mpi_mod_mpi(&tA, &tA, &grp.N); in crypto_acipher_sm2_kep_derive()
359 mres = mbedtls_mpi_mod_mpi(&tA, &tA, &grp.N); in crypto_acipher_sm2_kep_derive()
368 mres = mbedtls_ecp_check_pubkey(&grp, &RB); in crypto_acipher_sm2_kep_derive()
399 mres = mbedtls_ecp_muladd(&grp, &U, &one, &PB, &x2bar, &RB); in crypto_acipher_sm2_kep_derive()
404 mres = mbedtls_ecp_mul(&grp, &U, &tA, &U, mbd_rand, NULL); in crypto_acipher_sm2_kep_derive()
430 res = sm2_kep_compute_Z(&grp, xUyUZAZB + 2 * SM2_INT_SIZE_BYTES, in crypto_acipher_sm2_kep_derive()
437 res = sm2_kep_compute_Z(&grp, xUyUZAZB + 2 * SM2_INT_SIZE_BYTES + in crypto_acipher_sm2_kep_derive()
497 mbedtls_ecp_group_free(&grp); in crypto_acipher_sm2_kep_derive()