crypto/internal/fips140/bigmod: fix extendedGCD implementation mismatch#78932
crypto/internal/fips140/bigmod: fix extendedGCD implementation mismatch#78932ArquintL wants to merge 3 commits into
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
|
cc @FiloSottile |
|
This PR (HEAD: ac7edd6) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/770380. Important tips:
|
|
Message from Gopher Robot: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/770380. |
|
Message from Gopher Robot: Patch Set 1: Congratulations on opening your first change. Thank you for your contribution! Next steps: Most changes in the Go project go through a few rounds of revision. This can be During May-July and Nov-Jan the Go project is in a code freeze, during which Please don’t reply on this GitHub thread. Visit golang.org/cl/770380. |
|
Message from Linard Arquint: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/770380. |
|
This PR (HEAD: 6e376f8) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/770380. Important tips:
|
extendedGCD implementation mismatch|
Message from Filippo Valsorda: Patch Set 5: Auto-Submit+1 Code-Review+2 Commit-Queue+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/770380. |
|
Message from golang-scoped@luci-project-accounts.iam.gserviceaccount.com: Patch Set 5: Dry run: CV is trying the patch. Bot data: {"action":"start","triggered_at":"2026-06-04T13:40:40Z","revision":"34f633ed48e6040c9f9083a37a51e17debb0be46"} Please don’t reply on this GitHub thread. Visit golang.org/cl/770380. |
|
Message from Filippo Valsorda: Patch Set 5: -Commit-Queue (Performed by <GERRIT_ACCOUNT_60063> on behalf of <GERRIT_ACCOUNT_11715>) Please don’t reply on this GitHub thread. Visit golang.org/cl/770380. |
|
Message from golang-scoped@luci-project-accounts.iam.gserviceaccount.com: Patch Set 5: This CL has passed the run Please don’t reply on this GitHub thread. Visit golang.org/cl/770380. |
|
Message from golang-scoped@luci-project-accounts.iam.gserviceaccount.com: Patch Set 5: LUCI-TryBot-Result+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/770380. |
|
Message from Roland Shoemaker: Patch Set 5: Code-Review+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/770380. |
The existing extendedGCD implementation differs from
BoringSSL & Fiat-Crypto, which this PR fixes.
Avoiding the calls to Nat.Add in the loop results in an on average
24% speedup due to in-place updates instead of allocating temporary
Nat instances as shown in this plot:
While all annotations have been removed for this PR, the fixed
implementation is backed by proofs using Gobra (https://gobra.ethz.ch),
a program verifier for Go programs. The linked issue describes the
proofs in more details.
Fixes #78218