diff options
| author | Brent Cook <busterb@gmail.com> | 2022-03-15 15:23:27 -0500 |
|---|---|---|
| committer | Brent Cook <busterb@gmail.com> | 2022-03-15 15:24:01 -0500 |
| commit | 5a800337effd17a82beb6094fbea378d3dd96452 (patch) | |
| tree | b39aa8bdc88ce12ca7fe06a555c7428fd0a85b96 | |
| parent | 120007084564f2877eac287418a236ab07f829d4 (diff) | |
| download | portable-OPENBSD_6_9.tar.gz portable-OPENBSD_6_9.tar.bz2 portable-OPENBSD_6_9.zip | |
remove local patch now upstreamOPENBSD_6_9
| -rw-r--r-- | patches/bn_sqrt.patch | 38 |
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)) | ||
