gogost.go | 2 +- gost3410/private.go | 2 +- news.texi | 5 +++++ diff --git a/gogost.go b/gogost.go index 4a87144b0cfc78e480201f1f6e14405e0b212ab5d776a7714aebb56517c8c90f..569f366cc598cda902a0e421bf6a624d97d4eb8085940fccc1e3028544254903 100644 --- a/gogost.go +++ b/gogost.go @@ -1,4 +1,4 @@ // Pure Go GOST cryptographic functions library. package gogost -const Version = "5.4.0" +const Version = "5.5.0" diff --git a/gost3410/private.go b/gost3410/private.go index d34deeb4c11194d8c694c3f097c336aa1ca82b6a177e0ab5b966e25fe69f7d71..92088a742ccf47c74078ea39bbb8c5e7e299984df8f00afbb74c5f698948b2db 100644 --- a/gost3410/private.go +++ b/gost3410/private.go @@ -41,7 +41,7 @@ k := bytes2big(key) if k.Cmp(zero) == 0 { return nil, errors.New("gogost/gost3410: zero private key") } - return &PrivateKey{curve, k}, nil + return &PrivateKey{curve, k.Mod(k, curve.Q)}, nil } func GenPrivateKey(curve *Curve, rand io.Reader) (*PrivateKey, error) { diff --git a/news.texi b/news.texi index 64e191ecf95b0f0bcac89940cc9c3f79f80c3e8cd1d753ff4ea86dbfdd0465f2..bb63cfe47c3e7f64c2573f21169119d58561c09ecdb5f57621a8c51dea5fce8b 100644 --- a/news.texi +++ b/news.texi @@ -3,6 +3,11 @@ @unnumbered News @table @strong +@anchor{Release 5.5.0} +@item 5.5.0 + @code{gost3410.PrivateKey} is in @code{gost3410.Curve.Q} now. That + makes them more friendly with some implementations. + @anchor{Release 5.4.0} @item 5.4.0 Even slightly less allocations in Streebog.