Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 202 for publicKey (0.2 sec)

  1. 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)
  2. 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)
  3. 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)
  4. internal/config/identity/openid/jwks.go

    		x.SetBytes(xbuf)
    		y.SetBytes(ybuf)
    
    		return &ecdsa.PublicKey{
    			Curve: curve,
    			X:     &x,
    			Y:     &y,
    		}, nil
    	default:
    		if key.Alg == "EdDSA" && key.Crv == "Ed25519" && key.X != "" {
    			pb, err := base64.RawURLEncoding.DecodeString(key.X)
    			if err != nil {
    				return nil, errMalformedJWKECKey
    			}
    			return ed25519.PublicKey(pb), nil
    		}
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Tue Apr 02 23:02:35 UTC 2024
    - 3.1K bytes
    - Viewed (0)
  5. src/crypto/tls/key_agreement.go

    	}
    	curveID := CurveID(skx.key[1])<<8 | CurveID(skx.key[2])
    
    	publicLen := int(skx.key[3])
    	if publicLen+4 > len(skx.key) {
    		return errServerKeyExchange
    	}
    	serverECDHEParams := skx.key[:4+publicLen]
    	publicKey := serverECDHEParams[4:]
    
    	sig := skx.key[4+publicLen:]
    	if len(sig) < 2 {
    		return errServerKeyExchange
    	}
    
    	if _, ok := curveForCurveID(curveID); !ok {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 14:56:25 UTC 2024
    - 11.8K bytes
    - Viewed (0)
  6. security/pkg/pki/util/verify_cert.go

    		}
    
    		privRSAKey, privRSAOk := priv.(*rsa.PrivateKey)
    		pubRSAKey, pubRSAOk := cert.PublicKey.(*rsa.PublicKey)
    
    		privECKey, privECOk := priv.(*ecdsa.PrivateKey)
    		pubECKey, pubECOk := cert.PublicKey.(*ecdsa.PublicKey)
    
    		rsaMatch := privRSAOk && pubRSAOk
    		ecMatch := privECOk && pubECOk
    
    		if rsaMatch {
    			if !reflect.DeepEqual(privRSAKey.PublicKey, *pubRSAKey) {
    				return fmt.Errorf("the generated private RSA key and cert doesn't match")
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Sep 05 10:37:29 UTC 2022
    - 5.9K bytes
    - Viewed (0)
  7. src/crypto/crypto.go

    	}
    	hashes[h] = f
    }
    
    // PublicKey represents a public key using an unspecified algorithm.
    //
    // Although this type is an empty interface for backwards compatibility reasons,
    // all public key types in the standard library implement the following interface
    //
    //	interface{
    //	    Equal(x crypto.PublicKey) bool
    //	}
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 13 17:09:47 UTC 2023
    - 6.8K bytes
    - Viewed (0)
  8. src/crypto/rsa/pkcs1v15_test.go

    	}
    	if err := VerifyPKCS1v15(&rsaPrivateKey.PublicKey, crypto.Hash(0), msg, sig); err != nil {
    		t.Fatalf("signature failed to verify: %s", err)
    	}
    }
    
    func TestShortSessionKey(t *testing.T) {
    	// This tests that attempting to decrypt a session key where the
    	// ciphertext is too small doesn't run outside the array bounds.
    	ciphertext, err := EncryptPKCS1v15(rand.Reader, &rsaPrivateKey.PublicKey, []byte{1})
    	if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 15 00:16:30 UTC 2022
    - 8.6K bytes
    - Viewed (0)
  9. src/crypto/rsa/boring_test.go

    	k, err := GenerateKey(rand.Reader, 128)
    	if err != nil {
    		t.Fatal(err)
    	}
    	_, err = asn1.Marshal(k.PublicKey)
    	if err != nil {
    		t.Fatal(err)
    	}
    }
    
    func TestBoringVerify(t *testing.T) {
    	// Check that signatures that lack leading zeroes don't verify.
    	key := &PublicKey{
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 15 00:16:30 UTC 2022
    - 4.5K bytes
    - Viewed (0)
  10. src/crypto/ecdsa/ecdsa_legacy.go

    func generateLegacy(c elliptic.Curve, rand io.Reader) (*PrivateKey, error) {
    	k, err := randFieldElement(c, rand)
    	if err != nil {
    		return nil, err
    	}
    
    	priv := new(PrivateKey)
    	priv.PublicKey.Curve = c
    	priv.D = k
    	priv.PublicKey.X, priv.PublicKey.Y = c.ScalarBaseMult(k.Bytes())
    	return priv, nil
    }
    
    // hashToInt converts a hash value to an integer. Per FIPS 186-4, Section 6.4,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:11:18 UTC 2024
    - 4.8K bytes
    - Viewed (0)
Back to top