simon-git: putty (master): Simon Tatham

Commits to Tartarus hosted VCS tartarus-commits at lists.tartarus.org
Sat Jan 5 08:28:52 GMT 2019


TL;DR:
  e5e520d4 cryptsuite.py: a couple more helper functions.
  4a0fa909 Fix wrong output from ssh1_rsa_fingerprint.

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-05 08:28:52

commit e5e520d48e6bc4915531e4597bceeb1c9c5e8518
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=e5e520d48e6bc4915531e4597bceeb1c9c5e8518;hp=be779f988d6ae602a91ba564e8c75bf7642627b0
Author: Simon Tatham <anakin at pobox.com>
Date:   Sat Jan 5 08:21:30 2019 +0000

    cryptsuite.py: a couple more helper functions.
    
    I've moved the static method nbits up into a top-level function, so I
    can use it to implement Python marshalling functions for SSH mpints.
    I'm about to need one of these, and the other will surely come in
    useful as well sooner or later.

 test/cryptsuite.py | 48 ++++++++++++++++++++++++++++--------------------
 1 file changed, 28 insertions(+), 20 deletions(-)

commit 4a0fa90979d43a6ba93ff8fa6a5ac81cf981e8d0
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=4a0fa90979d43a6ba93ff8fa6a5ac81cf981e8d0;hp=e5e520d48e6bc4915531e4597bceeb1c9c5e8518
Author: Simon Tatham <anakin at pobox.com>
Date:   Sat Jan 5 08:14:32 2019 +0000

    Fix wrong output from ssh1_rsa_fingerprint.
    
    I broke it last year in commit 4988fd410, when I made hash contexts
    expose a BinarySink interface. I went round finding no end of long-
    winded ways of pushing things into hash contexts, often reimplementing
    some standard thing like the wire formatting of an mpint, and rewrote
    them more concisely using one or two put_foo calls.
    
    But I failed to notice that the hash preimage used in SSH-1 key
    fingerprints is _not_ implementable by put_ssh1_mpint! It consists of
    the two public-key integers encoded in multi-byte binary big-endian
    form, but without any preceding length field at all. I must have
    looked too hastily, 'recognised' it as just implementing an mpint
    formatter yet again, and replaced it with put_ssh1_mpint. So SSH-1 key
    fingerprints have been completely wrong in the snapshots for months.
    
    Fixed now, and this time, added a comment to warn me in case I get the
    urge to simplify the code again, and a regression test in cryptsuite.

 sshrsa.c           | 14 ++++++++++++--
 test/cryptsuite.py | 15 +++++++++++++++
 2 files changed, 27 insertions(+), 2 deletions(-)



More information about the tartarus-commits mailing list