mirror of
https://github.com/cheat/cheat.git
synced 2026-03-07 11:13:33 +01:00
chore: modernize CI and update Go toolchain
- Bump Go from 1.19 to 1.26 and update all dependencies - Rewrite CI workflow with matrix strategy (Linux, macOS, Windows) - Update GitHub Actions to current versions (checkout@v4, setup-go@v5) - Update CodeQL actions from v1 to v3 - Fix cross-platform bug in mock/path.go (path.Join -> filepath.Join) - Clean up dependabot config (weekly schedule, remove stale ignore) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
10
vendor/github.com/cloudflare/circl/ecc/goldilocks/curve.go
generated
vendored
10
vendor/github.com/cloudflare/circl/ecc/goldilocks/curve.go
generated
vendored
@@ -18,6 +18,9 @@ func (Curve) Identity() *Point {
|
||||
func (Curve) IsOnCurve(P *Point) bool {
|
||||
x2, y2, t, t2, z2 := &fp.Elt{}, &fp.Elt{}, &fp.Elt{}, &fp.Elt{}, &fp.Elt{}
|
||||
rhs, lhs := &fp.Elt{}, &fp.Elt{}
|
||||
// Check z != 0
|
||||
eq0 := !fp.IsZero(&P.z)
|
||||
|
||||
fp.Mul(t, &P.ta, &P.tb) // t = ta*tb
|
||||
fp.Sqr(x2, &P.x) // x^2
|
||||
fp.Sqr(y2, &P.y) // y^2
|
||||
@@ -27,13 +30,14 @@ func (Curve) IsOnCurve(P *Point) bool {
|
||||
fp.Mul(rhs, t2, ¶mD) // dt^2
|
||||
fp.Add(rhs, rhs, z2) // z^2 + dt^2
|
||||
fp.Sub(lhs, lhs, rhs) // x^2 + y^2 - (z^2 + dt^2)
|
||||
eq0 := fp.IsZero(lhs)
|
||||
eq1 := fp.IsZero(lhs)
|
||||
|
||||
fp.Mul(lhs, &P.x, &P.y) // xy
|
||||
fp.Mul(rhs, t, &P.z) // tz
|
||||
fp.Sub(lhs, lhs, rhs) // xy - tz
|
||||
eq1 := fp.IsZero(lhs)
|
||||
return eq0 && eq1
|
||||
eq2 := fp.IsZero(lhs)
|
||||
|
||||
return eq0 && eq1 && eq2
|
||||
}
|
||||
|
||||
// Generator returns the generator point.
|
||||
|
||||
Reference in New Issue
Block a user