simon-git: putty (master): Simon Tatham

Commits to Tartarus hosted VCS tartarus-commits at lists.tartarus.org
Sun Jan 20 17:13:40 GMT 2019


TL;DR:
  0d2d20aa Access all hashes and MACs through the standard API.
  836a75ba ssh1login: fix memory management when using the agent.
  1df39eb0 Turn ssh2_mac's text_name field into a method.
  d73f692e Add an 'extra' pointer field to ssh2_macalg.
  baff23cd Centralised HMAC implementation.

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:           2019-01-20 17:13:40

commit 0d2d20aad0df3a48cba74abf63edf6c7d2aff16f
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=0d2d20aad0df3a48cba74abf63edf6c7d2aff16f;hp=acdcf2bfaa2946f607749343c42090caf6515655
Author: Simon Tatham <anakin at pobox.com>
Date:   Sun Jan 20 16:15:14 2019 +0000

    Access all hashes and MACs through the standard API.
    
    All the hash-specific state structures, and the functions that
    directly accessed them, are now local to the source files implementing
    the hashes themselves. Everywhere we previously used those types or
    functions, we're now using the standard ssh_hash or ssh2_mac API.
    
    The 'simple' functions (hmacmd5_simple, SHA_Simple etc) are now a pair
    of wrappers in sshauxcrypt.c, each of which takes an algorithm
    structure and can do the same conceptual thing regardless of what it
    is.

 cproxy.c           |  23 ++++------
 import.c           | 129 +++++++++++++++++++++++------------------------------
 pageant.c          |  13 +++---
 ssh.h              |  75 ++++---------------------------
 ssh1login-server.c |  11 ++---
 ssh1login.c        |   9 ++--
 sshauxcrypt.c      |  30 ++++++++++---
 sshbcrypt.c        |  12 +++--
 sshcommon.c        |  11 +++--
 sshdss.c           |  34 +++++++-------
 sshecc.c           |   2 +-
 sshmd5.c           |  12 +++++
 sshpubk.c          |  92 +++++++++++++++++---------------------
 sshrsa.c           |   9 ++--
 sshsh256.c         |  11 ++++-
 sshsh512.c         |   8 ++++
 sshsha.c           |   9 ++++
 unix/uxshare.c     |   9 ++--
 windows/winshare.c |   9 ++--
 19 files changed, 233 insertions(+), 275 deletions(-)

commit 836a75ba696cf656d2b6dd663f8fa506ad86e04c
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=836a75ba696cf656d2b6dd663f8fa506ad86e04c;hp=0d2d20aad0df3a48cba74abf63edf6c7d2aff16f
Author: Simon Tatham <anakin at pobox.com>
Date:   Sun Jan 20 16:42:58 2019 +0000

    ssh1login: fix memory management when using the agent.
    
    We were retaining a ptrlen 's->comment' into a past agent response
    message, but that had been freed by the time it was actually printed
    in a diagnostic. Also, agent_response_to_free was being freed twice,
    because the variable 'ret' in the response-formatting code aliased it.

 ssh1login.c | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

commit 1df39eb0a4c72a0755dc35382578d66d7e1c4cce
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=1df39eb0a4c72a0755dc35382578d66d7e1c4cce;hp=836a75ba696cf656d2b6dd663f8fa506ad86e04c
Author: Simon Tatham <anakin at pobox.com>
Date:   Sun Jan 20 11:32:26 2019 +0000

    Turn ssh2_mac's text_name field into a method.
    
    This allows a MAC implementation to construct its textual name at run
    time. Nothing yet uses that flexibility, though.

 ssh.h      |  3 ++-
 ssh2bpp.c  |  4 ++--
 sshccp.c   |  9 +++++++--
 sshmd5.c   |  8 ++++++--
 sshsh256.c |  8 ++++++--
 sshsha.c   | 32 ++++++++++++++++++++++++--------
 6 files changed, 47 insertions(+), 17 deletions(-)

commit d73f692eea9dfbb000d0e0a5f69e52e4e591c5b0
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=d73f692eea9dfbb000d0e0a5f69e52e4e591c5b0;hp=1df39eb0a4c72a0755dc35382578d66d7e1c4cce
Author: Simon Tatham <anakin at pobox.com>
Date:   Sun Jan 20 11:37:05 2019 +0000

    Add an 'extra' pointer field to ssh2_macalg.
    
    Similar to the versions in ssh_cipheralg and ssh_keyalg, this allows a
    set of vtables to share function pointers while providing varying
    constant data that the shared function can use to vary its behaviour.
    
    As an initial demonstration, I've used this to recombine the four
    trivial text_name methods for the HMAC-SHA1 variants. I'm about to use
    it for something more sensible, though.

 ssh.h    |  3 +++
 sshsha.c | 45 ++++++++++++++++++++++-----------------------
 2 files changed, 25 insertions(+), 23 deletions(-)

commit baff23cdd62ccc34a21534bf32b7779ff8853458
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=baff23cdd62ccc34a21534bf32b7779ff8853458;hp=d73f692eea9dfbb000d0e0a5f69e52e4e591c5b0
Author: Simon Tatham <anakin at pobox.com>
Date:   Sun Jan 20 16:18:49 2019 +0000

    Centralised HMAC implementation.
    
    This replaces all the separate HMAC-implementing wrappers in the
    various source files implementing the underlying hashes.
    
    The new HMAC code also correctly handles the case of a key longer than
    the underlying hash's block length, by replacing it with its own hash.
    This means I can reinstate the test vectors in RFC 6234 which exercise
    that case, which I didn't add to cryptsuite before because they'd have
    failed.
    
    It also allows me to remove the ad-hoc code at the call site in
    cproxy.c which turns out to have been doing the same thing - I think
    that must have been the only call site where the question came up
    (since MAC keys invented by the main SSH-2 BPP are always shorter than
    that).

 Recipe             |   9 ++-
 cproxy.c           |  11 +--
 marshal.h          |   6 ++
 sshhmac.c          | 210 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 sshmd5.c           | 114 -----------------------------
 sshsh256.c         |  87 ----------------------
 sshsha.c           | 138 -----------------------------------
 test/cryptsuite.py |  37 +++++++---
 8 files changed, 251 insertions(+), 361 deletions(-)



More information about the tartarus-commits mailing list