diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/regress/lib/libcrypto/bn/bn_mod_exp.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/regress/lib/libcrypto/bn/bn_mod_exp.c b/src/regress/lib/libcrypto/bn/bn_mod_exp.c index f7be5110ea..4b98dea0d7 100644 --- a/src/regress/lib/libcrypto/bn/bn_mod_exp.c +++ b/src/regress/lib/libcrypto/bn/bn_mod_exp.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: bn_mod_exp.c,v 1.6 2022/12/03 08:05:52 tb Exp $ */ | 1 | /* $OpenBSD: bn_mod_exp.c,v 1.7 2022/12/03 08:21:38 tb Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -157,18 +157,20 @@ main(int argc, char *argv[]) | |||
157 | } | 157 | } |
158 | 158 | ||
159 | if (BN_cmp(r_simple, r_mont) != 0 || | 159 | if (BN_cmp(r_simple, r_mont) != 0 || |
160 | BN_cmp(r_simple, r_mont_const) || | ||
160 | BN_cmp(r_simple, r_recp) != 0 || | 161 | BN_cmp(r_simple, r_recp) != 0 || |
161 | BN_cmp(r_simple, r_mont_const) != 0) { | 162 | BN_cmp(r_simple, r_mont_ct) != 0 || |
163 | BN_cmp(r_simple, r_mont_nonct) != 0) { | ||
162 | if (BN_cmp(r_simple, r_mont) != 0) | 164 | if (BN_cmp(r_simple, r_mont) != 0) |
163 | printf("\nsimple and mont results differ\n"); | 165 | printf("\nsimple and mont results differ\n"); |
164 | if (BN_cmp(r_simple, r_mont_const) != 0) | 166 | if (BN_cmp(r_simple, r_mont_const) != 0) |
165 | printf("\nsimple and mont const time results differ\n"); | 167 | printf("\nsimple and mont const time results differ\n"); |
166 | if (BN_cmp(r_simple, r_recp) != 0) | 168 | if (BN_cmp(r_simple, r_recp) != 0) |
167 | printf("\nsimple and recp results differ\n"); | 169 | printf("\nsimple and recp results differ\n"); |
168 | if (BN_cmp(r_mont, r_mont_ct) != 0) | 170 | if (BN_cmp(r_simple, r_mont_ct) != 0) |
169 | printf("\nmont_ct and mont results differ\n"); | 171 | printf("\nsimple and mont results differ\n"); |
170 | if (BN_cmp(r_mont_ct, r_mont_nonct) != 0) | 172 | if (BN_cmp(r_simple, r_mont_nonct) != 0) |
171 | printf("\nmont_ct and mont_nonct results differ\n"); | 173 | printf("\nsimple and mont_nonct results differ\n"); |
172 | 174 | ||
173 | printf("a (%3d) = ", BN_num_bits(a)); | 175 | printf("a (%3d) = ", BN_num_bits(a)); |
174 | BN_print_fp(stdout, a); | 176 | BN_print_fp(stdout, a); |