]> Cypherpunks.ru repositories - gogost.git/blobdiff - gost3410/utils.go
Raise copyright years
[gogost.git] / gost3410 / utils.go
index 2f22d3bcee751705edad8954c17c4315d2fcd7e7..c85dfa9d450559a7f4866ca39e5599ba3f54f584 100644 (file)
@@ -1,5 +1,5 @@
 // GoGOST -- Pure Go GOST cryptographic functions library
-// Copyright (C) 2015-2020 Sergey Matveev <stargrave@stargrave.org>
+// Copyright (C) 2015-2021 Sergey Matveev <stargrave@stargrave.org>
 //
 // This program is free software: you can redistribute it and/or modify
 // it under the terms of the GNU General Public License as published by
@@ -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
+}