Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 415 for publicKey (0.14 sec)

  1. 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)
  2. 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)
  3. src/crypto/ecdsa/equal_test.go

    	"testing"
    )
    
    func testEqual(t *testing.T, c elliptic.Curve) {
    	private, _ := ecdsa.GenerateKey(c, rand.Reader)
    	public := &private.PublicKey
    
    	if !public.Equal(public) {
    		t.Errorf("public key is not equal to itself: %v", public)
    	}
    	if !public.Equal(crypto.Signer(private).Public().(*ecdsa.PublicKey)) {
    		t.Errorf("private.Public() is not Equal to public: %q", public)
    	}
    	if !private.Equal(private) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 05 18:05:10 UTC 2020
    - 2.1K bytes
    - Viewed (0)
  4. pkg/controller/certificates/authority/authority.go

    		URIs:               cr.URIs,
    		PublicKeyAlgorithm: cr.PublicKeyAlgorithm,
    		PublicKey:          cr.PublicKey,
    		Extensions:         cr.Extensions,
    		ExtraExtensions:    cr.ExtraExtensions,
    	}
    	if err := policy.apply(tmpl, ca.Certificate.NotAfter); err != nil {
    		return nil, err
    	}
    
    	der, err := x509.CreateCertificate(rand.Reader, tmpl, ca.Certificate, cr.PublicKey, ca.PrivateKey)
    	if err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 23 19:36:11 UTC 2021
    - 2.5K bytes
    - Viewed (0)
  5. 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)
  6. platforms/software/security/src/main/java/org/gradle/security/internal/PublicKeyResultBuilder.java

    import org.bouncycastle.openpgp.PGPPublicKey;
    import org.bouncycastle.openpgp.PGPPublicKeyRing;
    
    public interface PublicKeyResultBuilder {
        void keyRing(PGPPublicKeyRing keyring);
        void publicKey(PGPPublicKey publicKey);
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed Oct 11 12:16:09 UTC 2023
    - 884 bytes
    - Viewed (0)
  7. src/crypto/x509/example_test.go

    		panic("failed to parse DER encoded public key: " + err.Error())
    	}
    
    	switch pub := pub.(type) {
    	case *rsa.PublicKey:
    		fmt.Println("pub is of type RSA:", pub)
    	case *dsa.PublicKey:
    		fmt.Println("pub is of type DSA:", pub)
    	case *ecdsa.PublicKey:
    		fmt.Println("pub is of type ECDSA:", pub)
    	case ed25519.PublicKey:
    		fmt.Println("pub is of type Ed25519:", pub)
    	default:
    		panic("unknown type of public key")
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jul 29 16:52:01 UTC 2019
    - 5.3K bytes
    - Viewed (0)
  8. 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)
  9. api/go1.15.txt

    pkg crypto/ecdsa, func VerifyASN1(*PublicKey, []uint8, []uint8) bool
    pkg crypto/ecdsa, method (*PrivateKey) Equal(crypto.PrivateKey) bool
    pkg crypto/ecdsa, method (*PublicKey) Equal(crypto.PublicKey) bool
    pkg crypto/ed25519, method (PrivateKey) Equal(crypto.PrivateKey) bool
    pkg crypto/ed25519, method (PublicKey) Equal(crypto.PublicKey) bool
    pkg crypto/elliptic, func MarshalCompressed(Curve, *big.Int, *big.Int) []uint8
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jul 17 02:15:01 UTC 2020
    - 7.6K bytes
    - Viewed (0)
  10. security/pkg/pki/util/generate_csr_test.go

    			}
    			if reflect.TypeOf(csr.PublicKey) != reflect.TypeOf(&ecdsa.PublicKey{}) {
    				t.Errorf("%s: decoded PKCS#8 returned unexpected key type: %T", id, csr.PublicKey)
    			}
    		} else if reflect.TypeOf(csr.PublicKey) != reflect.TypeOf(&rsa.PublicKey{}) {
    			t.Errorf("%s: decoded PKCS#8 returned unexpected key type: %T", id, csr.PublicKey)
    		}
    	}
    }
    
    func TestGenCSRPKCS8Key(t *testing.T) {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Feb 25 09:40:13 UTC 2022
    - 5.5K bytes
    - Viewed (0)
Back to top