summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoradam <adam@pkgsrc.org>2021-06-01 05:34:51 +0000
committeradam <adam@pkgsrc.org>2021-06-01 05:34:51 +0000
commit760c5f8a14d7c54499054115748eeabf977982c3 (patch)
tree39593a4df867aa4d7fc62a8ba139af5208e3510f
parent2d03dea9ec0d7db80be6295c2fa02017a3d635d4 (diff)
downloadpkgsrc-760c5f8a14d7c54499054115748eeabf977982c3.tar.gz
py-ecdsa: updated to 0.17.0
Relase 0.17.0 (27 May 2021) New API: * Keys that use explicit curve parameters can now be read and written. Reading of explicit curves can be disabled by using the `valid_curve_encodings` keyword argument in `VerifyingKey.from_pem()`, `VerifyingKey.from_der()`, `SigningKey.from_pem()`, and `SigningKey.from_der()`. * Keys can now be written with use of explicit curve parameters, use `curve_parameters_encoding` keyword argument of `VerifyingKey.to_pem()`, `VerifyingKey.to_der()`, `SigningKey.to_pem(), or `SigningKey.to_der()` to specify the format. By default `named_curve` will be used, unless the curve doesn't have an associated OID (as will be the case for an unsupported curve), then `explicit` encoding will be used. * Allow specifying acceptable point formats when loading public keys (this also fixes a minor bug where python-ecdsa would accept raw encoding for points in PKCS#8 files). Set of accepted encodings is controlled by `valid_encodings` keyword argument in `ECDH.load_received_public_key_bytes()`, `VerifyingKey.from_string()`, `VerifyingKey.from_pem()`, VerifyingKey.from_der()`. * `PointJacobi` and `Point` now inherit from `AbstractPoint` that implements the methods for parsing points. That added `from_bytes()` and `to_bytes()` methods to both of them. * Curve parameters can now be read and written to PEM and DER files. The `Curve` class supports new `to_der()`, `from_der()`, `to_pem()`, and `from_pem()` methods. Doc fix: * Describe in detail which methods can raise `RSZeroError`, and that `SigningKey.sign_deterministic()` won't raise it. Bug fix: * Correctly truncate hash values larger than the curve order (only impacted custom curves and the curves added in this release). * Correctly handle curves for which the order is larger than the prime (only impacted custom curves and the secp160r1 curve added in this release). * Fix the handling of `==` and `!=` for `Public_key`, `Private_key`, `Point`, `PointJacobi`, `VerifyingKey`, and `SigningKey` so that it behaves consistently and in the expected way both in Python 2 and Python 3. * Implement lock-less algorithm inside PointJacobi for keeping shared state so that when calculation is aborted with KeyboardInterrupt, the state doesn't become corrupted (this fixes the occasional breakage of ecdsa in interactive shells). New features: * The `speed.py` script now provides performance for signature verification without use of precomputation. * New curves supported: secp112r1, secp112r2, secp128r1, secp160r1. Performance: * Use 2-ary Non-Adjacent Form for the combined multiply-add. This speeds up single-shot verify (i.e. without precomputation) by about 4 to 5%. * Use native Python 3.8 support for calculating multiplicative inverses. Maintenace: * Include Python 3.9 in PyPI keywords. * More realistic branch coverage counting (ignore Python version-specific branches). * Additional test coverage to many parts of the library. * Migrate to Github Actions for Continuous Testing.
-rw-r--r--security/py-ecdsa/Makefile7
-rw-r--r--security/py-ecdsa/PLIST8
-rw-r--r--security/py-ecdsa/distinfo10
3 files changed, 17 insertions, 8 deletions
diff --git a/security/py-ecdsa/Makefile b/security/py-ecdsa/Makefile
index 3fa25ba74b2..b731369bc46 100644
--- a/security/py-ecdsa/Makefile
+++ b/security/py-ecdsa/Makefile
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.12 2020/11/30 20:13:53 adam Exp $
+# $NetBSD: Makefile,v 1.13 2021/06/01 05:34:51 adam Exp $
-DISTNAME= ecdsa-0.16.1
+DISTNAME= ecdsa-0.17.0
PKGNAME= ${PYPKGPREFIX}-${DISTNAME}
CATEGORIES= security python
MASTER_SITES= ${MASTER_SITE_PYPI:=e/ecdsa/}
@@ -14,5 +14,8 @@ DEPENDS+= ${PYPKGPREFIX}-six>=1.9.0:../../lang/py-six
USE_LANGUAGES= # none
+do-test:
+ cd ${WRKSRC}/src && ${SETENV} ${TEST_ENV} ${PYTHONBIN} -m unittest discover -v
+
.include "../../lang/python/egg.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/security/py-ecdsa/PLIST b/security/py-ecdsa/PLIST
index 0f477371246..f05292fd01a 100644
--- a/security/py-ecdsa/PLIST
+++ b/security/py-ecdsa/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.4 2020/02/27 16:55:07 bsiegert Exp $
+@comment $NetBSD: PLIST,v 1.5 2021/06/01 05:34:51 adam Exp $
${PYSITELIB}/${EGG_INFODIR}/PKG-INFO
${PYSITELIB}/${EGG_INFODIR}/SOURCES.txt
${PYSITELIB}/${EGG_INFODIR}/dependency_links.txt
@@ -31,6 +31,9 @@ ${PYSITELIB}/ecdsa/ecdsa.pyo
${PYSITELIB}/ecdsa/ellipticcurve.py
${PYSITELIB}/ecdsa/ellipticcurve.pyc
${PYSITELIB}/ecdsa/ellipticcurve.pyo
+${PYSITELIB}/ecdsa/errors.py
+${PYSITELIB}/ecdsa/errors.pyc
+${PYSITELIB}/ecdsa/errors.pyo
${PYSITELIB}/ecdsa/keys.py
${PYSITELIB}/ecdsa/keys.pyc
${PYSITELIB}/ecdsa/keys.pyo
@@ -40,6 +43,9 @@ ${PYSITELIB}/ecdsa/numbertheory.pyo
${PYSITELIB}/ecdsa/rfc6979.py
${PYSITELIB}/ecdsa/rfc6979.pyc
${PYSITELIB}/ecdsa/rfc6979.pyo
+${PYSITELIB}/ecdsa/test_curves.py
+${PYSITELIB}/ecdsa/test_curves.pyc
+${PYSITELIB}/ecdsa/test_curves.pyo
${PYSITELIB}/ecdsa/test_der.py
${PYSITELIB}/ecdsa/test_der.pyc
${PYSITELIB}/ecdsa/test_der.pyo
diff --git a/security/py-ecdsa/distinfo b/security/py-ecdsa/distinfo
index 6a6b0c2eca9..35f0479a3bb 100644
--- a/security/py-ecdsa/distinfo
+++ b/security/py-ecdsa/distinfo
@@ -1,6 +1,6 @@
-$NetBSD: distinfo,v 1.10 2020/11/30 20:13:53 adam Exp $
+$NetBSD: distinfo,v 1.11 2021/06/01 05:34:51 adam Exp $
-SHA1 (ecdsa-0.16.1.tar.gz) = ec9fa2f821e0bdf0812dc0c94b92214212541fb6
-RMD160 (ecdsa-0.16.1.tar.gz) = e3ee5219f8d8c8cd8b3eba2519cde9d70d3b0d9e
-SHA512 (ecdsa-0.16.1.tar.gz) = 935416ff25a71b1e6fe442b11e8d2c1463b1652d539274e094112a4847c2c749ff58eb9f5ed108ed5613b7363d3f2b1c07ba3d01af8cfed4e1b4bec407d3f5a6
-Size (ecdsa-0.16.1.tar.gz) = 126935 bytes
+SHA1 (ecdsa-0.17.0.tar.gz) = 6fb01a249bf0ecd275fbe280e55840f981b1ff1a
+RMD160 (ecdsa-0.17.0.tar.gz) = 6d1f2032ed4d017e1f9176912887c2cb77b3b2ab
+SHA512 (ecdsa-0.17.0.tar.gz) = 23acf993ce4f7f832674a3b70ab870c20172816e27adc836d4c6a876e72a488a830895d63ab6af67cc7cbc83c71f7097d0d530bf67d24c84e69e9fa87031f6fd
+Size (ecdsa-0.17.0.tar.gz) = 158486 bytes