Removed deprecated GenerateSafePrimes function

The new function should be now called directly.
This commit is contained in:
Piotr Dyraga committed 2018-07-27 17:42:05 +02:00
1 parent 78ea6668f8
commit ca756b481b
5 files changed
+7 -56

No files matched your search

-10
View File
@@ -4,7 +4,6 @@ import (
"crypto/rand"
"io"
"math/big"
"time"
)
var ZERO = big.NewInt(0)
@@ -21,15 +20,6 @@ func Factorial(n int) *big.Int {
return ret
}
// Returns 2 primes such that p = 2 * q + 1 and that the length of
// p is nbits. `p` is called a safe prime
//
// Deprecated: This function has been left here just for backward compatibility.
// Please use `GenerateSafePrime` from the `safe_prime_generator.go` directly.
func GenerateSafePrimes(nbits int, random io.Reader) (p, q *big.Int, err error) {
return GenerateSafePrime(nbits, 4, 120*time.Second)
}
// Generate a random element in the group of all the elements in Z/nZ that
// has a multiplicative inverse.
func GetRandomNumberInMultiplicativeGroup(n *big.Int, random io.Reader) (*big.Int, error) {