Lines Matching refs:W

1597     mbedtls_mpi RR, T, W[ (size_t) 1 << MBEDTLS_MPI_WINDOW_SIZE ], WW, Apos;  in mbedtls_mpi_exp_mod()  local
1622 memset( W, 0, sizeof( W ) ); in mbedtls_mpi_exp_mod()
1669 mbedtls_mpi_init( &W[x_index] ); in mbedtls_mpi_exp_mod()
1670 mbedtls_mpi_copy( &W[x_index], X ); in mbedtls_mpi_exp_mod()
1678 MBEDTLS_MPI_CHK( mbedtls_mpi_grow( &W[x_index], j ) ); in mbedtls_mpi_exp_mod()
1679 MBEDTLS_MPI_CHK( mbedtls_mpi_grow( &W[1], j ) ); in mbedtls_mpi_exp_mod()
1713 MBEDTLS_MPI_CHK( mbedtls_mpi_mod_mpi( &W[1], A, N ) ); in mbedtls_mpi_exp_mod()
1717 MBEDTLS_MPI_CHK( mbedtls_mpi_grow( &W[1], N->n + 1 ) ); in mbedtls_mpi_exp_mod()
1720 MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &W[1], A ) ); in mbedtls_mpi_exp_mod()
1724 mpi_montmul( &W[1], &RR, N, mm, &T ); in mbedtls_mpi_exp_mod()
1729 MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &W[x_index], &RR ) ); in mbedtls_mpi_exp_mod()
1730 mpi_montred( &W[x_index], N, mm, &T ); in mbedtls_mpi_exp_mod()
1747 MBEDTLS_MPI_CHK( mbedtls_mpi_grow( &W[j], N->n + 1 ) ); in mbedtls_mpi_exp_mod()
1748 MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &W[j], &W[1] ) ); in mbedtls_mpi_exp_mod()
1751 mpi_montmul( &W[j], &W[j], N, mm, &T ); in mbedtls_mpi_exp_mod()
1758 MBEDTLS_MPI_CHK( mbedtls_mpi_grow( &W[i], N->n + 1 ) ); in mbedtls_mpi_exp_mod()
1759 MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &W[i], &W[i - 1] ) ); in mbedtls_mpi_exp_mod()
1761 mpi_montmul( &W[i], &W[1], N, mm, &T ); in mbedtls_mpi_exp_mod()
1798 MBEDTLS_MPI_CHK( mpi_select( &WW, W, w_table_used_size, x_index ) ); in mbedtls_mpi_exp_mod()
1799 mpi_montmul( &W[x_index], &WW, N, mm, &T ); in mbedtls_mpi_exp_mod()
1818 MBEDTLS_MPI_CHK( mpi_select( &WW, W, w_table_used_size, in mbedtls_mpi_exp_mod()
1820 mpi_montmul( &W[x_index], &WW, N, mm, &T ); in mbedtls_mpi_exp_mod()
1826 MBEDTLS_MPI_CHK( mpi_select( &WW, W, w_table_used_size, in mbedtls_mpi_exp_mod()
1828 mpi_montmul( &W[x_index], &WW, N, mm, &T ); in mbedtls_mpi_exp_mod()
1841 MBEDTLS_MPI_CHK( mpi_select( &WW, W, w_table_used_size, x_index ) ); in mbedtls_mpi_exp_mod()
1842 mpi_montmul( &W[x_index], &WW, N, mm, &T ); in mbedtls_mpi_exp_mod()
1848 MBEDTLS_MPI_CHK( mpi_select( &WW, W, w_table_used_size, 1 ) ); in mbedtls_mpi_exp_mod()
1849 mpi_montmul( &W[x_index], &WW, N, mm, &T ); in mbedtls_mpi_exp_mod()
1856 mpi_montred( &W[x_index], N, mm, &T ); in mbedtls_mpi_exp_mod()
1860 W[x_index].s = -1; in mbedtls_mpi_exp_mod()
1861 MBEDTLS_MPI_CHK( mbedtls_mpi_add_mpi( &W[x_index], N, &W[x_index] ) ); in mbedtls_mpi_exp_mod()
1867 mbedtls_mpi_copy( X, &W[x_index] ); in mbedtls_mpi_exp_mod()
1874 mbedtls_mpi_free( &W[i] ); in mbedtls_mpi_exp_mod()
1876 mbedtls_mpi_free( &W[x_index] ); in mbedtls_mpi_exp_mod()
1877 mbedtls_mpi_free( &W[1] ); in mbedtls_mpi_exp_mod()
2273 mbedtls_mpi W, R, T, A, RR; in mpi_miller_rabin() local
2278 mbedtls_mpi_init( &W ); mbedtls_mpi_init( &R ); in mpi_miller_rabin()
2286 MBEDTLS_MPI_CHK( mbedtls_mpi_sub_int( &W, X, 1 ) ); in mpi_miller_rabin()
2287 s = mbedtls_mpi_lsb( &W ); in mpi_miller_rabin()
2288 MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &R, &W ) ); in mpi_miller_rabin()
2301 k = mbedtls_mpi_bitlen( &W ); in mpi_miller_rabin()
2311 } while ( mbedtls_mpi_cmp_mpi( &A, &W ) >= 0 || in mpi_miller_rabin()
2319 if( mbedtls_mpi_cmp_mpi( &A, &W ) == 0 || in mpi_miller_rabin()
2324 while( j < s && mbedtls_mpi_cmp_mpi( &A, &W ) != 0 ) in mpi_miller_rabin()
2341 if( mbedtls_mpi_cmp_mpi( &A, &W ) != 0 || in mpi_miller_rabin()
2350 mbedtls_mpi_free( &W ); mbedtls_mpi_free( &R ); in mpi_miller_rabin()