summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2017-11-12 13:33:54 +0100
committerDimitri Sokolyuk <demon@dim13.org>2017-11-12 13:33:54 +0100
commitfe383e3ee08b10dbb31025eb15d6d2d82cf15aef (patch)
tree4964efa368c26fd3a2a88fb9420b8b7353bf041f
parentc6a5a0fa9edbe26c7305a7e0f3a45814f77da53a (diff)
Add comment
-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))