- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 34 for Curve (0.04 sec)
-
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) -
src/crypto/elliptic/params.go
// use that instead of the generic one. if specific, ok := matchesSpecificCurve(curve); ok { return specific.Add(x1, y1, x2, y2) } panicIfNotOnCurve(curve, x1, y1) panicIfNotOnCurve(curve, x2, y2) z1 := zForAffine(x1, y1) z2 := zForAffine(x2, y2) return curve.affineFromJacobian(curve.addJacobian(x1, y1, z1, x2, y2, z2)) }
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/ecdh/nist.go
if err != nil { return nil, err } return newBoringPrivateKey(c, bk, key) } k := &PrivateKey{ curve: c, privateKey: append([]byte{}, key...), } return k, nil } func newBoringPrivateKey(c Curve, bk *boring.PrivateKeyECDH, privateKey []byte) (*PrivateKey, error) { k := &PrivateKey{ curve: c, boring: bk, privateKey: append([]byte(nil), privateKey...), } return k, nil }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 13 18:57:38 UTC 2024 - 8.1K bytes - Viewed (0) -
src/crypto/ecdsa/ecdsa_legacy.go
// This file contains a math/big implementation of ECDSA that is only used for // deprecated custom curves. 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 }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 00:11:18 UTC 2024 - 4.8K bytes - Viewed (0) -
src/crypto/tls/key_schedule.go
func generateECDHEKey(rand io.Reader, curveID CurveID) (*ecdh.PrivateKey, error) { curve, ok := curveForCurveID(curveID) if !ok { return nil, errors.New("tls: internal error: unsupported curve") } return curve.GenerateKey(rand) } func curveForCurveID(id CurveID) (ecdh.Curve, bool) { switch id { case X25519: return ecdh.X25519(), true case CurveP256:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 14:56:25 UTC 2024 - 6.5K bytes - Viewed (0) -
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) -
src/crypto/internal/hpke/hpke.go
} return out } // dhKEM implements the KEM specified in RFC 9180, Section 4.1. type dhKEM struct { dh ecdh.Curve kdf hkdfKDF suiteID []byte nSecret uint16 } var SupportedKEMs = map[uint16]struct { curve ecdh.Curve hash crypto.Hash nSecret uint16 }{ // RFC 9180 Section 7.1 0x0020: {ecdh.X25519(), crypto.SHA256, 32}, }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 22:33:33 UTC 2024 - 7K bytes - Viewed (0) -
security/pkg/pki/util/crypto.go
pkey := privKey.(*rsa.PrivateKey) return pkey.N.BitLen(), nil } // GetEllipticCurve returns the type of curve associated with the private key; // if ECDSA is used, then only 384 and 256 (default) are returned; if non-ECDSA // is used then an error is returned func GetEllipticCurve(privKey *crypto.PrivateKey) (elliptic.Curve, error) { switch key := (*privKey).(type) { // this should agree with var SupportedECSignatureAlgorithms
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue Jun 04 13:00:07 UTC 2024 - 5.3K bytes - Viewed (0) -
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) -
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) publicKeyAlgorithm.Algorithm = oidPublicKeyECDSA
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 09:20:15 UTC 2024 - 82K bytes - Viewed (0)