Lines Matching refs:mpi_dest

144 	mbedtls_mpi mpi_dest;  in TEE_BigIntConvertFromOctetString()  local
146 get_mpi(&mpi_dest, NULL); in TEE_BigIntConvertFromOctetString()
148 if (mbedtls_mpi_read_binary(&mpi_dest, buffer, bufferLen)) in TEE_BigIntConvertFromOctetString()
154 mpi_dest.s = -1; in TEE_BigIntConvertFromOctetString()
157 res = copy_mpi_to_bigint(&mpi_dest, dest); in TEE_BigIntConvertFromOctetString()
159 mbedtls_mpi_free(&mpi_dest); in TEE_BigIntConvertFromOctetString()
278 mbedtls_mpi mpi_dest; in TEE_BigIntShiftRight() local
281 get_mpi(&mpi_dest, dest); in TEE_BigIntShiftRight()
284 MPI_CHECK(mbedtls_mpi_shift_r(&mpi_dest, bits)); in TEE_BigIntShiftRight()
290 if (mbedtls_mpi_size(&mpi_dest) >= mbedtls_mpi_size(&mpi_op)) { in TEE_BigIntShiftRight()
291 MPI_CHECK(mbedtls_mpi_copy(&mpi_dest, &mpi_op)); in TEE_BigIntShiftRight()
292 MPI_CHECK(mbedtls_mpi_shift_r(&mpi_dest, bits)); in TEE_BigIntShiftRight()
305 MPI_CHECK(mbedtls_mpi_copy(&mpi_dest, &mpi_t)); in TEE_BigIntShiftRight()
313 MPI_CHECK(copy_mpi_to_bigint(&mpi_dest, dest)); in TEE_BigIntShiftRight()
314 mbedtls_mpi_free(&mpi_dest); in TEE_BigIntShiftRight()
403 mbedtls_mpi mpi_dest; in bigint_binary() local
409 get_mpi(&mpi_dest, dest); in bigint_binary()
412 pop1 = &mpi_dest; in bigint_binary()
417 pop2 = &mpi_dest; in bigint_binary()
423 MPI_CHECK(func(&mpi_dest, pop1, pop2)); in bigint_binary()
425 MPI_CHECK(copy_mpi_to_bigint(&mpi_dest, dest)); in bigint_binary()
426 mbedtls_mpi_free(&mpi_dest); in bigint_binary()
438 mbedtls_mpi mpi_dest; in bigint_binary_mod() local
449 get_mpi(&mpi_dest, dest); in bigint_binary_mod()
453 pop1 = &mpi_dest; in bigint_binary_mod()
458 pop2 = &mpi_dest; in bigint_binary_mod()
467 MPI_CHECK(mbedtls_mpi_mod_mpi(&mpi_dest, &mpi_t, &mpi_n)); in bigint_binary_mod()
469 MPI_CHECK(copy_mpi_to_bigint(&mpi_dest, dest)); in bigint_binary_mod()
470 mbedtls_mpi_free(&mpi_dest); in bigint_binary_mod()
493 mbedtls_mpi mpi_dest; in TEE_BigIntNeg() local
495 get_mpi(&mpi_dest, dest); in TEE_BigIntNeg()
502 MPI_CHECK(mbedtls_mpi_copy(&mpi_dest, &mpi_src)); in TEE_BigIntNeg()
507 mpi_dest.s *= -1; in TEE_BigIntNeg()
509 MPI_CHECK(copy_mpi_to_bigint(&mpi_dest, dest)); in TEE_BigIntNeg()
510 mbedtls_mpi_free(&mpi_dest); in TEE_BigIntNeg()
619 mbedtls_mpi mpi_dest; in TEE_BigIntInvMod() local
627 get_mpi(&mpi_dest, dest); in TEE_BigIntInvMod()
631 pop = &mpi_dest; in TEE_BigIntInvMod()
635 MPI_CHECK(mbedtls_mpi_inv_mod(&mpi_dest, pop, &mpi_n)); in TEE_BigIntInvMod()
637 MPI_CHECK(copy_mpi_to_bigint(&mpi_dest, dest)); in TEE_BigIntInvMod()
638 mbedtls_mpi_free(&mpi_dest); in TEE_BigIntInvMod()
688 mbedtls_mpi mpi_dest = { }; in TEE_BigIntExpMod() local
695 get_mpi(&mpi_dest, dest); in TEE_BigIntExpMod()
698 pop1 = &mpi_dest; in TEE_BigIntExpMod()
703 pop2 = &mpi_dest; in TEE_BigIntExpMod()
716 MPI_CHECK(mbedtls_mpi_exp_mod(&mpi_dest, pop1, pop2, &mpi_n, NULL)); in TEE_BigIntExpMod()
717 MPI_CHECK(copy_mpi_to_bigint(&mpi_dest, dest)); in TEE_BigIntExpMod()
719 mbedtls_mpi_free(&mpi_dest); in TEE_BigIntExpMod()