Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 306 for Primes (0.12 sec)

  1. src/crypto/rsa/rsa.go

    	priv.Precomputed.Dq = new(big.Int).Sub(priv.Primes[1], bigOne)
    	priv.Precomputed.Dq.Mod(priv.D, priv.Precomputed.Dq)
    
    	priv.Precomputed.Qinv = new(big.Int).ModInverse(priv.Primes[1], priv.Primes[0])
    
    	r := new(big.Int).Mul(priv.Primes[0], priv.Primes[1])
    	priv.Precomputed.CRTValues = make([]CRTValue, len(priv.Primes)-2)
    	for i := 2; i < len(priv.Primes); i++ {
    		prime := priv.Primes[i]
    		values := &priv.Precomputed.CRTValues[i-2]
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:11:18 UTC 2024
    - 23.4K bytes
    - Viewed (0)
  2. src/crypto/x509/pkcs1.go

    		E: priv.E,
    		N: priv.N,
    	}
    
    	key.D = priv.D
    	key.Primes = make([]*big.Int, 2+len(priv.AdditionalPrimes))
    	key.Primes[0] = priv.P
    	key.Primes[1] = priv.Q
    	for i, a := range priv.AdditionalPrimes {
    		if a.Prime.Sign() <= 0 {
    			return nil, errors.New("x509: private key contains zero or negative prime")
    		}
    		key.Primes[i+2] = a.Prime
    		// We ignore the other two values because rsa will calculate
    		// them as needed.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 13 17:09:47 UTC 2023
    - 4.7K bytes
    - Viewed (0)
  3. src/crypto/dsa/dsa.go

    // this error must be handled.
    var ErrInvalidPublicKey = errors.New("crypto/dsa: invalid public key")
    
    // ParameterSizes is an enumeration of the acceptable bit lengths of the primes
    // in a set of DSA parameters. See FIPS 186-3, section 4.2.
    type ParameterSizes int
    
    const (
    	L1024N160 ParameterSizes = iota
    	L2048N224
    	L2048N256
    	L3072N256
    )
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 13 17:09:47 UTC 2023
    - 7.2K bytes
    - Viewed (0)
  4. src/crypto/x509/x509_test.go

    	}
    	if priv.PublicKey.N.Cmp(priv2.PublicKey.N) != 0 ||
    		priv.PublicKey.E != priv2.PublicKey.E ||
    		priv.D.Cmp(priv2.D) != 0 ||
    		len(priv2.Primes) != 3 ||
    		priv.Primes[0].Cmp(priv2.Primes[0]) != 0 ||
    		priv.Primes[1].Cmp(priv2.Primes[1]) != 0 ||
    		priv.Primes[2].Cmp(priv2.Primes[2]) != 0 {
    		t.Errorf("got:%+v want:%+v", priv, priv2)
    	}
    }
    
    func TestMarshalRSAPublicKey(t *testing.T) {
    	pub := &rsa.PublicKey{
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 21:00:16 UTC 2024
    - 163.4K bytes
    - Viewed (0)
  5. src/crypto/internal/bigmod/nat_test.go

    // 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.
    	a, _ := new(big.Int).SetString("773608962677651230850240281261679752031633236267106044359907", 10)
    	b, _ := new(big.Int).SetString("180692823610368451951102211649591374573781973061758082626801", 10)
    	n := new(big.Int).Mul(a, b)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jan 12 00:56:20 UTC 2024
    - 11.6K bytes
    - Viewed (0)
  6. src/math/big/int_test.go

    }
    
    func TestModSqrt(t *testing.T) {
    	var elt, mod, modx4, sq, sqrt Int
    	r := rand.New(rand.NewSource(9))
    	for i, s := range primes[1:] { // skip 2, use only odd primes
    		mod.SetString(s, 10)
    		modx4.Lsh(&mod, 2)
    
    		// test a few random elements per prime
    		for x := 1; x < 5; x++ {
    			elt.Rand(r, &modx4)
    			elt.Sub(&elt, &mod) // test range [-mod, 3*mod)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 18:42:28 UTC 2024
    - 58.5K bytes
    - Viewed (0)
  7. src/math/big/int.go

    }
    
    // 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:
    		return nil // x is not a square mod p
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 14 17:02:38 UTC 2024
    - 33.1K bytes
    - Viewed (0)
  8. src/crypto/internal/nistec/p256_asm.go

    // implementation of P256. The optimizations performed here are described in
    // detail in:
    // S.Gueron and V.Krasnov, "Fast prime field elliptic-curve cryptography with
    //                          256-bit primes"
    // https://link.springer.com/article/10.1007%2Fs13389-014-0090-x
    // https://eprint.iacr.org/2013/816.pdf
    
    //go:build (amd64 || arm64 || ppc64le || s390x) && !purego
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 13 18:57:38 UTC 2024
    - 21.4K bytes
    - Viewed (0)
  9. src/cmd/vendor/rsc.io/markdown/entity.go

    	"&precnapprox;":                     "\u2ab9",
    	"&precneqq;":                        "\u2ab5",
    	"&precnsim;":                        "\u22e8",
    	"&precsim;":                         "\u227e",
    	"&prime;":                           "\u2032",
    	"&primes;":                          "\u2119",
    	"&prnE;":                            "\u2ab5",
    	"&prnap;":                           "\u2ab9",
    	"&prnsim;":                          "\u22e8",
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 24 13:01:26 UTC 2024
    - 101K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apiserver/pkg/storage/cacher/cacher_whitebox_test.go

    					listAccessor, err := meta.ListAccessor(listObj)
    					if err != nil {
    						return err
    					}
    					// the first call to this function
    					// primes the cacher
    					if !hasBeenPrimed {
    						listAccessor.SetResourceVersion("100")
    						hasBeenPrimed = true
    						return nil
    					}
    					listAccessor.SetResourceVersion("105")
    					return nil
    				}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 12 10:12:02 UTC 2024
    - 82.9K bytes
    - Viewed (0)
Back to top