- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 129 for newRat (0.12 sec)
-
src/go/constant/value.go
if !is63bit(a) || !is63bit(b) { return makeInt(newInt().Add(big.NewInt(a), big.NewInt(b))) } c = a + b case token.SUB: if !is63bit(a) || !is63bit(b) { return makeInt(newInt().Sub(big.NewInt(a), big.NewInt(b))) } c = a - b case token.MUL: if !is32bit(a) || !is32bit(b) { return makeInt(newInt().Mul(big.NewInt(a), big.NewInt(b))) } c = a * b case token.QUO:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 12:02:03 UTC 2023 - 34K bytes - Viewed (0) -
src/crypto/internal/mlkem768/mlkem768_test.go
} func TestZetas(t *testing.T) { ζ := big.NewInt(17) q := big.NewInt(q) for k, zeta := range zetas { // ζ^BitRev7(k) mod q exp := new(big.Int).Exp(ζ, big.NewInt(int64(BitRev7(uint8(k)))), q) if big.NewInt(int64(zeta)).Cmp(exp) != 0 { t.Errorf("zetas[%d] = %v, expected %v", k, zeta, exp) } } } func TestGammas(t *testing.T) { ζ := big.NewInt(17) q := big.NewInt(q)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 06 15:27:18 UTC 2024 - 10.3K bytes - Viewed (0) -
src/math/big/rat.go
// is made), such uninitialized denominators are set to 1. // a.neg determines the sign of the Rat, b.neg is ignored. a, b Int } // NewRat creates a new [Rat] with numerator a and denominator b. func NewRat(a, b int64) *Rat { return new(Rat).SetFrac64(a, b) } // SetFloat64 sets z to exactly f and returns z. // If f is not finite, SetFloat returns nil.
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/rsa/rsa.go
Qinv, err := bigmod.NewNat().SetBytes(priv.Precomputed.Qinv.Bytes(), P) if err != nil { return nil, ErrDecryption } c, err = bigmod.NewNat().SetBytes(ciphertext, N) if err != nil { return nil, ErrDecryption } // m = c ^ Dp mod p m = bigmod.NewNat().Exp(t0.Mod(c, P), priv.Precomputed.Dp.Bytes(), P) // m2 = c ^ Dq mod q
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 00:11:18 UTC 2024 - 23.4K bytes - Viewed (0) -
src/crypto/ecdsa/ecdsa.go
} // SEC 1, Version 2.0, Section 4.1.4 r, err := bigmod.NewNat().SetBytes(rBytes, c.N) if err != nil || r.IsZero() == 1 { return false } s, err := bigmod.NewNat().SetBytes(sBytes, c.N) if err != nil || s.IsZero() == 1 { return false } e := bigmod.NewNat() hashToNat(c, e, hash) // w = s⁻¹ w := bigmod.NewNat() inverse(c, w, s) // p₁ = [e * s⁻¹]G
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 00:11:18 UTC 2024 - 20.4K bytes - Viewed (0) -
src/crypto/internal/bigmod/nat.go
// are likely to be more efficient if necessary. table := [(1 << 4) - 1]*Nat{ // table[i] = x ^ (i+1) // newNat calls are unrolled so they are allocated on the stack. NewNat(), NewNat(), NewNat(), NewNat(), NewNat(), NewNat(), NewNat(), NewNat(), NewNat(), NewNat(), NewNat(), NewNat(), NewNat(), NewNat(), NewNat(), } table[0].set(x).montgomeryRepresentation(m) for i := 1; i < len(table); i++ {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 13 18:57:38 UTC 2024 - 24K bytes - Viewed (0) -
src/crypto/internal/bigmod/nat_test.go
N, _ := NewModulusFromBig(n) A := NewNat().setBig(a).ExpandFor(N) B := NewNat().setBig(b).ExpandFor(N) if A.Mul(B, N).IsZero() != 1 { t.Error("a * b mod (a * b) != 0") } i := new(big.Int).ModInverse(a, b) N, _ = NewModulusFromBig(b) A = NewNat().setBig(a).ExpandFor(N) I := NewNat().setBig(i).ExpandFor(N) one := NewNat().setBig(big.NewInt(1)).ExpandFor(N) if A.Mul(I, N).Equal(one) != 1 {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Jan 12 00:56:20 UTC 2024 - 11.6K bytes - Viewed (0) -
src/runtime/slice.go
// gives a smooth-ish transition between the two. newcap += (newcap + 3*threshold) >> 2 // We need to check `newcap >= newLen` and whether `newcap` overflowed. // newLen is guaranteed to be larger than zero, hence // when newcap overflows then `uint(newcap) > uint(newLen)`. // This allows to check for both with the same comparison. if uint(newcap) >= uint(newLen) { break } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 29 16:25:21 UTC 2024 - 12.2K bytes - Viewed (0) -
src/crypto/ecdsa/ecdsa_test.go
hashToNat(c, bigmod.NewNat(), h) } } func TestZeroSignature(t *testing.T) { testAllCurves(t, testZeroSignature) } func testZeroSignature(t *testing.T, curve elliptic.Curve) { privKey, err := GenerateKey(curve, rand.Reader) if err != nil { panic(err) } if Verify(&privKey.PublicKey, make([]byte, 64), big.NewInt(0), big.NewInt(0)) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Feb 26 21:33:58 UTC 2024 - 13.5K bytes - Viewed (0) -
pkg/apis/resource/validation/validation_resourceclaim_test.go
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Jun 07 09:18:10 UTC 2024 - 28.7K bytes - Viewed (0)