paillier encrypt & decrypt, homomorphic addition

This commit is contained in:
arnaucode
2018-07-22 13:33:11 +02:00
parent 5996bcbe25
commit 6ce09111f9
6 changed files with 200 additions and 25 deletions

View File

@@ -2,6 +2,11 @@ package prime
import "math/rand"
const (
MaxPrime = 2000
MinPrime = 500
)
func RandInt(min int, max int) int {
r := rand.Intn(max-min) + min
return r