]> Cypherpunks.ru repositories - gogost.git/blobdiff - src/cypherpunks.ru/gogost/gost3410/curve.go
Use numbers instead of encoded binaries in gost3410.NewCurve
[gogost.git] / src / cypherpunks.ru / gogost / gost3410 / curve.go
index 0ad10c9ff747dcc4d3b3b5087f735d4bf2ee98a8..b25131636f3605fdea75c2adeef6dfc3a88219ea 100644 (file)
@@ -46,14 +46,14 @@ type Curve struct {
        ty *big.Int
 }
 
-func NewCurve(p, q, a, b, bx, by []byte) (*Curve, error) {
+func NewCurve(p, q, a, b, x, y *big.Int) (*Curve, error) {
        c := Curve{
-               P:  bytes2big(p[:]),
-               Q:  bytes2big(q[:]),
-               A:  bytes2big(a[:]),
-               B:  bytes2big(b[:]),
-               Bx: bytes2big(bx[:]),
-               By: bytes2big(by[:]),
+               P:  p,
+               Q:  q,
+               A:  a,
+               B:  b,
+               X:  x,
+               Y:  y,
                t:  big.NewInt(0),
                tx: big.NewInt(0),
                ty: big.NewInt(0),