- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 78 for BeUint64 (0.19 sec)
-
src/crypto/ecdh/nist.go
bufA[i], bufB[i] = a[len(a)-i-1], b[len(b)-i-1] } // Perform a subtraction with borrow. var borrow uint64 for i := 0; i < len(bufA); i += 8 { limbA, limbB := byteorder.LeUint64(bufA[i:]), byteorder.LeUint64(bufB[i:]) _, borrow = bits.Sub64(limbA, limbB, borrow) } // If there is a borrow at the end of the operation, then a < b. return borrow == 1 }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 13 18:57:38 UTC 2024 - 8.1K bytes - Viewed (0) -
src/math/big/rat.go
if b == 0 { panic("division by zero") } z.a.SetInt64(a) if b < 0 { b = -b z.a.neg = !z.a.neg } z.b.abs = z.b.abs.setUint64(uint64(b)) return z.norm() } // SetInt sets z to x (by making a copy of x) and returns z. func (z *Rat) SetInt(x *Int) *Rat { z.a.Set(x) z.b.abs = z.b.abs.setWord(1) return z } // SetInt64 sets z to x and returns z.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 11:59:09 UTC 2023 - 13.5K bytes - Viewed (0) -
src/crypto/dsa/dsa_test.go
} if params.Q.BitLen() != N { t.Errorf("%d: q.BitLen got:%d want:%d", int(sizes), params.Q.BitLen(), L) } one := new(big.Int) one.SetInt64(1) pm1 := new(big.Int).Sub(params.P, one) quo, rem := new(big.Int).DivMod(pm1, params.Q, new(big.Int)) if rem.Sign() != 0 { t.Errorf("%d: p-1 mod q != 0", int(sizes)) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Nov 15 21:04:43 UTC 2019 - 4.7K bytes - Viewed (0) -
src/math/big/intconv_test.go
return "%o" case 16: return "%x" } return "%d" } func TestGetString(t *testing.T) { z := new(Int) for i, test := range stringTests { if !test.ok { continue } z.SetInt64(test.val) if test.base == 10 { if got := z.String(); got != test.out { t.Errorf("#%da got %s; want %s", i, got, test.out) } } f := format(test.base) got := fmt.Sprintf(f, z)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 12 22:58:58 UTC 2019 - 10K bytes - Viewed (0) -
src/crypto/elliptic/p256_test.go
scalars := make([]*big.Int, 0, len(p224BaseMultTests)+1) for _, e := range p224BaseMultTests { k, _ := new(big.Int).SetString(e.k, 10) scalars = append(scalars, k) } k := new(big.Int).SetInt64(1) k.Lsh(k, 500) scalars = append(scalars, k) for i, k := range scalars { x, y := p256.ScalarBaseMult(k.Bytes()) x2, y2 := p256Generic.ScalarBaseMult(k.Bytes()) if x.Cmp(x2) != 0 || y.Cmp(y2) != 0 {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 31 16:58:48 UTC 2022 - 4.2K bytes - Viewed (0) -
src/crypto/dsa/dsa.go
return errors.New("crypto/dsa: invalid ParameterSizes") } qBytes := make([]byte, N/8) pBytes := make([]byte, L/8) q := new(big.Int) p := new(big.Int) rem := new(big.Int) one := new(big.Int) one.SetInt64(1) GeneratePrimes: for { if _, err := io.ReadFull(rand, qBytes); err != nil { return err } qBytes[len(qBytes)-1] |= 1 qBytes[0] |= 0x80 q.SetBytes(qBytes)
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/math/big/sqrt_test.go
sq := new(Float).SetPrec(prec+32).Mul(got, got) diff := new(Float).Sub(sq, x) err := diff.Abs(diff).SetPrec(prec) // maxErr = 2**(-p+1)*√x one := new(Float).SetPrec(prec).SetInt64(1) maxErr := new(Float).Mul(new(Float).SetMantExp(one, -int(prec)+1), got) if err.Cmp(maxErr) >= 0 { t.Errorf("prec = %d, Sqrt(%v) =\ngot err %g;\nwant maxErr %g", prec, test.x, err, maxErr) } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 12:54:00 UTC 2019 - 4.8K bytes - Viewed (0) -
src/crypto/elliptic/elliptic_test.go
t.Error("basepoint is not on the curve") } }) } func TestOffCurve(t *testing.T) { t.Parallel() testAllCurves(t, func(t *testing.T, curve Curve) { x, y := new(big.Int).SetInt64(1), new(big.Int).SetInt64(1) if curve.IsOnCurve(x, y) { t.Errorf("point off curve is claimed to be on the curve") } byteLen := (curve.Params().BitSize + 7) / 8 b := make([]byte, 1+2*byteLen)
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/compile/internal/ir/const.go
ConstPrec = 512 ) func BigFloat(v constant.Value) *big.Float { f := new(big.Float) f.SetPrec(ConstPrec) switch u := constant.Val(v).(type) { case int64: f.SetInt64(u) case *big.Int: f.SetInt(u) case *big.Float: f.Set(u) case *big.Rat: f.SetRat(u) default: base.Fatalf("unexpected: %v", u) } return f }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Sep 12 18:53:26 UTC 2023 - 4K bytes - Viewed (0) -
src/crypto/elliptic/params.go
// 0) is not on the any of the curves handled here. func zForAffine(x, y *big.Int) *big.Int { z := new(big.Int) if x.Sign() != 0 || y.Sign() != 0 { z.SetInt64(1) } return z } // affineFromJacobian reverses the Jacobian transform. See the comment at the // top of the file. If the point is ∞ it returns 0, 0.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 16 17:46:09 UTC 2024 - 9.6K bytes - Viewed (0)