15
0
forked from pool/python-ecdsa
Files
python-ecdsa/python-ecdsa.spec
Matej Cepl 3639ab9222 Accepting request 1030935 from home:bnavigator:branches:devel:languages:python
- Update to 0.18.0
  * New features:
    + Support for EdDSA (Ed25519, Ed448) signature creation and
      verification.
    + Support for Ed25519 and Ed448 in PKCS#8 and public key files.
    + Support for point precomputation for EdDSA.
  * New API:
    + CurveEdTw class to represent the Twisted Edwards curve
      parameters.
    + PointEdwards class to represent points on Twisted Edwards
      curve and provide point arithmetic on it.
    + curve_by_name in curves module to get a Curve object by
      providing curve name.
  * Bug fix:
    + Accept private EdDSA keys that include public key in the
      ASN.1 structure.
    + Fix incompatibility with Python 3.3 in handling of
      memoryviews of empty strings.
    + Make the VerifyingKey encoded with explicit parameters use
      the same kind of point encoding for public key and curve
      generator.
    + Better handling of malformed curve parameters (as in
      CVE-2022-0778); make python-ecdsa raise MalformedPointError
      instead of AssertionError.

OBS-URL: https://build.opensuse.org/request/show/1030935
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-ecdsa?expand=0&rev=30
2022-10-25 05:27:10 +00:00

75 lines
2.5 KiB
RPMSpec

#
# spec file for package python-ecdsa
#
# Copyright (c) 2022 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.18.0
Release: 0
Summary: ECDSA cryptographic signature library (pure python)
License: MIT
URL: https://github.com/tlsfuzzer/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 >= 1.9.0
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
# unfortunate hypothesis fuzzing (gh#warner/python-ecdsa#307):
donttest="(test_ecdsa and test_sig_verify)"
donttest="$donttest or (test_jacobi and test_add and scale_points)"
donttest="$donttest or (test_ellipticcurve and test_p192_mult_tests)"
%pytest -k "not ($donttest)"
%files %{python_files}
%license LICENSE
%doc NEWS README.md
%{python_sitelib}/ecdsa
%{python_sitelib}/ecdsa-%{version}*-info
%changelog