Lines Matching refs:W

2372     mbedtls_mpi *W = NULL;  in mbedtls_mpi_exp_mod()  local
2445 W = mempool_alloc( mbedtls_mpi_mempool, in mbedtls_mpi_exp_mod()
2447 if( W == NULL ) { in mbedtls_mpi_exp_mod()
2452 mbedtls_mpi_init_mempool( W + i ); in mbedtls_mpi_exp_mod()
2453 MBEDTLS_MPI_CHK( mbedtls_mpi_grow( &W[1], j ) ); in mbedtls_mpi_exp_mod()
2460 MBEDTLS_MPI_CHK( mbedtls_mpi_mod_mpi( &W[1], A, N ) ); in mbedtls_mpi_exp_mod()
2464 MBEDTLS_MPI_CHK( mbedtls_mpi_grow( &W[1], N->n + 1 ) ); in mbedtls_mpi_exp_mod()
2467 MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &W[1], A ) ); in mbedtls_mpi_exp_mod()
2471 mpi_montmul( &W[1], &RR, N, mm, &T ); in mbedtls_mpi_exp_mod()
2486 MBEDTLS_MPI_CHK( mbedtls_mpi_grow( &W[j], N->n + 1 ) ); in mbedtls_mpi_exp_mod()
2487 MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &W[j], &W[1] ) ); in mbedtls_mpi_exp_mod()
2490 mpi_montmul( &W[j], &W[j], N, mm, &T ); in mbedtls_mpi_exp_mod()
2497 MBEDTLS_MPI_CHK( mbedtls_mpi_grow( &W[i], N->n + 1 ) ); in mbedtls_mpi_exp_mod()
2498 MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &W[i], &W[i - 1] ) ); in mbedtls_mpi_exp_mod()
2500 mpi_montmul( &W[i], &W[1], N, mm, &T ); in mbedtls_mpi_exp_mod()
2560 MBEDTLS_MPI_CHK( mpi_select( &WW, W, (size_t) 1 << wsize, wbits ) ); in mbedtls_mpi_exp_mod()
2579 mpi_montmul( X, &W[1], N, mm, &T ); in mbedtls_mpi_exp_mod()
2595 if( W ) in mbedtls_mpi_exp_mod()
2597 mbedtls_mpi_free( W + i ); in mbedtls_mpi_exp_mod()
2598 mempool_free( mbedtls_mpi_mempool , W ); in mbedtls_mpi_exp_mod()
3022 mbedtls_mpi W, R, T, A, RR; in mpi_miller_rabin() local
3027 mbedtls_mpi_init_mempool( &W ); mbedtls_mpi_init_mempool( &R ); in mpi_miller_rabin()
3035 MBEDTLS_MPI_CHK( mbedtls_mpi_sub_int( &W, X, 1 ) ); in mpi_miller_rabin()
3036 s = mbedtls_mpi_lsb( &W ); in mpi_miller_rabin()
3037 MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &R, &W ) ); in mpi_miller_rabin()
3050 k = mbedtls_mpi_bitlen( &W ); in mpi_miller_rabin()
3060 } while ( mbedtls_mpi_cmp_mpi( &A, &W ) >= 0 || in mpi_miller_rabin()
3068 if( mbedtls_mpi_cmp_mpi( &A, &W ) == 0 || in mpi_miller_rabin()
3073 while( j < s && mbedtls_mpi_cmp_mpi( &A, &W ) != 0 ) in mpi_miller_rabin()
3090 if( mbedtls_mpi_cmp_mpi( &A, &W ) != 0 || in mpi_miller_rabin()
3099 mbedtls_mpi_free( &W ); mbedtls_mpi_free( &R ); in mpi_miller_rabin()