- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 18 for mod_sqrt (0.21 sec)
-
src/crypto/elliptic/elliptic_test.go
// Check if P is treated like zero (if possible). // y^2 = x^3 - 3x + B // y = mod_sqrt(x^3 - 3x + B) // y = mod_sqrt(B) if x = 0 // If there is no modsqrt, there is no point with x = 0, can't test x = P. if yy := new(big.Int).ModSqrt(curve.Params().B, p); yy != nil { if !curve.IsOnCurve(big.NewInt(0), yy) { t.Fatal("(0, mod_sqrt(B)) is not on the curve?") } checkIsOnCurveFalse("P, y", p, yy) } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 27 02:00:03 UTC 2023 - 11.6K bytes - Viewed (0) -
src/cmd/go/internal/gover/mod_test.go
{"toolchain", "v1.2", false}, {"rsc.io/quote", "v1.2", true}, {"rsc.io/quote", "1.2", false}, } func TestModSort(t *testing.T) { test1(t, modSortTests, "ModSort", func(list []module.Version) []module.Version { out := slices.Clone(list) ModSort(out) return out }) } var modSortTests = []testCase1[[]module.Version, []module.Version]{ {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 25 17:51:28 UTC 2023 - 2K bytes - Viewed (0) -
src/cmd/go/internal/gover/mod.go
} if path == "toolchain" { return Compare(maybeToolchainVersion(x), maybeToolchainVersion(y)) } return semver.Compare(x, y) } // ModSort is like module.Sort but understands the "go" and "toolchain" // modules and their version ordering. func ModSort(list []module.Version) { sort.Slice(list, func(i, j int) bool { mi := list[i] mj := list[j] if mi.Path != mj.Path { return mi.Path < mj.Path }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 06 19:18:46 UTC 2023 - 3.4K bytes - Viewed (0) -
src/math/big/alias_test.go
}, "ModInverse": func(v, x bigInt, y notZeroInt) bool { return checkAliasingTwoArgs(t, (*big.Int).ModInverse, v.Int, x.Int, y.Int) }, "ModSqrt": func(v, x bigInt, p prime) bool { return checkAliasingTwoArgs(t, (*big.Int).ModSqrt, v.Int, x.Int, p.Int) }, "Mul": func(v, x, y bigInt) bool { return checkAliasingTwoArgs(t, (*big.Int).Mul, v.Int, x.Int, y.Int) }, "Neg": func(v, x bigInt) bool {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 19 15:49:05 UTC 2022 - 8.8K bytes - Viewed (0) -
src/math/big/int_test.go
if z != &sqrtChk || z.Cmp(sqrt) != 0 { t.Errorf("ModSqrt returned inconsistent value %s", z) } sqChk.Sub(sq, mod) z = sqrtChk.ModSqrt(&sqChk, mod) if z != &sqrtChk || z.Cmp(sqrt) != 0 { t.Errorf("ModSqrt returned inconsistent value %s", z) } // test x aliasing z z = sqrtChk.ModSqrt(sqrtChk.Set(sq), mod) if z != &sqrtChk || z.Cmp(sqrt) != 0 {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 18:42:28 UTC 2024 - 58.5K bytes - Viewed (0) -
src/cmd/go/internal/workcmd/sync.go
if r := modload.PackageModule(pkg); r.Version != "" && !inMustSelect[r] { // r has a known version, so force that version. mustSelect = append(mustSelect, r) inMustSelect[r] = true } } gover.ModSort(mustSelect) // ensure determinism mustSelectFor[m] = mustSelect } workFilePath := modload.WorkFilePath() // save go.work path because EnterModule clobbers it. var goV string for _, m := range mms.Versions() {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sat Jun 03 21:13:11 UTC 2023 - 4.6K bytes - Viewed (0) -
src/cmd/go/internal/mvs/graph.go
seenRoot[r.Path] = true } uniqueRoots := list for path, version := range g.selected { if !seenRoot[path] { list = append(list, module.Version{Path: path, Version: version}) } } gover.ModSort(list[len(uniqueRoots):]) return list } // WalkBreadthFirst invokes f once, in breadth-first order, for each module // version other than "none" that appears in the graph, regardless of whether
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jun 01 02:52:19 UTC 2023 - 6.3K bytes - Viewed (0) -
src/crypto/elliptic/elliptic.go
return nil, nil } p := curve.Params().P x = new(big.Int).SetBytes(data[1:]) if x.Cmp(p) >= 0 { return nil, nil } // y² = x³ - 3x + b y = curve.Params().polynomial(x) y = y.ModSqrt(y, p) if y == nil { return nil, nil } if byte(y.Bit(0)) != data[0]&1 { y.Neg(y).Mod(y, p) } if !curve.IsOnCurve(x, y) { return nil, nil } return }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Oct 13 17:09:47 UTC 2023 - 9K bytes - Viewed (0) -
src/cmd/go/internal/modload/buildlist.go
// The dependencies of the roots will be loaded lazily at the first call to the // Graph method. // // The rootModules slice must be sorted according to gover.ModSort. // The caller must not modify the rootModules slice or direct map after passing // them to newRequirements. // // If vendoring is in effect, the caller must invoke initVendor on the returned
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 15 16:04:44 UTC 2024 - 53.8K bytes - Viewed (0) -
src/math/big/int.go
b.Mul(&b, &g).Mod(&b, p) r = m } } // ModSqrt sets z to a square root of x mod p if such a square root exists, and // returns z. The modulus p must be an odd prime. If x is not a square mod p, // ModSqrt leaves z unchanged and returns nil. This function panics if p is // not an odd integer, its behavior is undefined if p is odd but not prime. func (z *Int) ModSqrt(x, p *Int) *Int { switch Jacobi(x, p) { case -1:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 14 17:02:38 UTC 2024 - 33.1K bytes - Viewed (0)