simon-git: putty (master): Simon Tatham

Commits to Tartarus hosted VCS tartarus-commits at lists.tartarus.org
Sat Feb 29 14:22:48 GMT 2020


TL;DR:
  63b8f537 New API for primegen(), using PrimeCandidateSource.
  a7bdefb3 New vtable API for keygen progress reporting.

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-02-29 14:22:48

commit 63b8f537f27faefb7295efaaae1e94ce848f4df4
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=63b8f537f27faefb7295efaaae1e94ce848f4df4;hp=809a4eb2493a9757eaab3e1e4d47ebe26457754a
Author: Simon Tatham <anakin at pobox.com>
Date:   Mon Feb 24 19:09:08 2020 +0000

    New API for primegen(), using PrimeCandidateSource.
    
    The more features and options I add to PrimeCandidateSource, the more
    cumbersome it will be to replicate each one in a command-line option
    to the ultimate primegen() function. So I'm moving to an API in which
    the client of primegen() constructs a PrimeCandidateSource themself,
    and passes it in to primegen().
    
    Also, changed the API for pcs_new() so that you don't have to pass
    'firstbits' unless you really want to. The net effect is that even
    though we've added flexibility, we've also simplified the call sites
    of primegen() in the simple case: if you want a 1234-bit prime, you
    just need to pass pcs_new(1234) as the argument to primegen, and
    you're done.
    
    The new declaration of primegen() lives in ssh_keygen.h, along with
    all the types it depends on. So I've had to #include that header in a
    few new files.

 primecandidate.c   | 13 ++++++++++++-
 ssh.h              |  3 ---
 ssh1login-server.c |  1 +
 ssh2kex-server.c   |  3 ++-
 sshdssg.c          | 11 +++++++++--
 sshkeygen.h        | 21 +++++++++++++++++----
 sshprime.c         | 39 ++++-----------------------------------
 sshrsag.c          | 16 ++++++++++++----
 test/cryptsuite.py |  4 ++--
 testcrypt.c        |  6 ++----
 testcrypt.h        |  5 +++--
 11 files changed, 64 insertions(+), 58 deletions(-)

commit a7bdefb3942fec5fca41bfa46d77d70b1d6e4fd2
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=a7bdefb3942fec5fca41bfa46d77d70b1d6e4fd2;hp=63b8f537f27faefb7295efaaae1e94ce848f4df4
Author: Simon Tatham <anakin at pobox.com>
Date:   Sun Feb 23 15:29:40 2020 +0000

    New vtable API for keygen progress reporting.
    
    The old API was one of those horrible things I used to do when I was
    young and foolish, in which you have just one function, and indicate
    which of lots of things it's doing by passing in flags. It was crying
    out to be replaced with a vtable.
    
    While I'm at it, I've reworked the code on the Windows side that
    decides what to do with the progress bar, so that it's based on
    actually justifiable estimates of probability rather than magic
    integer constants.
    
    Since computers are generally faster now than they were at the start
    of this project, I've also decided there's no longer any point in
    making the fixed final part of RSA key generation bother to report
    progress at all. So the progress bars are now only for the variable
    part, i.e. the actual prime generations.

 Recipe             |   2 +-
 cmdgen.c           |  62 +++++++-------
 millerrabin.c      | 214 ++++++++++++++++++++++++++++++++++++++++++++++++
 ssh.h              |  20 -----
 ssh1login-server.c |   6 +-
 ssh2kex-server.c   |  12 +--
 sshdssg.c          |  74 +++++++----------
 sshecdsag.c        |   7 +-
 sshkeygen.h        |  93 ++++++++++++++++++++-
 sshprime.c         | 233 +++++++++++++++++------------------------------------
 sshrsag.c          |  56 +++----------
 testcrypt.c        |  12 +--
 windows/winpgen.c  | 162 ++++++++++++++++++++++---------------
 13 files changed, 561 insertions(+), 392 deletions(-)



More information about the tartarus-commits mailing list