Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for IsOnCurve (0.12 sec)

  1. src/crypto/elliptic/elliptic_test.go

    // IsOnCurve, all other behavior is undefined.
    func TestInvalidCoordinates(t *testing.T) {
    	t.Parallel()
    	testAllCurves(t, testInvalidCoordinates)
    }
    
    func testInvalidCoordinates(t *testing.T, curve Curve) {
    	checkIsOnCurveFalse := func(name string, x, y *big.Int) {
    		if curve.IsOnCurve(x, y) {
    			t.Errorf("IsOnCurve(%s) unexpectedly returned true", name)
    		}
    	}
    
    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/elliptic/p224_test.go

    	p224 := P224()
    	pointData, _ := hex.DecodeString("049B535B45FB0A2072398A6831834624C7E32CCFD5A4B933BCEAF77F1DD945E08BBE5178F5EDF5E733388F196D2A631D2E075BB16CBFEEA15B")
    	x, y := Unmarshal(p224, pointData)
    	if !p224.IsOnCurve(x, y) {
    		t.Error("P224 failed to validate a correct point")
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 05 19:01:13 UTC 2021
    - 10.7K bytes
    - Viewed (0)
  3. api/go1.21.txt

    pkg crypto/elliptic, method (*CurveParams) IsOnCurve //deprecated #34648
    pkg crypto/elliptic, method (*CurveParams) ScalarBaseMult //deprecated #34648
    pkg crypto/elliptic, method (*CurveParams) ScalarMult //deprecated #34648
    pkg crypto/elliptic, type Curve interface, Add //deprecated #52221
    pkg crypto/elliptic, type Curve interface, Double //deprecated #52221
    pkg crypto/elliptic, type Curve interface, IsOnCurve //deprecated #52221
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Aug 07 09:39:17 UTC 2023
    - 25.6K bytes
    - Viewed (0)
  4. 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)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 21:33:58 UTC 2024
    - 13.5K bytes
    - Viewed (0)
  5. src/crypto/ecdsa/ecdsa.go

    // Curve is not supported by crypto/ecdh.
    func (k *PublicKey) ECDH() (*ecdh.PublicKey, error) {
    	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.
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:11:18 UTC 2024
    - 20.4K bytes
    - Viewed (0)
Back to top