- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for montgomery (0.16 sec)
-
src/math/big/nat.go
for i := len(y) - 1; i >= 0; i-- { yi := y[i] for j := 0; j < _W; j += n { if i != len(y)-1 || j != 0 { zz = zz.montgomery(z, z, m, k0, numWords) z = z.montgomery(zz, zz, m, k0, numWords) zz = zz.montgomery(z, z, m, k0, numWords) z = z.montgomery(zz, zz, m, k0, numWords) } zz = zz.montgomery(z, powers[yi>>(_W-n)], m, k0, numWords)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 13 21:31:58 UTC 2024 - 31.7K bytes - Viewed (0) -
src/crypto/internal/bigmod/nat.go
// n = len(m.nat.limbs). // // Faster Montgomery multiplication replaces standard modular multiplication for // numbers in this representation. // // This assumes that x is already reduced mod m. func (x *Nat) montgomeryRepresentation(m *Modulus) *Nat { // A Montgomery multiplication (which computes a * b / R) by R * R works out // to a multiplication by R, which takes the value out of the Montgomery domain. return x.montgomeryMul(x, m.rr, m)
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/nistec/p256_asm.go
// domain (with R 2²⁵⁶) as four limbs in little-endian order value. type p256Element [4]uint64 // p256One is one in the Montgomery domain. var p256One = p256Element{0x0000000000000001, 0xffffffff00000000, 0xffffffffffffffff, 0x00000000fffffffe} var p256Zero = p256Element{} // p256P is 2²⁵⁶ - 2²²⁴ + 2¹⁹² + 2⁹⁶ - 1 in the Montgomery domain.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 13 18:57:38 UTC 2024 - 21.4K bytes - Viewed (0) -
src/crypto/internal/edwards25519/scalar_fiat.go
// The type fiatScalarMontgomeryDomainFieldElement is a field element in the Montgomery domain. // // Bounds: [[0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff]] type fiatScalarMontgomeryDomainFieldElement [4]uint64 // The type fiatScalarNonMontgomeryDomainFieldElement is a field element NOT in the Montgomery domain. //
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Nov 10 18:45:00 UTC 2022 - 35.6K bytes - Viewed (0) -
src/crypto/internal/edwards25519/scalar.go
// // This type works similarly to math/big.Int, and all arguments and // receivers are allowed to alias. // // The zero value is a valid zero element. type Scalar struct { // s is the scalar in the Montgomery domain, in the format of the // fiat-crypto implementation. s fiatScalarMontgomeryDomainFieldElement } // The field implementation in scalar_fiat.go is generated by the fiat-crypto
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 13 18:57:38 UTC 2024 - 10.8K bytes - Viewed (0) -
src/math/big/nat_test.go
k0 := Word(new(Int).ModInverse(k, _B).Uint64()) if k0 != Word(test.k0) { t.Errorf("#%d: k0 in table=%#x, computed=%#x\n", i, test.k0, k0) } // check montgomery with correct k0 produces correct output z := nat(nil).montgomery(x, y, m, k0, len(m)) z = z.norm() if z.cmp(out) != 0 { t.Errorf("#%d: got 0x%s want 0x%s", i, z.utoa(16), out.utoa(16)) } } } var expNNTests = []struct {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jan 09 15:29:36 UTC 2024 - 26.2K bytes - Viewed (0) -
src/crypto/internal/bigmod/nat_test.go
expected := &Nat{[]uint{1}} if out.Equal(expected) != 1 { t.Errorf("%+v != %+v", out, expected) } } // TestMulReductions tests that Mul reduces results equal or slightly greater // than the modulus. Some Montgomery algorithms don't and need extra care to // return correct results. See https://go.dev/issue/13907. func TestMulReductions(t *testing.T) { // Two short but multi-limb primes.
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/cmd/compile/internal/ssa/magic.go
// Divisibility x%c == 0 can be checked more efficiently than directly computing // the modulus x%c and comparing against 0. // // The same "Division by invariant integers using multiplication" paper // by Granlund and Montgomery referenced above briefly mentions this method // and it is further elaborated in "Hacker's Delight" by Warren Section 10-17 // // The first thing to note is that for odd integers, exact division can be computed
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 26 19:58:25 UTC 2024 - 15.8K bytes - Viewed (0) -
src/crypto/rsa/rsa.go
// and is implemented by this package without CRT optimizations to limit // complexity. CRTValues []CRTValue n, p, q *bigmod.Modulus // moduli for CRT with Montgomery precomputed constants } // CRTValue contains the precomputed Chinese remainder theorem values. type CRTValue struct { Exp *big.Int // D mod (prime-1). Coeff *big.Int // R·Coeff ≡ 1 mod Prime.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 00:11:18 UTC 2024 - 23.4K bytes - Viewed (0)