diff -Nru python-ecdsa-0.10/debian/changelog python-ecdsa-0.11/debian/changelog --- python-ecdsa-0.10/debian/changelog 2013-12-21 16:16:03.000000000 +0000 +++ python-ecdsa-0.11/debian/changelog 2016-02-15 13:45:49.000000000 +0000 @@ -1,3 +1,25 @@ +python-ecdsa (0.11-1~trusty) trusty; urgency=medium + + * backport to trusty + + -- Hans-Christoph Steiner Mon, 15 Feb 2016 14:45:01 +0100 + +python-ecdsa (0.11-1) unstable; urgency=medium + + * New upstream release. + * Switch to tarball from PyPI: + - debian/watch: Use PyPI. + - debian/patches/upstream-_version.patch: Removed, no longer needed. + - debian/copyright: Point Source to PyPI. + * debian/copyright: Update copyright years. + * Add DEP-8 tests: + - debian/tests: Add tests. + - debian/control: Add XS-Testsuite. + * debian/control: Add X-Python-Version. Upstream dropped support for + anything before 2.6. + + -- Sebastian Ramacher Tue, 11 Mar 2014 13:15:59 +0100 + python-ecdsa (0.10-2) unstable; urgency=low * Add Python 3 package. diff -Nru python-ecdsa-0.10/debian/control python-ecdsa-0.11/debian/control --- python-ecdsa-0.10/debian/control 2013-12-21 16:16:03.000000000 +0000 +++ python-ecdsa-0.11/debian/control 2014-03-11 12:11:31.000000000 +0000 @@ -15,7 +15,9 @@ Vcs-Browser: http://anonscm.debian.org/viewvc/python-modules/packages/python-ecdsa/trunk/ Vcs-Svn: svn://anonscm.debian.org/python-modules/packages/python-ecdsa/trunk/ Standards-Version: 3.9.5 +X-Python-Version: >= 2.6 X-Python3-Version: >= 3.2 +XS-Testsuite: autopkgtest Package: python-ecdsa Architecture: all diff -Nru python-ecdsa-0.10/debian/copyright python-ecdsa-0.11/debian/copyright --- python-ecdsa-0.10/debian/copyright 2013-12-21 16:16:03.000000000 +0000 +++ python-ecdsa-0.11/debian/copyright 2014-03-11 12:11:31.000000000 +0000 @@ -1,7 +1,7 @@ Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: python-ecdsa Upstream-Contact: Brian Warner -Source: https://github.com/warner/python-ecdsa +Source: https://pypi.python.org/pypi/ecdsa Files: * Copyright: 2010 Brian Warner @@ -14,7 +14,7 @@ License: Expat Files: debian/* -Copyright: 2013 Sebastian Ramacher +Copyright: 2013-2014 Sebastian Ramacher License: Expat Comment: The previous packaging was done by Bart Martens . He kindly diff -Nru python-ecdsa-0.10/debian/patches/series python-ecdsa-0.11/debian/patches/series --- python-ecdsa-0.10/debian/patches/series 2013-12-21 16:16:03.000000000 +0000 +++ python-ecdsa-0.11/debian/patches/series 2014-03-11 12:11:31.000000000 +0000 @@ -1,2 +1 @@ system-six.patch -upstream-_version.patch diff -Nru python-ecdsa-0.10/debian/patches/upstream-_version.patch python-ecdsa-0.11/debian/patches/upstream-_version.patch --- python-ecdsa-0.10/debian/patches/upstream-_version.patch 2013-12-21 16:16:03.000000000 +0000 +++ python-ecdsa-0.11/debian/patches/upstream-_version.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,17 +0,0 @@ -Description: Add upstream's ecdsa/_version.py - The tarball from GitHub does not contain this file. However, the tarball from - PyPI includes it. The file is needed to get the correct version information for - setup.py. Until we switch to PyPI as source for upstream tarballs with the next - release, include it via a patch. -Origin: upstream, - https://pypi.python.org/packages/source/e/ecdsa/ecdsa-0.10.tar.gz -Last-Update: 2013-12-10 - ---- /dev/null -+++ python-ecdsa-0.10/ecdsa/_version.py -@@ -0,0 +1,5 @@ -+ -+# This file is originally generated from Git information by running 'setup.py -+# version'. Distribution tarballs contain a pre-generated copy of this file. -+ -+__version__ = '0.10' diff -Nru python-ecdsa-0.10/debian/tests/control python-ecdsa-0.11/debian/tests/control --- python-ecdsa-0.10/debian/tests/control 1970-01-01 00:00:00.000000000 +0000 +++ python-ecdsa-0.11/debian/tests/control 2014-03-11 12:11:31.000000000 +0000 @@ -0,0 +1,7 @@ +Tests: python2 +Depends: python-ecdsa, openssl, python-all +Restrictions: allow-stderr + +Tests: python3 +Depends: python3-ecdsa, openssl, python3-all +Restrictions: allow-stderr diff -Nru python-ecdsa-0.10/debian/tests/python2 python-ecdsa-0.11/debian/tests/python2 --- python-ecdsa-0.10/debian/tests/python2 1970-01-01 00:00:00.000000000 +0000 +++ python-ecdsa-0.11/debian/tests/python2 2014-03-11 12:11:31.000000000 +0000 @@ -0,0 +1,7 @@ +#!/bin/bash +set -e + +cd "$ADTTMP" +for py in $(pyversions -vi) ; do + python$py -m ecdsa.test_pyecdsa ; +done diff -Nru python-ecdsa-0.10/debian/tests/python3 python-ecdsa-0.11/debian/tests/python3 --- python-ecdsa-0.10/debian/tests/python3 1970-01-01 00:00:00.000000000 +0000 +++ python-ecdsa-0.11/debian/tests/python3 2014-03-11 12:11:31.000000000 +0000 @@ -0,0 +1,7 @@ +#!/bin/bash +set -e + +cd "$ADTTMP" +for py in $(py3versions -vi) ; do + python$py -m ecdsa.test_pyecdsa ; +done diff -Nru python-ecdsa-0.10/debian/watch python-ecdsa-0.11/debian/watch --- python-ecdsa-0.10/debian/watch 2013-12-10 04:24:47.000000000 +0000 +++ python-ecdsa-0.11/debian/watch 2014-03-11 12:11:31.000000000 +0000 @@ -1,3 +1,3 @@ version=3 -https://github.com/warner/python-ecdsa/tags \ -.*/archive/python-ecdsa-(\d\S*)\.tar\.gz +https://pypi.python.org/pypi/ecdsa \ + .*/ecdsa-(\d\S*)\.tar\.gz diff -Nru python-ecdsa-0.10/ecdsa/keys.py python-ecdsa-0.11/ecdsa/keys.py --- python-ecdsa-0.10/ecdsa/keys.py 2013-10-23 18:35:46.000000000 +0000 +++ python-ecdsa-0.11/ecdsa/keys.py 2014-03-10 22:45:22.000000000 +0000 @@ -30,7 +30,8 @@ return self @classmethod - def from_string(klass, string, curve=NIST192p, hashfunc=sha1): + def from_string(klass, string, curve=NIST192p, hashfunc=sha1, + validate_point=True): order = curve.order assert len(string) == curve.verifying_key_length, \ (len(string), curve.verifying_key_length) @@ -40,7 +41,8 @@ assert len(ys) == curve.baselen, (len(ys), curve.baselen) x = string_to_number(xs) y = string_to_number(ys) - assert ecdsa.point_is_valid(curve.generator, x, y) + if validate_point: + assert ecdsa.point_is_valid(curve.generator, x, y) from . import ellipticcurve point = ellipticcurve.Point(curve.curve, x, y, order) return klass.from_public_point(point, curve, hashfunc) diff -Nru python-ecdsa-0.10/ecdsa/util.py python-ecdsa-0.11/ecdsa/util.py --- python-ecdsa-0.10/ecdsa/util.py 2013-10-23 18:35:46.000000000 +0000 +++ python-ecdsa-0.11/ecdsa/util.py 2014-03-10 22:45:10.000000000 +0000 @@ -197,6 +197,24 @@ def sigencode_der(r, s, order): return der.encode_sequence(der.encode_integer(r), der.encode_integer(s)) +# canonical versions of sigencode methods +# these enforce low S values, by negating the value (modulo the order) if above order/2 +# see CECKey::Sign() https://github.com/bitcoin/bitcoin/blob/master/src/key.cpp#L214 +def sigencode_strings_canonize(r, s, order): + if s > order / 2: + s = order - s + return sigencode_strings(r, s, order) + +def sigencode_string_canonize(r, s, order): + if s > order / 2: + s = order - s + return sigencode_string(r, s, order) + +def sigencode_der_canonize(r, s, order): + if s > order / 2: + s = order - s + return sigencode_der(r, s, order) + def sigdecode_string(signature, order): l = orderlen(order) diff -Nru python-ecdsa-0.10/ecdsa/_version.py python-ecdsa-0.11/ecdsa/_version.py --- python-ecdsa-0.10/ecdsa/_version.py 1970-01-01 00:00:00.000000000 +0000 +++ python-ecdsa-0.11/ecdsa/_version.py 2014-03-10 22:54:24.000000000 +0000 @@ -0,0 +1,5 @@ + +# This file is originally generated from Git information by running 'setup.py +# version'. Distribution tarballs contain a pre-generated copy of this file. + +__version__ = '0.11' diff -Nru python-ecdsa-0.10/.gitignore python-ecdsa-0.11/.gitignore --- python-ecdsa-0.10/.gitignore 2013-10-23 18:35:46.000000000 +0000 +++ python-ecdsa-0.11/.gitignore 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -*.py[cod] -ecdsa/_version.py -MANIFEST - -# C extensions -*.so -*.dylib - -# Packages -*.egg -*.egg-info -dist -build -eggs -parts -bin -var -sdist -develop-eggs -.installed.cfg -lib -lib64 -__pycache__ - -# Installer logs -pip-log.txt - -# Other logs -*.log - -# Unit test / coverage reports -.coverage -coverage-html -.tox -nosetests.xml -t/ - -# Translations -*.mo - -# Mr Developer -.mr.developer.cfg -.project -.pydevproject - -# Backup files -*.swp -*~ diff -Nru python-ecdsa-0.10/NEWS python-ecdsa-0.11/NEWS --- python-ecdsa-0.10/NEWS 2013-10-23 18:35:46.000000000 +0000 +++ python-ecdsa-0.11/NEWS 2014-03-10 22:49:39.000000000 +0000 @@ -1,3 +1,12 @@ +* Release 0.11 (10 Mar 2014) + +Add signature-encoding functions "sigencode_{strings,string,der}_canonize" +which canonicalize the S value (using the smaller of the two possible +values). Add "validate_point=" argument to VerifyingKey.from_string() +constructor (defaults to True) which can be used to disable time-consuming +point validation when importing a pre-validated verifying key. Drop python2.5 +support (untested but not explicitly broken yet), update trove classifiers. + * Release 0.10 (23 Oct 2013) Make the secp256k1 available in __init__.py too (thanks to Scott Bannert). diff -Nru python-ecdsa-0.10/PKG-INFO python-ecdsa-0.11/PKG-INFO --- python-ecdsa-0.10/PKG-INFO 1970-01-01 00:00:00.000000000 +0000 +++ python-ecdsa-0.11/PKG-INFO 2014-03-10 22:54:24.000000000 +0000 @@ -0,0 +1,17 @@ +Metadata-Version: 1.1 +Name: ecdsa +Version: 0.11 +Summary: ECDSA cryptographic signature library (pure python) +Home-page: http://github.com/warner/python-ecdsa +Author: Brian Warner +Author-email: warner-pyecdsa@lothar.com +License: MIT +Description: UNKNOWN +Platform: UNKNOWN +Classifier: Programming Language :: Python +Classifier: Programming Language :: Python :: 2 +Classifier: Programming Language :: Python :: 2.6 +Classifier: Programming Language :: Python :: 2.7 +Classifier: Programming Language :: Python :: 3 +Classifier: Programming Language :: Python :: 3.2 +Classifier: Programming Language :: Python :: 3.3 diff -Nru python-ecdsa-0.10/README.md python-ecdsa-0.11/README.md --- python-ecdsa-0.10/README.md 2013-10-23 18:35:46.000000000 +0000 +++ python-ecdsa-0.11/README.md 2014-02-17 20:48:01.000000000 +0000 @@ -20,7 +20,7 @@ ## Dependencies -This library uses only Python. It requires python2.5 or later versions of the +This library uses only Python. It requires python2.6 or later versions of the python2.x series. It is also compatible with python3.2 and 3.3. To run the OpenSSL compatibility tests, the 'openssl' tool must be on your diff -Nru python-ecdsa-0.10/setup.py python-ecdsa-0.11/setup.py --- python-ecdsa-0.10/setup.py 2013-10-23 18:35:46.000000000 +0000 +++ python-ecdsa-0.11/setup.py 2014-02-17 20:48:01.000000000 +0000 @@ -94,4 +94,13 @@ packages=["ecdsa"], license="MIT", cmdclass={ "test": Test, "version": Version, "sdist": sdist }, - ) + classifiers=[ + "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.6", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.2", + "Programming Language :: Python :: 3.3", + ], +) diff -Nru python-ecdsa-0.10/.travis.yml python-ecdsa-0.11/.travis.yml --- python-ecdsa-0.10/.travis.yml 2013-10-23 18:35:46.000000000 +0000 +++ python-ecdsa-0.11/.travis.yml 1970-01-01 00:00:00.000000000 +0000 @@ -1,10 +0,0 @@ -language: python -python: - - "2.5" - - "2.6" - - "2.7" - - "3.2" - - "3.3" -install: true -script: - - python setup.py test