Home | History | Annotate | Download | only in tls

Lines Matching full:curve

167 func curveForCurveID(id CurveID) (elliptic.Curve, bool) {
228 curve, ok := curveForCurveID(ka.curveid)
230 return nil, errors.New("tls: preferredCurves includes unsupported curve")
235 ka.privateKey, x, y, err = elliptic.GenerateKey(curve, config.rand())
239 ecdhePublic = elliptic.Marshal(curve, x, y)
244 serverECDHParams[0] = 3 // named curve
326 curve, ok := curveForCurveID(ka.curveid)
330 x, y := elliptic.Unmarshal(curve, ckx.ciphertext[1:]) // Unmarshal also checks whether the given point is on the curve
334 x, _ = curve.ScalarMult(x, y, ka.privateKey)
335 preMasterSecret := make([]byte, (curve.Params().BitSize+7)>>3)
346 if skx.key[0] != 3 { // named curve
347 return errors.New("tls: server selected unsupported curve")
369 curve, ok := curveForCurveID(ka.curveid)
371 return errors.New("tls: server selected unsupported curve")
373 ka.x, ka.y = elliptic.Unmarshal(curve, publicKey) // Unmarshal also checks whether the given point is on the curve
452 curve, ok := curveForCurveID(ka.curveid)
456 priv, mx, my, err := elliptic.GenerateKey(curve, config.rand())
460 x, _ := curve.ScalarMult(ka.x, ka.y, priv)
461 preMasterSecret = make([]byte, (curve.Params().BitSize+7)>>3)
465 serialized = elliptic.Marshal(curve, mx, my)