Lines Matching refs:dest

129 TEE_Result TEE_BigIntConvertFromOctetString(TEE_BigInt *dest,  in TEE_BigIntConvertFromOctetString()  argument
147 res = copy_mpi_to_bigint(&mpi_dest, dest); in TEE_BigIntConvertFromOctetString()
176 void TEE_BigIntConvertFromS32(TEE_BigInt *dest, int32_t shortVal) in TEE_BigIntConvertFromS32() argument
180 get_mpi(&mpi, dest); in TEE_BigIntConvertFromS32()
184 MPI_CHECK(copy_mpi_to_bigint(&mpi, dest)); in TEE_BigIntConvertFromS32()
188 TEE_Result TEE_BigIntConvertToS32(int32_t *dest, const TEE_BigInt *src) in TEE_BigIntConvertToS32() argument
202 if (ADD_OVERFLOW(0, TEE_U32_FROM_BIG_ENDIAN(v), dest)) in TEE_BigIntConvertToS32()
205 if (SUB_OVERFLOW(0, TEE_U32_FROM_BIG_ENDIAN(v), dest)) in TEE_BigIntConvertToS32()
246 void TEE_BigIntShiftRight(TEE_BigInt *dest, const TEE_BigInt *op, size_t bits) in TEE_BigIntShiftRight() argument
251 get_mpi(&mpi_dest, dest); in TEE_BigIntShiftRight()
253 if (dest == op) { in TEE_BigIntShiftRight()
283 MPI_CHECK(copy_mpi_to_bigint(&mpi_dest, dest)); in TEE_BigIntShiftRight()
315 static void bigint_binary(TEE_BigInt *dest, const TEE_BigInt *op1, in bigint_binary() argument
326 get_mpi(&mpi_dest, dest); in bigint_binary()
328 if (op1 == dest) in bigint_binary()
333 if (op2 == dest) in bigint_binary()
342 MPI_CHECK(copy_mpi_to_bigint(&mpi_dest, dest)); in bigint_binary()
350 static void bigint_binary_mod(TEE_BigInt *dest, const TEE_BigInt *op1, in bigint_binary_mod() argument
366 get_mpi(&mpi_dest, dest); in bigint_binary_mod()
369 if (op1 == dest) in bigint_binary_mod()
374 if (op2 == dest) in bigint_binary_mod()
386 MPI_CHECK(copy_mpi_to_bigint(&mpi_dest, dest)); in bigint_binary_mod()
396 void TEE_BigIntAdd(TEE_BigInt *dest, const TEE_BigInt *op1, in TEE_BigIntAdd() argument
399 bigint_binary(dest, op1, op2, mbedtls_mpi_add_mpi); in TEE_BigIntAdd()
402 void TEE_BigIntSub(TEE_BigInt *dest, const TEE_BigInt *op1, in TEE_BigIntSub() argument
405 bigint_binary(dest, op1, op2, mbedtls_mpi_sub_mpi); in TEE_BigIntSub()
408 void TEE_BigIntNeg(TEE_BigInt *dest, const TEE_BigInt *src) in TEE_BigIntNeg() argument
412 get_mpi(&mpi_dest, dest); in TEE_BigIntNeg()
414 if (dest != src) { in TEE_BigIntNeg()
426 MPI_CHECK(copy_mpi_to_bigint(&mpi_dest, dest)); in TEE_BigIntNeg()
430 void TEE_BigIntMul(TEE_BigInt *dest, const TEE_BigInt *op1, in TEE_BigIntMul() argument
448 TEE_BigIntAdd(dest, tmp, zero); in TEE_BigIntMul()
453 void TEE_BigIntSquare(TEE_BigInt *dest, const TEE_BigInt *op) in TEE_BigIntSquare() argument
455 TEE_BigIntMul(dest, op, op); in TEE_BigIntSquare()
501 void TEE_BigIntMod(TEE_BigInt *dest, const TEE_BigInt *op, const TEE_BigInt *n) in TEE_BigIntMod() argument
506 bigint_binary(dest, op, n, mbedtls_mpi_mod_mpi); in TEE_BigIntMod()
509 void TEE_BigIntAddMod(TEE_BigInt *dest, const TEE_BigInt *op1, in TEE_BigIntAddMod() argument
512 bigint_binary_mod(dest, op1, op2, n, mbedtls_mpi_add_mpi); in TEE_BigIntAddMod()
515 void TEE_BigIntSubMod(TEE_BigInt *dest, const TEE_BigInt *op1, in TEE_BigIntSubMod() argument
518 bigint_binary_mod(dest, op1, op2, n, mbedtls_mpi_sub_mpi); in TEE_BigIntSubMod()
521 void TEE_BigIntMulMod(TEE_BigInt *dest, const TEE_BigInt *op1, in TEE_BigIntMulMod() argument
524 bigint_binary_mod(dest, op1, op2, n, mbedtls_mpi_mul_mpi); in TEE_BigIntMulMod()
527 void TEE_BigIntSquareMod(TEE_BigInt *dest, const TEE_BigInt *op, in TEE_BigIntSquareMod() argument
530 TEE_BigIntMulMod(dest, op, op, n); in TEE_BigIntSquareMod()
533 void TEE_BigIntInvMod(TEE_BigInt *dest, const TEE_BigInt *op, in TEE_BigIntInvMod() argument
544 get_mpi(&mpi_dest, dest); in TEE_BigIntInvMod()
547 if (op == dest) in TEE_BigIntInvMod()
554 MPI_CHECK(copy_mpi_to_bigint(&mpi_dest, dest)); in TEE_BigIntInvMod()
810 void TEE_BigIntConvertToFMM(TEE_BigIntFMM *dest, const TEE_BigInt *src, in TEE_BigIntConvertToFMM() argument
814 TEE_BigIntMod(dest, src, n); in TEE_BigIntConvertToFMM()
817 void TEE_BigIntConvertFromFMM(TEE_BigInt *dest, const TEE_BigIntFMM *src, in TEE_BigIntConvertFromFMM() argument
824 get_mpi(&mpi_dst, dest); in TEE_BigIntConvertFromFMM()
829 MPI_CHECK(copy_mpi_to_bigint(&mpi_dst, dest)); in TEE_BigIntConvertFromFMM()
834 void TEE_BigIntComputeFMM(TEE_BigIntFMM *dest, const TEE_BigIntFMM *op1, in TEE_BigIntComputeFMM() argument
844 get_mpi(&mpi_dst, dest); in TEE_BigIntComputeFMM()
857 MPI_CHECK(copy_mpi_to_bigint(&mpi_dst, dest)); in TEE_BigIntComputeFMM()