simon-git: putty (master): Simon Tatham
Commits to Tartarus hosted VCS
tartarus-commits at lists.tartarus.org
Tue Feb 26 07:15:03 GMT 2019
TL;DR:
8edfc767 minibidi.c: include putty.h and fix clashes.
fec93d5e Make bidi work with wide characters.
35f071f6 Minor refactoring in terminal.c.
1a7521a0 New mpint function mp_get_integer().
801ab68e Rewrite invent_firstbits().
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-02-26 07:15:03
commit 8edfc767a3d6bd3e8c53a32fb9e26014f425b132
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=8edfc767a3d6bd3e8c53a32fb9e26014f425b132;hp=ca90a36bcd0bf078453a9027adf1fd3a216614eb
Author: Simon Tatham <anakin at pobox.com>
Date: Mon Feb 25 20:30:38 2019 +0000
minibidi.c: include putty.h and fix clashes.
The bidi_char structure was declared twice, with nothing to keep them
in sync; also, is_rtl had a mismatch of return types.
minibidi.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
commit fec93d5e059c05a087e1ea47a1e7182a8d9ed769
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=fec93d5e059c05a087e1ea47a1e7182a8d9ed769;hp=8edfc767a3d6bd3e8c53a32fb9e26014f425b132
Author: Simon Tatham <anakin at pobox.com>
Date: Mon Feb 25 20:51:17 2019 +0000
Make bidi work with wide characters.
Previously, any double-width character would break the bidi algorithm,
because of the quirk of data representation in which we store UCSWIDE
(0xDFFF) in the right-hand termchar overlapped by the character.
UCSWIDE has bidirectional character class L according to minibidi's
getType(), so it disrupted the algorithm.
Now we remove UCSWIDE from the input line before passing it to
do_bidi(), replacing it with an 'nchars' field in the bidi_char
structure indicating single or double width, and put the UCSWIDEs back
afterwards once do_bidi returns.
putty.h | 2 +-
terminal.c | 40 +++++++++++++++++++++++++++++-----------
2 files changed, 30 insertions(+), 12 deletions(-)
commit 35f071f61c7af179207d02a8cb959b6d99912d74
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=35f071f61c7af179207d02a8cb959b6d99912d74;hp=fec93d5e059c05a087e1ea47a1e7182a8d9ed769
Author: Simon Tatham <anakin at pobox.com>
Date: Tue Feb 26 07:12:13 2019 +0000
Minor refactoring in terminal.c.
The actual calls to win_draw_{text,cursor} in do_paint() were
duplicated in two places, and I may want to change them soon, so it's
convenient to centralise them.
terminal.c | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
commit 1a7521a0a7d9428b7de4b0132e142880ee8ad043
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=1a7521a0a7d9428b7de4b0132e142880ee8ad043;hp=35f071f61c7af179207d02a8cb959b6d99912d74
Author: Simon Tatham <anakin at pobox.com>
Date: Tue Feb 26 07:06:16 2019 +0000
New mpint function mp_get_integer().
If you have an mp_int that you know will fit in an ordinary integer
type, this function gives it to you in that form.
mpint.c | 12 ++++++++++++
mpint.h | 6 ++++++
2 files changed, 18 insertions(+)
commit 801ab68eac3f442ec10688f17ad9f76f873fb76f
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=801ab68eac3f442ec10688f17ad9f76f873fb76f;hp=1a7521a0a7d9428b7de4b0132e142880ee8ad043
Author: Simon Tatham <anakin at pobox.com>
Date: Tue Feb 26 07:06:57 2019 +0000
Rewrite invent_firstbits().
Instead of repeatedly looping on the random number generator until it
comes up with two values that have a large enough product, the new
version guarantees only one use of random numbers, by first counting
up all the possible pairs of values that would work, and then
inventing a single random number that's used as an index into that
list.
I've done the selection from the list using constant-time techniques,
not particularly because I think key generation can be made CT in
general, but out of sheer habit after the last few months, and who
knows, it _might_ be useful.
While I'm at it, I've also added an option to make sure the two
firstbits values differ by at least a given value. For RSA, I set that
value to 2, guaranteeing that even if the smaller prime has a very
long string of 1 bits after the firstbits value and the larger has a
long string of 0, they'll still have a relative difference of at least
2^{-12}. Not that there was any serious chance of the primes having
randomly ended up so close together as to make the key in danger of
factoring, but it seems like a silly thing to leave out if I'm
rewriting the function anyway.
ssh.h | 2 +-
sshdssg.c | 2 +-
sshprime.c | 105 +++++++++++++++++++++++++++++++++++++++++++++++++++++--------
sshrsag.c | 8 ++++-
4 files changed, 101 insertions(+), 16 deletions(-)
More information about the tartarus-commits
mailing list