X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcypherpunks.ru%2Fgogost%2Fgost3410%2Fcurve.go;h=76a2c658028774f5faefdc1515703fa029aad908;hb=a205d42eff797b294ecc0355b9f2fcc89048bd6e;hp=6b371a2bdc21fc28db22481fa3978cab9eb97d21;hpb=4c6ef47b160219dafbddd213694188574a432d9f;p=gogost.git diff --git a/src/cypherpunks.ru/gogost/gost3410/curve.go b/src/cypherpunks.ru/gogost/gost3410/curve.go index 6b371a2..76a2c65 100644 --- a/src/cypherpunks.ru/gogost/gost3410/curve.go +++ b/src/cypherpunks.ru/gogost/gost3410/curve.go @@ -29,6 +29,8 @@ var ( ) type Curve struct { + Name string // Just simple identifier + P *big.Int // Characteristic of the underlying prime field Q *big.Int // Elliptic curve subgroup order @@ -54,17 +56,18 @@ type Curve struct { edT *big.Int } -func NewCurve(p, q, a, b, x, y, e, d *big.Int) (*Curve, error) { +func NewCurve(name string, p, q, a, b, x, y, e, d *big.Int) (*Curve, error) { c := Curve{ - P: p, - Q: q, - A: a, - B: b, - X: x, - Y: y, - t: big.NewInt(0), - tx: big.NewInt(0), - ty: big.NewInt(0), + Name: name, + P: p, + Q: q, + A: a, + B: b, + X: x, + Y: y, + t: big.NewInt(0), + tx: big.NewInt(0), + ty: big.NewInt(0), } r1 := big.NewInt(0) r2 := big.NewInt(0)