- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 12 for IsOnCurve (0.26 sec)
-
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) -
src/crypto/elliptic/elliptic.go
y.Neg(y).Mod(y, p) } if !curve.IsOnCurve(x, y) { return nil, nil } return } func panicIfNotOnCurve(curve Curve, x, y *big.Int) { // (0, 0) is the point at infinity by convention. It's ok to operate on it, // although IsOnCurve is documented to return false for it. See Issue 37294. if x.Sign() == 0 && y.Sign() == 0 { return } if !curve.IsOnCurve(x, y) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Oct 13 17:09:47 UTC 2023 - 9K bytes - Viewed (0) -
src/crypto/elliptic/params.go
return x3 } // IsOnCurve implements [Curve.IsOnCurve]. // // Deprecated: the [CurveParams] methods are deprecated and are not guaranteed to // provide any security property. For ECDH, use the [crypto/ecdh] package. // For ECDSA, use the [crypto/ecdsa] package with a [Curve] value returned directly // from [P224], [P256], [P384], or [P521]. func (curve *CurveParams) IsOnCurve(x, y *big.Int) bool {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 16 17:46:09 UTC 2024 - 9.6K bytes - Viewed (0) -
src/crypto/elliptic/nistec.go
ScalarMult(T, []byte) (T, error) ScalarBaseMult([]byte) (T, error) } func (curve *nistCurve[Point]) Params() *CurveParams { return curve.params } func (curve *nistCurve[Point]) IsOnCurve(x, y *big.Int) bool { // IsOnCurve is documented to reject (0, 0), the conventional point at // infinity, which however is accepted by pointFromAffine. if x.Sign() == 0 && y.Sign() == 0 { return false }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Nov 21 16:19:34 UTC 2022 - 9.6K bytes - Viewed (0) -
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) -
src/crypto/x509/sec1.go
// sets the curve ID to the given OID, or omits it if OID is nil. func marshalECPrivateKeyWithOID(key *ecdsa.PrivateKey, oid asn1.ObjectIdentifier) ([]byte, error) { if !key.Curve.IsOnCurve(key.X, key.Y) { return nil, errors.New("invalid elliptic key public key") } privateKey := make([]byte, (key.Curve.Params().N.BitLen()+7)/8) return asn1.Marshal(ecPrivateKey{ Version: 1,
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Oct 13 17:09:47 UTC 2023 - 4.6K bytes - Viewed (0) -
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) -
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) -
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) -
src/crypto/x509/x509.go
case *ecdsa.PublicKey: oid, ok := oidFromNamedCurve(pub.Curve) if !ok { return nil, pkix.AlgorithmIdentifier{}, errors.New("x509: unsupported elliptic curve") } if !pub.Curve.IsOnCurve(pub.X, pub.Y) { return nil, pkix.AlgorithmIdentifier{}, errors.New("x509: invalid elliptic curve public key") } publicKeyBytes = elliptic.Marshal(pub.Curve, pub.X, pub.Y)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 09:20:15 UTC 2024 - 82K bytes - Viewed (0)