Lines Matching refs:W
2081 mbedtls_mpi *W = NULL; in mbedtls_mpi_exp_mod() local
2154 W = mempool_alloc( mbedtls_mpi_mempool, in mbedtls_mpi_exp_mod()
2156 if( W == NULL ) { in mbedtls_mpi_exp_mod()
2161 mbedtls_mpi_init_mempool( W + i ); in mbedtls_mpi_exp_mod()
2162 MBEDTLS_MPI_CHK( mbedtls_mpi_grow( &W[1], j ) ); in mbedtls_mpi_exp_mod()
2169 MBEDTLS_MPI_CHK( mbedtls_mpi_mod_mpi( &W[1], A, N ) ); in mbedtls_mpi_exp_mod()
2173 MBEDTLS_MPI_CHK( mbedtls_mpi_grow( &W[1], N->n + 1 ) ); in mbedtls_mpi_exp_mod()
2176 MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &W[1], A ) ); in mbedtls_mpi_exp_mod()
2180 mpi_montmul( &W[1], &RR, N, mm, &T ); in mbedtls_mpi_exp_mod()
2195 MBEDTLS_MPI_CHK( mbedtls_mpi_grow( &W[j], N->n + 1 ) ); in mbedtls_mpi_exp_mod()
2196 MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &W[j], &W[1] ) ); in mbedtls_mpi_exp_mod()
2199 mpi_montmul( &W[j], &W[j], N, mm, &T ); in mbedtls_mpi_exp_mod()
2206 MBEDTLS_MPI_CHK( mbedtls_mpi_grow( &W[i], N->n + 1 ) ); in mbedtls_mpi_exp_mod()
2207 MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &W[i], &W[i - 1] ) ); in mbedtls_mpi_exp_mod()
2209 mpi_montmul( &W[i], &W[1], N, mm, &T ); in mbedtls_mpi_exp_mod()
2269 MBEDTLS_MPI_CHK( mpi_select( &WW, W, (size_t) 1 << wsize, wbits ) ); in mbedtls_mpi_exp_mod()
2288 mpi_montmul( X, &W[1], N, mm, &T ); in mbedtls_mpi_exp_mod()
2304 if( W ) in mbedtls_mpi_exp_mod()
2306 mbedtls_mpi_free( W + i ); in mbedtls_mpi_exp_mod()
2307 mempool_free( mbedtls_mpi_mempool , W ); in mbedtls_mpi_exp_mod()
2731 mbedtls_mpi W, R, T, A, RR; in mpi_miller_rabin() local
2736 mbedtls_mpi_init_mempool( &W ); mbedtls_mpi_init_mempool( &R ); in mpi_miller_rabin()
2744 MBEDTLS_MPI_CHK( mbedtls_mpi_sub_int( &W, X, 1 ) ); in mpi_miller_rabin()
2745 s = mbedtls_mpi_lsb( &W ); in mpi_miller_rabin()
2746 MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &R, &W ) ); in mpi_miller_rabin()
2759 k = mbedtls_mpi_bitlen( &W ); in mpi_miller_rabin()
2769 } while ( mbedtls_mpi_cmp_mpi( &A, &W ) >= 0 || in mpi_miller_rabin()
2777 if( mbedtls_mpi_cmp_mpi( &A, &W ) == 0 || in mpi_miller_rabin()
2782 while( j < s && mbedtls_mpi_cmp_mpi( &A, &W ) != 0 ) in mpi_miller_rabin()
2799 if( mbedtls_mpi_cmp_mpi( &A, &W ) != 0 || in mpi_miller_rabin()
2808 mbedtls_mpi_free( &W ); mbedtls_mpi_free( &R ); in mpi_miller_rabin()