simon-git: putty (master): Simon Tatham

Commits to Tartarus hosted VCS tartarus-commits at lists.tartarus.org
Wed Jan 9 22:31:18 GMT 2019


TL;DR:
  48ff6f13 Add tests of all the AES cipher modes.
  3347bd81 Fix AES-NI SDCTR to pass the new tests.
  b7be22e4 cryptsuite: add an assertEqualBin() helper function.

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-09 22:31:18

commit 48ff6f13e2b56dc335f93902187c41fa8ef3ef8d
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=48ff6f13e2b56dc335f93902187c41fa8ef3ef8d;hp=7fd815014e30fe0b17c264f2ea11247e190f300b
Author: Simon Tatham <anakin at pobox.com>
Date:   Wed Jan 9 21:54:52 2019 +0000

    Add tests of all the AES cipher modes.
    
    This tests the CBC and SDCTR modes, in all key lengths, and in
    particular includes a set of SDCTR tests designed to test the
    procedure for incrementing the IV as a single 128-bit integer, by
    checking propagation of the carry between every pair of words.

 test/cryptsuite.py | 130 ++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 129 insertions(+), 1 deletion(-)

commit 3347bd81b75e4e2e5c39de70d8771db37b380daa
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=3347bd81b75e4e2e5c39de70d8771db37b380daa;hp=48ff6f13e2b56dc335f93902187c41fa8ef3ef8d
Author: Simon Tatham <anakin at pobox.com>
Date:   Wed Jan 9 21:58:08 2019 +0000

    Fix AES-NI SDCTR to pass the new tests.
    
    The IV-incrementing code seems to have had several bugs. It was not
    propagating a carry from bit 31 to 32 of the 128-bit integer,
    apparently because of having arranged the 32-bit words wrongly within
    the vector register; also, when it tried to implement carry
    propagation from bit 63 to 64 by checking the low 64 bits for zero, it
    checked the _high_ bits instead, leading to a spurious extra addition
    in the low half if the high half happened to be zero.
    
    This must surely have been able to cause mysterious decryption
    failures about once every 2^32 cipher blocks = 64Gb of data
    transferred. I suppose that must be a large enough number that either
    no users of the snapshot builds have encountered the problem, or the
    ones who did dismissed it as computers being randomly flaky.
    
    The revised version now passes all the same tests as the software
    implementation.

 sshaes.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

commit b7be22e4e03374d4a01e4dfb5dd776294bacb1cf
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=b7be22e4e03374d4a01e4dfb5dd776294bacb1cf;hp=3347bd81b75e4e2e5c39de70d8771db37b380daa
Author: Simon Tatham <anakin at pobox.com>
Date:   Wed Jan 9 21:59:19 2019 +0000

    cryptsuite: add an assertEqualBin() helper function.
    
    This is just like assertEqual, except that I use it when I'm comparing
    random-looking binary data, and if the check fails it will encode the
    two differing values in hex, which is easier to read than trying to
    express them as really strange-looking string literals.

 test/cryptsuite.py | 126 +++++++++++++++++++++++++++++------------------------
 1 file changed, 69 insertions(+), 57 deletions(-)



More information about the tartarus-commits mailing list