]> granicus.if.org Git - openssl/commit
DSA mod inverse fix
authorPauli <paul.dale@oracle.com>
Sun, 28 Oct 2018 20:50:51 +0000 (06:50 +1000)
committerPauli <paul.dale@oracle.com>
Sun, 28 Oct 2018 20:52:43 +0000 (06:52 +1000)
commit84862c0979737b591acb689aef41ae2644176f32
tree1be5e43abf8b665b9e027dcf8bb81f9c6d5d85db
parentbd04577743ec3b1e605039ee31e10616fee5f05f
DSA mod inverse fix

There is a side channel attack against the division used to calculate one of
the modulo inverses in the DSA algorithm.  This change takes advantage of the
primality of the modulo and Fermat's little theorem to calculate the inverse
without leaking information.

Thanks to Samuel Weiser for finding and reporting this.

Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/7487)

(cherry picked from commit 415c33563528667868c3c653a612e6fc8736fd79)
crypto/dsa/dsa_ossl.c