From 34d03ae3dc4f08657f638e85c4184fb3b1a64e64 Mon Sep 17 00:00:00 2001 From: Chris Rose Date: Mon, 14 Apr 2014 17:38:05 -0400 Subject: Revert a regression in DSS key generation A change in f0017b833098 caused a random regression in DSS key signing due to moving the padding on the integers generated by DSA from the left to the right. So, for example, if signing the test case string "jerri blank", the random number might be generated as: k=703745698612177278239572677252380378525350342103 If so, the signature parts will be: r=184615963997659989901526712385095827509599268253 s=2682547683721156713440053885014828604195555319 Note the s being shorter. Prior to f0017b833098, s would be right-padded with zeros: s=268254768372115671344005388501482860419555531900 After, it would be left-padded: s=002682547683721156713440053885014828604195555319 When converting back to a long, that loses the padding. This change restores the behaviour. Fixes #308 --- sites/www/changelog.rst | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sites/www') diff --git a/sites/www/changelog.rst b/sites/www/changelog.rst index 02fee80b..6737fdc0 100644 --- a/sites/www/changelog.rst +++ b/sites/www/changelog.rst @@ -2,6 +2,8 @@ Changelog ========= +* :bug:`308` Fix regression in dsskey.py that caused sporadic signature + verification failures. Thanks to Chris Rose. * :support:`290` (also :issue:`292`) Add support for building universal (Python 2+3 compatible) wheel files during the release process. Courtesy of Alex Gaynor. -- cgit v1.2.3