crypto/dsa: don't allow signing with degenerate private keys to loop forever.
Previously it was possible to craft a DSA private key that would cause Sign() to loop forever because no signature could be valid. This change does some basic sanity checks and ensures that Sign will always terminate. Thanks to Yolan Romailler for highing this. Be aware, however, that it's still possible for an attacker to simply craft a private key with enormous values and thus cause Sign to take an arbitrary amount of time. Change-Id: Icd53939e511eef513a4977305dd9015d9436d0ce Reviewed-on: https://go-review.googlesource.com/33725Reviewed-by: Yolan Romailler <y@romailler.ch> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Showing
Please register or sign in to comment