aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrent Cook <busterb@gmail.com>2022-03-15 15:23:27 -0500
committerBrent Cook <busterb@gmail.com>2022-03-15 15:24:09 -0500
commit6c1bd27ae1cea0bc642c6febb34f4e41a2d59cf3 (patch)
tree305a3eb98e7722cd0929bcb1c2eb51b3328548ef
parent394639f4eb4d7d324700ecb2f7900f7516139f8f (diff)
downloadportable-OPENBSD_7_0.tar.gz
portable-OPENBSD_7_0.tar.bz2
portable-OPENBSD_7_0.zip
remove local patch now upstreamOPENBSD_7_0
-rw-r--r--patches/bn_sqrt.patch38
1 files changed, 0 insertions, 38 deletions
diff --git a/patches/bn_sqrt.patch b/patches/bn_sqrt.patch
deleted file mode 100644
index 495de31..0000000
--- a/patches/bn_sqrt.patch
+++ /dev/null
@@ -1,38 +0,0 @@
1--- crypto/bn/bn_sqrt.c.orig Fri Feb 18 16:30:39 2022
2+++ crypto/bn/bn_sqrt.c Sat Mar 12 11:23:53 2022
3@@ -351,21 +351,22 @@
4 goto vrfy;
5 }
6
7-
8- /* find smallest i such that b^(2^i) = 1 */
9- i = 1;
10- if (!BN_mod_sqr(t, b, p, ctx))
11- goto end;
12- while (!BN_is_one(t)) {
13- i++;
14- if (i == e) {
15- BNerror(BN_R_NOT_A_SQUARE);
16- goto end;
17+ /* Find the smallest i with 0 < i < e such that b^(2^i) = 1. */
18+ for (i = 1; i < e; i++) {
19+ if (i == 1) {
20+ if (!BN_mod_sqr(t, b, p, ctx))
21+ goto end;
22+ } else {
23+ if (!BN_mod_sqr(t, t, p, ctx))
24+ goto end;
25 }
26- if (!BN_mod_mul(t, t, t, p, ctx))
27- goto end;
28+ if (BN_is_one(t))
29+ break;
30 }
31-
32+ if (i >= e) {
33+ BNerror(BN_R_NOT_A_SQUARE);
34+ goto end;
35+ }
36
37 /* t := y^2^(e - i - 1) */
38 if (!BN_copy(t, y))