]> Cypherpunks.ru repositories - gogost.git/blobdiff - gost3410/utils.go
Remove excess gost3410.Mode
[gogost.git] / gost3410 / utils.go
index 2f22d3bcee751705edad8954c17c4315d2fcd7e7..b903915e674116fab459fa691060bd04c909b9f7 100644 (file)
@@ -32,3 +32,10 @@ func reverse(d []byte) {
 func pad(d []byte, size int) []byte {
        return append(make([]byte, size-len(d)), d...)
 }
+
+func PointSize(p *big.Int) int {
+       if p.BitLen() > 256 {
+               return 64
+       }
+       return 32
+}