Skip to content

Commit

Permalink
Fix typo in retval; return the safe prime!
Browse files Browse the repository at this point in the history
  • Loading branch information
opencoff authored Jun 2, 2019
1 parent d7f6334 commit 0e15883
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion prime.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func safePrime(bits int) (*big.Int, error) {
a = a.Lsh(p, 1)
a = a.Add(a, one)
if a.ProbablyPrime(20) {
return p, nil
return a, nil
}
}

Expand Down

0 comments on commit 0e15883

Please sign in to comment.