Lines Matching +full:- +full:z

1 /* mbedTLS bignum (MPI) self-tests as unit tests
18 print output that can be copy-pasted directly into a Python shell.
25 mbedtls_mpi_write_string(X, 16, buf, sizeof(buf)-1, &n); in mbedtls_mpi_printf()
27 printf("%s = (s=%d) 0x%s\n", name, X->s, buf); in mbedtls_mpi_printf()
64 mbedtls_mpi_write_string(&X, 16, x_buf, sizeof(x_buf)-1, &x_buf_len); in test_bignum_mult_variant()
77 mbedtls_mpi_write_string(&X, 16, x_buf, sizeof(x_buf)-1, &x_buf_len); in test_bignum_mult_variant()
124 …test_bignum_mult("-5D88B669C417EDD02213723546A906B7E9DA7683780E9B54856A2147467ADA316F8819D69486FC8…
126 …"-38990016EB21810E3B5E6AEE339AEE72BB7CD629C4C9270A3D832701A2949BC82B2BE5A7F900C0C99374646998628219…
153 mbedtls_mpi Z = {0}; // Z is non-initialized (the sign Z.s=0) in test_bignum_modexp() local
169 /* Z = (X ^ Y) mod M */ in test_bignum_modexp()
170 // (Z is passed to mbedtls_mpi_exp_mod() as a non-initialized with the sign s=0) in test_bignum_modexp()
171 int err = mbedtls_mpi_exp_mod(&Z, &X, &Y, &M, NULL); in test_bignum_modexp()
178 mbedtls_mpi_write_string(&Z, 16, z_buf, sizeof(z_buf)-1, &z_buf_len); in test_bignum_modexp()
179 if (strlen(z_str) != z_buf_len - 1 || memcmp(z_str, z_buf, strlen(z_str)) != 0) { in test_bignum_modexp()
181 mbedtls_mpi_printf("Z", &Z); in test_bignum_modexp()
185 printf("\nsize: Expected %d, Was %d \n", strlen(z_str), z_buf_len - 1); in test_bignum_modexp()
191 mbedtls_mpi_free(&Z); in test_bignum_modexp()
207 printf("Z = (X ^ Y) mod M \n");
208 // test_bignum_modexp(Z, X, Y, M, ret_error);
224 test_error |= test_bignum_modexp("04", "2", "-2", "9", MBEDTLS_ERR_MPI_BAD_INPUT_DATA);
225 test_error |= test_bignum_modexp("04", "2", "2", "-9", MBEDTLS_ERR_MPI_BAD_INPUT_DATA);
226 test_error |= test_bignum_modexp("04", "2", "-2", "-9", MBEDTLS_ERR_MPI_BAD_INPUT_DATA);
234 test_error |= test_bignum_modexp("04", "-2", "2", "9", MBEDTLS_OK);
235 test_error |= test_bignum_modexp("01", "-2", "0", "9", MBEDTLS_OK);
236 test_error |= test_bignum_modexp("07", "-2", "7", "9", MBEDTLS_OK);
237 test_error |= test_bignum_modexp("07", "-2", "1", "9", MBEDTLS_OK);
242 test_error |= test_bignum_modexp("02", "-5", "7", "7", MBEDTLS_OK);
243 test_error |= test_bignum_modexp("01", "-5", "7", "3", MBEDTLS_OK);
248 test_error |= test_bignum_modexp("06", "-32", "03E9", "07", MBEDTLS_OK);