package curve import ( "context" "math/big" "git.ali33.ru/fcg-xvii/curve/v2/tools" ) func NewCurve(a, b, p *big.Int, ctx context.Context) (curve *tools.Curve, err error) { if curve, err = tools.NewCurve(a, b); err != nil { return } p = tools.SearchPrime(p) curve.SetP(p) err = curve.SetGRandom(ctx) return }