forked from pool/python-ecdsa
- Update to 0.17.0
* 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.
* Describe in detail which methods can raise `RSZeroError`, and that
`SigningKey.sign_deterministic()` won't raise it.
* 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).
OBS-URL: https://build.opensuse.org/request/show/915237
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-ecdsa?expand=0&rev=29
70 lines
2.2 KiB
RPMSpec
70 lines
2.2 KiB
RPMSpec
#
|
|
# spec file for package python-ecdsa
|
|
#
|
|
# Copyright (c) 2021 SUSE LLC
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
Name: python-ecdsa
|
|
Version: 0.17.0
|
|
Release: 0
|
|
Summary: ECDSA cryptographic signature library (pure python)
|
|
License: MIT
|
|
URL: https://github.com/warner/python-ecdsa
|
|
Source: https://files.pythonhosted.org/packages/source/e/ecdsa/ecdsa-%{version}.tar.gz
|
|
BuildRequires: %{python_module hypothesis}
|
|
BuildRequires: %{python_module pytest}
|
|
BuildRequires: %{python_module setuptools}
|
|
BuildRequires: %{python_module six}
|
|
BuildRequires: fdupes
|
|
BuildRequires: openssl
|
|
BuildRequires: python-rpm-macros
|
|
Requires: python-six
|
|
Suggests: python-gmpy
|
|
Suggests: python-gmpy2
|
|
BuildArch: noarch
|
|
%python_subpackages
|
|
|
|
%description
|
|
This is an easy-to-use implementation of ECDSA cryptography (Elliptic Curve
|
|
Digital Signature Algorithm), implemented purely in Python, released under
|
|
the MIT license. With this library, you can quickly create keypairs (signing
|
|
key and verifying key), sign messages, and verify the signatures. The keys
|
|
and signatures are very short, making them easy to handle and incorporate
|
|
into other protocols.
|
|
|
|
%prep
|
|
%setup -q -n ecdsa-%{version}
|
|
|
|
%build
|
|
%python_build
|
|
#remove shebang from all non executable files
|
|
find ./ -type f -name "*.py" -perm 644 -exec sed -i -e '1{\@^#! %{_bindir}/env python@d}' {} \;
|
|
|
|
%install
|
|
%python_install
|
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
%check
|
|
%pytest
|
|
|
|
%files %{python_files}
|
|
%license LICENSE
|
|
%doc NEWS README.md
|
|
%{python_sitelib}/*
|
|
|
|
%changelog
|