From 0f718c9ed003cfb1bf5ec5452f61aec99f9fad11 Mon Sep 17 00:00:00 2001 From: Minos Galanakis Date: Fri, 19 May 2023 14:22:06 +0100 Subject: [PATCH] bignum_mod: Fixed code-style Signed-off-by: Minos Galanakis --- library/bignum_mod.c | 8 ++++---- tests/suites/test_suite_bignum_mod.function | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/library/bignum_mod.c b/library/bignum_mod.c index ccc5c3bd78..70bb584b00 100644 --- a/library/bignum_mod.c +++ b/library/bignum_mod.c @@ -137,9 +137,9 @@ cleanup: } static inline void standard_modulus_setup(mbedtls_mpi_mod_modulus *N, - const mbedtls_mpi_uint *p, - size_t p_limbs, - mbedtls_mpi_mod_rep_selector int_rep) + const mbedtls_mpi_uint *p, + size_t p_limbs, + mbedtls_mpi_mod_rep_selector int_rep) { N->p = p; N->limbs = p_limbs; @@ -169,7 +169,7 @@ int mbedtls_mpi_mod_optred_modulus_setup(mbedtls_mpi_mod_modulus *N, mbedtls_mpi_opt_red_struct *ored) { standard_modulus_setup(N, p, p_limbs, MBEDTLS_MPI_MOD_REP_OPT_RED); - N->rep.ored =ored ; + N->rep.ored = ored; return 0; } diff --git a/tests/suites/test_suite_bignum_mod.function b/tests/suites/test_suite_bignum_mod.function index a515633bbb..4edc0b90eb 100644 --- a/tests/suites/test_suite_bignum_mod.function +++ b/tests/suites/test_suite_bignum_mod.function @@ -110,7 +110,7 @@ void mpi_mod_mul(char *input_A, mbedtls_mpi_mod_modulus_init(&m); TEST_EQUAL(mbedtls_test_read_mpi_modulus(&m, input_N, - MBEDTLS_MPI_MOD_REP_MONTGOMERY), 0); + MBEDTLS_MPI_MOD_REP_MONTGOMERY), 0); TEST_EQUAL(test_read_residue(&rA, &m, input_A, 0), 0); TEST_EQUAL(test_read_residue(&rB, &m, input_B, 0), 0); @@ -198,7 +198,7 @@ void mpi_mod_mul_neg(char *input_A, mbedtls_mpi_mod_modulus_init(&fake_m); TEST_EQUAL(mbedtls_test_read_mpi_modulus(&m, input_N, - MBEDTLS_MPI_MOD_REP_MONTGOMERY), 0); + MBEDTLS_MPI_MOD_REP_MONTGOMERY), 0); TEST_EQUAL(test_read_residue(&rA, &m, input_A, 1), 0); TEST_EQUAL(test_read_residue(&rB, &m, input_B, 1), 0); @@ -245,7 +245,7 @@ void mpi_mod_sub(char *input_N, TEST_EQUAL(0, mbedtls_test_read_mpi_modulus(&m, input_N, - MBEDTLS_MPI_MOD_REP_MONTGOMERY)); + MBEDTLS_MPI_MOD_REP_MONTGOMERY)); /* test_read_residue() normally checks that inputs have the same number of * limbs as the modulus. For negative testing we can ask it to skip this @@ -347,7 +347,7 @@ void mpi_mod_inv_mont(char *input_N, TEST_EQUAL(0, mbedtls_test_read_mpi_modulus(&N, input_N, - MBEDTLS_MPI_MOD_REP_MONTGOMERY)); + MBEDTLS_MPI_MOD_REP_MONTGOMERY)); /* test_read_residue() normally checks that inputs have the same number of * limbs as the modulus. For negative testing we can ask it to skip this @@ -397,7 +397,7 @@ void mpi_mod_inv_non_mont(char *input_N, TEST_EQUAL(0, mbedtls_test_read_mpi_modulus(&N, input_N, - MBEDTLS_MPI_MOD_REP_OPT_RED)); + MBEDTLS_MPI_MOD_REP_OPT_RED)); /* test_read_residue() normally checks that inputs have the same number of * limbs as the modulus. For negative testing we can ask it to skip this @@ -448,7 +448,7 @@ void mpi_mod_add(char *input_N, TEST_EQUAL(0, mbedtls_test_read_mpi_modulus(&m, input_N, - MBEDTLS_MPI_MOD_REP_MONTGOMERY)); + MBEDTLS_MPI_MOD_REP_MONTGOMERY)); /* test_read_residue() normally checks that inputs have the same number of * limbs as the modulus. For negative testing we can ask it to skip this