Lines Matching refs:X

549 int mbedtls_mpi_safe_cond_assign( mbedtls_mpi *X,  in mbedtls_mpi_safe_cond_assign()  argument
556 MPI_VALIDATE_RET( X != NULL ); in mbedtls_mpi_safe_cond_assign()
562 MBEDTLS_MPI_CHK( mbedtls_mpi_grow( X, Y->n ) ); in mbedtls_mpi_safe_cond_assign()
564 X->s = mbedtls_ct_cond_select_sign( assign, Y->s, X->s ); in mbedtls_mpi_safe_cond_assign()
566 mbedtls_ct_mpi_uint_cond_assign( Y->n, X->p, Y->p, assign ); in mbedtls_mpi_safe_cond_assign()
568 for( i = Y->n; i < X->n; i++ ) in mbedtls_mpi_safe_cond_assign()
569 X->p[i] &= ~limb_mask; in mbedtls_mpi_safe_cond_assign()
581 int mbedtls_mpi_safe_cond_swap( mbedtls_mpi *X, in mbedtls_mpi_safe_cond_swap() argument
589 MPI_VALIDATE_RET( X != NULL ); in mbedtls_mpi_safe_cond_swap()
592 if( X == Y ) in mbedtls_mpi_safe_cond_swap()
598 MBEDTLS_MPI_CHK( mbedtls_mpi_grow( X, Y->n ) ); in mbedtls_mpi_safe_cond_swap()
599 MBEDTLS_MPI_CHK( mbedtls_mpi_grow( Y, X->n ) ); in mbedtls_mpi_safe_cond_swap()
601 s = X->s; in mbedtls_mpi_safe_cond_swap()
602 X->s = mbedtls_ct_cond_select_sign( swap, Y->s, X->s ); in mbedtls_mpi_safe_cond_swap()
606 for( i = 0; i < X->n; i++ ) in mbedtls_mpi_safe_cond_swap()
608 tmp = X->p[i]; in mbedtls_mpi_safe_cond_swap()
609 X->p[i] = ( X->p[i] & ~limb_mask ) | ( Y->p[i] & limb_mask ); in mbedtls_mpi_safe_cond_swap()
620 int mbedtls_mpi_lt_mpi_ct( const mbedtls_mpi *X, in mbedtls_mpi_lt_mpi_ct() argument
628 MPI_VALIDATE_RET( X != NULL ); in mbedtls_mpi_lt_mpi_ct()
632 if( X->n != Y->n ) in mbedtls_mpi_lt_mpi_ct()
639 X_is_negative = ( X->s & 2 ) >> 1; in mbedtls_mpi_lt_mpi_ct()
656 for( i = X->n; i > 0; i-- ) in mbedtls_mpi_lt_mpi_ct()
665 cond = mbedtls_ct_mpi_uint_lt( Y->p[i - 1], X->p[i - 1] ); in mbedtls_mpi_lt_mpi_ct()
676 cond = mbedtls_ct_mpi_uint_lt( X->p[i - 1], Y->p[i - 1] ); in mbedtls_mpi_lt_mpi_ct()