Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 42 for Curve (0.04 sec)

  1. src/crypto/elliptic/elliptic_test.go

    		tests = tests[:1]
    	}
    	for _, test := range tests {
    		curve := test.curve
    		t.Run(test.name, func(t *testing.T) {
    			t.Parallel()
    			f(t, curve)
    		})
    	}
    }
    
    func TestOnCurve(t *testing.T) {
    	t.Parallel()
    	testAllCurves(t, func(t *testing.T, curve Curve) {
    		if !curve.IsOnCurve(curve.Params().Gx, curve.Params().Gy) {
    			t.Error("basepoint is not on the curve")
    		}
    	})
    }
    
    func TestOffCurve(t *testing.T) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 27 02:00:03 UTC 2023
    - 11.6K bytes
    - Viewed (0)
  2. src/crypto/ecdsa/ecdsa_test.go

    		if line[0] == '[' {
    			line = line[1 : len(line)-1]
    			curve, hash, _ := strings.Cut(line, ",")
    
    			switch curve {
    			case "P-224":
    				pub.Curve = elliptic.P224()
    			case "P-256":
    				pub.Curve = elliptic.P256()
    			case "P-384":
    				pub.Curve = elliptic.P384()
    			case "P-521":
    				pub.Curve = elliptic.P521()
    			default:
    				pub.Curve = nil
    			}
    
    			switch hash {
    			case "SHA-1":
    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. src/crypto/ecdsa/ecdsa.go

    	c := curveToECDH(k.Curve)
    	if c == nil {
    		return nil, errors.New("ecdsa: unsupported curve by crypto/ecdh")
    	}
    	if !k.Curve.IsOnCurve(k.X, k.Y) {
    		return nil, errors.New("ecdsa: invalid public key")
    	}
    	return c.NewPublicKey(elliptic.Marshal(k.Curve, k.X, k.Y))
    }
    
    // Equal reports whether pub and x have the same value.
    //
    // Two keys are only considered to have the same value if they have the same Curve value.
    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. src/crypto/ecdh/ecdh_test.go

    } = &ecdh.PrivateKey{}
    
    func TestECDH(t *testing.T) {
    	testAllCurves(t, func(t *testing.T, curve ecdh.Curve) {
    		aliceKey, err := curve.GenerateKey(rand.Reader)
    		if err != nil {
    			t.Fatal(err)
    		}
    		bobKey, err := curve.GenerateKey(rand.Reader)
    		if err != nil {
    			t.Fatal(err)
    		}
    
    		alicePubKey, err := curve.NewPublicKey(aliceKey.PublicKey().Bytes())
    		if err != nil {
    			t.Error(err)
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 27 18:23:49 UTC 2024
    - 18K bytes
    - Viewed (0)
  5. src/crypto/tls/auth.go

    			cert.PrivateKey)
    	}
    
    	switch pub := signer.Public().(type) {
    	case *ecdsa.PublicKey:
    		switch pub.Curve {
    		case elliptic.P256():
    		case elliptic.P384():
    		case elliptic.P521():
    		default:
    			return fmt.Errorf("tls: unsupported certificate curve (%s)", pub.Curve.Params().Name)
    		}
    	case *rsa.PublicKey:
    		return fmt.Errorf("tls: certificate RSA key size too small for supported signature algorithms")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 21:45:37 UTC 2024
    - 10K bytes
    - Viewed (0)
  6. src/internal/trace/traceviewer/mmu.go

                data.addColumn('number', niceQuantile(1 - plotData.quantiles[i]) + ' MU');
              }
            }
            data.addRows(curve);
            for (var i = 0; i < curve.length; i++) {
              data.setFormattedValue(i, 0, niceDuration(curve[i][0]));
            }
    
            var options = {
              chart: {
                title: 'Minimum mutator utilization',
              },
              hAxis: {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 21 21:29:53 UTC 2023
    - 13K bytes
    - Viewed (0)
  7. src/crypto/tls/key_agreement.go

    		return nil, errors.New("tls: CurvePreferences includes unsupported curve")
    	}
    
    	key, err := generateECDHEKey(config.rand(), curveID)
    	if err != nil {
    		return nil, err
    	}
    	ka.key = key
    
    	// See RFC 4492, Section 5.4.
    	ecdhePublic := key.PublicKey().Bytes()
    	serverECDHEParams := make([]byte, 1+2+1+len(ecdhePublic))
    	serverECDHEParams[0] = 3 // named curve
    	serverECDHEParams[1] = byte(curveID >> 8)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 14:56:25 UTC 2024
    - 11.8K bytes
    - Viewed (0)
  8. security/pkg/pki/util/generate_cert.go

    		var ecPriv *ecdsa.PrivateKey
    
    		switch options.ECSigAlg {
    		case EcdsaSigAlg:
    			var curve elliptic.Curve
    			switch options.ECCCurve {
    			case P384Curve:
    				curve = elliptic.P384()
    			default:
    				curve = elliptic.P256()
    			}
    
    			ecPriv, err = ecdsa.GenerateKey(curve, rand.Reader)
    			if err != nil {
    				return nil, nil, fmt.Errorf("cert generation fails at EC key generation (%v)", err)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Aug 02 14:34:38 UTC 2023
    - 14.2K bytes
    - Viewed (0)
  9. src/crypto/tls/boring_test.go

    	k, err := rsa.GenerateKey(rand.Reader, size)
    	if err != nil {
    		t.Fatal(err)
    	}
    	return k
    }
    
    func boringECDSAKey(t *testing.T, curve elliptic.Curve) *ecdsa.PrivateKey {
    	k, err := ecdsa.GenerateKey(curve, rand.Reader)
    	if err != nil {
    		t.Fatal(err)
    	}
    	return k
    }
    
    type boringCertificate struct {
    	name      string
    	org       string
    	parentOrg string
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 21:45:37 UTC 2024
    - 19.4K bytes
    - Viewed (0)
  10. security/pkg/pki/util/crypto_test.go

    			key:           ed25519PrivKey,
    			isErr:         true,
    			expectedCurve: nil,
    		},
    	}
    
    	for id, tc := range cases {
    		curve, err := GetEllipticCurve(&tc.key)
    		if tc.expectedCurve != curve {
    			t.Errorf("expected (%v) but received (%v)", tc.expectedCurve, curve)
    		}
    		if err != nil {
    			if !tc.isErr {
    				t.Errorf("%s: should be supported, but is failing", id)
    			}
    		}
    	}
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Jun 04 13:00:07 UTC 2024
    - 14.6K bytes
    - Viewed (0)
Back to top