- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 143 for bigN (0.04 sec)
-
src/crypto/elliptic/params.go
func (curve *CurveParams) affineFromJacobian(x, y, z *big.Int) (xOut, yOut *big.Int) { if z.Sign() == 0 { return new(big.Int), new(big.Int) } zinv := new(big.Int).ModInverse(z, curve.P) zinvsq := new(big.Int).Mul(zinv, zinv) xOut = new(big.Int).Mul(x, zinvsq) xOut.Mod(xOut, curve.P) zinvsq.Mul(zinvsq, zinv) yOut = new(big.Int).Mul(y, zinvsq) yOut.Mod(yOut, curve.P) return }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 16 17:46:09 UTC 2024 - 9.6K bytes - Viewed (0) -
src/crypto/internal/nistec/p256_ordinv_test.go
} // Check inv(1) and inv(N+1) against math/big exp := new(big.Int).ModInverse(big.NewInt(1), N).FillBytes(make([]byte, 32)) big.NewInt(1).FillBytes(input) out, err = nistec.P256OrdInverse(input) if err != nil { t.Fatal(err) } if !bytes.Equal(out, exp) { t.Error("unexpected output for inv(1)") } new(big.Int).Add(N, big.NewInt(1)).FillBytes(input) out, err = nistec.P256OrdInverse(input)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 04 17:29:44 UTC 2024 - 2.3K bytes - Viewed (0) -
test/fixedbugs/issue9604b.go
unop{"-", func(x *big.Int) *big.Int { return new(big.Int).Neg(x) }}, unop{"^", func(x *big.Int) *big.Int { return new(big.Int).Not(x) }}, } type shiftop struct { name string eval func(x *big.Int, i uint) *big.Int } var shiftops = []shiftop{ shiftop{"<<", func(x *big.Int, i uint) *big.Int { return new(big.Int).Lsh(x, i) }},
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 23:33:25 UTC 2023 - 4.8K bytes - Viewed (0) -
src/math/big/floatexample_test.go
operands := []float64{2.6, 2.5, 2.1, -2.1, -2.5, -2.6} fmt.Print(" x") for mode := big.ToNearestEven; mode <= big.ToPositiveInf; mode++ { fmt.Printf(" %s", mode) } fmt.Println() for _, f64 := range operands { fmt.Printf("%4g", f64) for mode := big.ToNearestEven; mode <= big.ToPositiveInf; mode++ { // sample operands above require 2 bits to represent mantissa
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jun 06 15:46:54 UTC 2024 - 4.1K bytes - Viewed (0) -
src/crypto/dsa/dsa.go
// This has better constant-time properties than Euclid's method (implemented // in math/big.Int.ModInverse) although math/big itself isn't strictly // constant-time so it's not perfect. func fermatInverse(k, P *big.Int) *big.Int { two := big.NewInt(2) pMinus2 := new(big.Int).Sub(P, two) return new(big.Int).Exp(k, pMinus2, P) } // Sign signs an arbitrary length hash (which should be the result of hashing a
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Oct 13 17:09:47 UTC 2023 - 7.2K bytes - Viewed (0) -
src/internal/types/testdata/check/lookup2.go
// instead we use the big.Float and ast.File types as they provide a suitable mix of exported and un- // exported fields and methods. func _() { var x *big.Float _ = x.Neg // OK _ = x.NeG // ERROR "x.NeG undefined (type *big.Float has no field or method NeG, but does have method Neg)" _ = x.Form // ERROR "x.Form undefined (type *big.Float has no field or method Form, but does have unexported field form)"
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Feb 07 16:41:56 UTC 2024 - 4.8K bytes - Viewed (0) -
src/crypto/ecdsa/ecdsa_legacy.go
// [SignASN1] instead of dealing directly with r, s. func Sign(rand io.Reader, priv *PrivateKey, hash []byte) (r, s *big.Int, err error) { sig, err := SignASN1(rand, priv, hash) if err != nil { return nil, nil, err } r, s = new(big.Int), new(big.Int) var inner cryptobyte.String input := cryptobyte.String(sig) if !input.ReadASN1(&inner, asn1.SEQUENCE) || !input.Empty() ||
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 00:11:18 UTC 2024 - 4.8K bytes - Viewed (0) -
src/crypto/elliptic/elliptic.go
IsOnCurve(x, y *big.Int) bool // Add returns the sum of (x1,y1) and (x2,y2). // // Deprecated: this is a low-level unsafe API. Add(x1, y1, x2, y2 *big.Int) (x, y *big.Int) // Double returns 2*(x,y). // // Deprecated: this is a low-level unsafe API. Double(x1, y1 *big.Int) (x, y *big.Int) // ScalarMult returns k*(x,y) where k is an integer in big-endian form. //
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/compile/internal/inline/inlheur/testdata/dumpscores.go
if x > 101 { // Drive up the cost of inlining this func over the // regular threshold. return big(big(big(big(big(G + x))))) } if x < 100 { // make sure this callsite is scored properly G += inlinable(101, inlinable2) if G == 101 { return 0 } panic(inlinable2(3)) } return G } func big(q int) int { return noninl(q) + noninl(-q)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Nov 15 14:26:26 UTC 2023 - 794 bytes - Viewed (0) -
src/crypto/x509/oid.go
} return dst } func base128BigIntLength(n *big.Int) int { if n.Cmp(big.NewInt(0)) == 0 { return 1 } return (n.BitLen() + 6) / 7 } func appendBase128BigInt(dst []byte, n *big.Int) []byte { if n.Cmp(big.NewInt(0)) == 0 { return append(dst, 0) } for i := base128BigIntLength(n) - 1; i >= 0; i-- { o := byte(big.NewInt(0).Rsh(n, uint(i)*7).Bits()[0]) o &= 0x7f if i != 0 {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 04 19:10:38 UTC 2024 - 8.3K bytes - Viewed (0)