summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--go/diffie-hellman/diffie_hellman.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/go/diffie-hellman/diffie_hellman.go b/go/diffie-hellman/diffie_hellman.go
index 715e200..78c8e56 100644
--- a/go/diffie-hellman/diffie_hellman.go
+++ b/go/diffie-hellman/diffie_hellman.go
@@ -5,6 +5,7 @@ import (
"math/big"
)
+// PrivateKey greater then 1 and less then p
func PrivateKey(p *big.Int) *big.Int {
two := big.NewInt(2)
priv, _ := rand.Int(rand.Reader, new(big.Int).Sub(p, two))