Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 150 for publicKey (0.13 sec)

  1. src/crypto/ecdh/nist.go

    func (c *nistCurve[Point]) NewPublicKey(key []byte) (*PublicKey, error) {
    	// Reject the point at infinity and compressed encodings.
    	if len(key) == 0 || key[0] != 4 {
    		return nil, errors.New("crypto/ecdh: invalid public key")
    	}
    	k := &PublicKey{
    		curve:     c,
    		publicKey: append([]byte{}, key...),
    	}
    	if boring.Enabled {
    		bk, err := boring.NewPublicKeyECDH(c.name, k.publicKey)
    		if err != nil {
    			return nil, err
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 13 18:57:38 UTC 2024
    - 8.1K bytes
    - Viewed (0)
  2. src/crypto/rsa/rsa_test.go

    	if err == nil {
    		err = VerifyPKCS1v15(&priv.PublicKey, crypto.SHA256, hash[:], sig)
    		if err != nil {
    			t.Errorf("VerifyPKCS1v15: %v", err)
    		}
    		sig[1] ^= 0x80
    		err = VerifyPKCS1v15(&priv.PublicKey, crypto.SHA256, hash[:], sig)
    		if err == nil {
    			t.Errorf("VerifyPKCS1v15 success for tampered signature")
    		}
    		sig[1] ^= 0x80
    		hash[1] ^= 0x80
    		err = VerifyPKCS1v15(&priv.PublicKey, crypto.SHA256, hash[:], sig)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jan 12 00:55:41 UTC 2024
    - 30.9K bytes
    - Viewed (0)
  3. src/crypto/ecdsa/ecdsa.go

    func (priv *PrivateKey) Public() crypto.PublicKey {
    	return &priv.PublicKey
    }
    
    // Equal reports whether priv and x have the same value.
    //
    // See [PublicKey.Equal] for details on how Curve is compared.
    func (priv *PrivateKey) Equal(x crypto.PrivateKey) bool {
    	xx, ok := x.(*PrivateKey)
    	if !ok {
    		return false
    	}
    	return priv.PublicKey.Equal(&xx.PublicKey) && bigIntEqual(priv.D, xx.D)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:11:18 UTC 2024
    - 20.4K bytes
    - Viewed (0)
  4. platforms/software/security/src/main/java/org/gradle/security/internal/PublicKeyDownloadService.java

         */
        private void findMatchingKey(long id, PGPPublicKeyRing keyRing, PublicKeyResultBuilder builder) {
            for (PGPPublicKey publicKey : keyRing) {
                if (publicKey.getKeyID() == id) {
                    builder.publicKey(publicKey);
                    return;
                }
            }
        }
    
        /**
         * A response was sent from the server. This is a keyring, we need to find
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Apr 12 08:49:35 UTC 2024
    - 6.9K bytes
    - Viewed (0)
  5. src/crypto/x509/boring.go

    		return true
    	}
    
    	// The key must be RSA 2048, RSA 3072, RSA 4096,
    	// or ECDSA P-256, P-384, P-521.
    	switch k := c.PublicKey.(type) {
    	default:
    		return false
    	case *rsa.PublicKey:
    		if size := k.N.BitLen(); size != 2048 && size != 3072 && size != 4096 {
    			return false
    		}
    	case *ecdsa.PublicKey:
    		if k.Curve != elliptic.P256() && k.Curve != elliptic.P384() && k.Curve != elliptic.P521() {
    			return false
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jan 26 22:52:27 UTC 2024
    - 993 bytes
    - Viewed (0)
  6. platforms/software/security/src/main/java/org/gradle/security/internal/PublicKeyServiceChain.java

            public void keyRing(PGPPublicKeyRing keyring) {
                delegate.keyRing(keyring);
                hasResult = true;
            }
    
            @Override
            public void publicKey(PGPPublicKey publicKey) {
                delegate.publicKey(publicKey);
                hasResult = true;
            }
        }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed Oct 11 12:16:09 UTC 2023
    - 2.9K bytes
    - Viewed (0)
  7. src/crypto/rsa/rsa.go

    // PrivateKey, as the latter embeds the former and will expose its methods.
    
    // Size returns the modulus size in bytes. Raw signatures and ciphertexts
    // for or by this public key will have the same size.
    func (pub *PublicKey) Size() int {
    	return (pub.N.BitLen() + 7) / 8
    }
    
    // Equal reports whether pub and x have the same value.
    func (pub *PublicKey) Equal(x crypto.PublicKey) bool {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:11:18 UTC 2024
    - 23.4K bytes
    - Viewed (0)
  8. src/crypto/x509/x509.go

    // ParsePKIXPublicKey parses a public key in PKIX, ASN.1 DER form. The encoded
    // public key is a SubjectPublicKeyInfo structure (see RFC 5280, Section 4.1).
    //
    // It returns a *[rsa.PublicKey], *[dsa.PublicKey], *[ecdsa.PublicKey],
    // [ed25519.PublicKey] (not a pointer), or *[ecdh.PublicKey] (for X25519).
    // More types might be supported in the future.
    //
    // This kind of key is commonly encoded in PEM blocks of type "PUBLIC KEY".
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 09:20:15 UTC 2024
    - 82K bytes
    - Viewed (0)
  9. src/crypto/x509/pkcs1.go

    	if priv.N.Sign() <= 0 || priv.D.Sign() <= 0 || priv.P.Sign() <= 0 || priv.Q.Sign() <= 0 {
    		return nil, errors.New("x509: private key contains zero or negative value")
    	}
    
    	key := new(rsa.PrivateKey)
    	key.PublicKey = rsa.PublicKey{
    		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 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 13 17:09:47 UTC 2023
    - 4.7K bytes
    - Viewed (0)
  10. src/crypto/ecdsa/ecdsa_test.go

    	testAllCurves(t, testKeyGeneration)
    }
    
    func testKeyGeneration(t *testing.T, c elliptic.Curve) {
    	priv, err := GenerateKey(c, rand.Reader)
    	if err != nil {
    		t.Fatal(err)
    	}
    	if !c.IsOnCurve(priv.PublicKey.X, priv.PublicKey.Y) {
    		t.Errorf("public key invalid: %s", err)
    	}
    }
    
    func TestSignAndVerify(t *testing.T) {
    	testAllCurves(t, testSignAndVerify)
    }
    
    func testSignAndVerify(t *testing.T, c elliptic.Curve) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 21:33:58 UTC 2024
    - 13.5K bytes
    - Viewed (0)
Back to top