Lines Matching refs:N
280 mbedtls_mpi_uint *N = NULL;
293 TEST_EQUAL(mbedtls_test_read_mpi_core(&N, &limbs_N, input_N), 0);
306 &m, N, limbs,
339 mbedtls_free(N);
349 mbedtls_mpi_uint *N = NULL;
360 TEST_EQUAL(mbedtls_test_read_mpi_core(&N, &limbs_N, input_N), 0);
372 /* Check that 0 <= X < 2N */
373 mbedtls_mpi_uint c = mbedtls_mpi_core_sub(tmp, X, N, limbs);
374 TEST_ASSERT(c || mbedtls_mpi_core_lt_ct(tmp, N, limbs));
377 &m, N, limbs,
389 mbedtls_free(N);
401 mbedtls_mpi_uint *N = NULL;
415 TEST_EQUAL(mbedtls_test_read_mpi_core(&N, &limbs_N, input_N), 0);
428 &m, N, limbs,
481 mbedtls_free(N);
493 mbedtls_mpi_uint *N = NULL;
501 mbedtls_mpi N_mpi; /* gets set up manually, aliasing N, so no need to free */
506 TEST_EQUAL(0, mbedtls_test_read_mpi_core(&N, &N_limbs, input_N));
514 N_mpi.p = N;
540 mbedtls_mpi_mod_raw_inv_prime(Y, A, N, N_limbs, R2, T);
546 mbedtls_mpi_mod_raw_inv_prime(A, A, N, N_limbs, R2, T);
553 mbedtls_free(N);
558 // N_mpi doesn't need to be freed as it is only aliasing N
578 mbedtls_mpi_uint *N = NULL;
587 TEST_EQUAL(0, mbedtls_test_read_mpi_core(&N, &N_limbs, input_N));
601 &m, N, limbs,
654 mbedtls_free(N);
666 mbedtls_mpi_mod_modulus N;
667 mbedtls_mpi_mod_modulus_init(&N);
673 TEST_EQUAL(0, mbedtls_test_read_mpi_modulus(&N, input_N, rep));
677 TEST_EQUAL(0, mbedtls_mpi_mod_raw_canonical_to_modulus_rep(A, &N));
682 mbedtls_test_mpi_mod_modulus_free_with_limbs(&N);
693 mbedtls_mpi_mod_modulus N;
694 mbedtls_mpi_mod_modulus_init(&N);
700 TEST_EQUAL(0, mbedtls_test_read_mpi_modulus(&N, input_N, rep));
704 TEST_EQUAL(0, mbedtls_mpi_mod_raw_modulus_to_canonical_rep(A, &N));
709 mbedtls_test_mpi_mod_modulus_free_with_limbs(&N);
720 mbedtls_mpi_uint *N = NULL;
731 TEST_EQUAL(0, mbedtls_test_read_mpi_core(&N, &n_limbs, input_N));
745 TEST_EQUAL(0, mbedtls_mpi_mod_modulus_setup(&m, N, n_limbs,
754 mbedtls_mpi_core_to_mont_rep(R, A, N, n_limbs,
761 mbedtls_mpi_core_to_mont_rep(R, R, N, n_limbs,
775 mbedtls_free(N);
785 mbedtls_mpi_uint *N = NULL;
796 TEST_EQUAL(0, mbedtls_test_read_mpi_core(&N, &n_limbs, input_N));
810 TEST_EQUAL(0, mbedtls_mpi_mod_modulus_setup(&m, N, n_limbs,
819 mbedtls_mpi_core_from_mont_rep(R, A, N, n_limbs,
826 mbedtls_mpi_core_from_mont_rep(R, R, N, n_limbs,
840 mbedtls_free(N);
850 mbedtls_mpi_uint *N = NULL;
861 TEST_EQUAL(0, mbedtls_test_read_mpi_core(&N, &n_limbs, input_N));
872 TEST_EQUAL(0, mbedtls_mpi_mod_modulus_setup(&m, N, n_limbs,
879 /* Neg( A == N ) => Zero result */
880 mbedtls_mpi_mod_raw_neg(R, N, &m);
892 mbedtls_free(N);