]> Cypherpunks.ru repositories - gogost.git/blobdiff - src/cypherpunks.ru/gogost/gost3410/curve.go
Add name to 34.10 curves for convenience
[gogost.git] / src / cypherpunks.ru / gogost / gost3410 / curve.go
index 6b371a2bdc21fc28db22481fa3978cab9eb97d21..76a2c658028774f5faefdc1515703fa029aad908 100644 (file)
@@ -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)