simon-git: putty (master): Simon Tatham

Commits to Tartarus hosted VCS tartarus-commits at lists.tartarus.org
Fri Mar 13 08:51:57 GMT 2020


TL;DR:
  1335e56d Fix false negative in Pockle discriminant check.

Repository:     https://git.tartarus.org/simon/putty.git
On the web:     https://git.tartarus.org/?p=simon/putty.git
Branch updated: master
Committer:      Simon Tatham <anakin at pobox.com>
Date:           2020-03-13 08:51:57

commit 1335e56d40e4b016bb9e887f334b6359dea2dd37
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=1335e56d40e4b016bb9e887f334b6359dea2dd37;hp=18d273fcf1eca232fb1ace58b31b21e6da79d4bf
Author: Simon Tatham <anakin at pobox.com>
Date:   Wed Mar 11 21:39:26 2020 +0000

    Fix false negative in Pockle discriminant check.
    
    I just happened to notice in a re-read of the code that we were
    computing b^2-4a and feeding it to mp_sqrt to check if it was a
    perfect square, without having first checked that the subtraction
    didn't overflow and deliver some arbitrary large positive number when
    the true mathematical value was negative.
    
    Fortunately, if this came up at all, it would have been as a false
    _negative_ in Pockle's primality verification: it might have managed
    to reject a genuine prime with a valid certificate on rare occasions.
    So that's not too serious. But even so, now I've spotted it, fix it.

 pockle.c | 23 ++++++++++++++---------
 1 file changed, 14 insertions(+), 9 deletions(-)



More information about the tartarus-commits mailing list