|
|
db4bc9 |
%global srcname pycryptodomex
|
|
|
db4bc9 |
%global _description %{expand:PyCryptodome is a self-contained Python package of low-level cryptographic
|
|
|
db4bc9 |
primitives. It's a fork of PyCrypto. It brings several enhancements with respect
|
|
|
db4bc9 |
to the last official version of PyCrypto (2.6.1), for instance:
|
|
|
db4bc9 |
|
|
|
db4bc9 |
* Authenticated encryption modes (GCM, CCM, EAX, SIV, OCB)
|
|
|
db4bc9 |
* Accelerated AES on Intel platforms via AES-NI
|
|
|
db4bc9 |
* Elliptic curves cryptography (NIST P-256 curve only)
|
|
|
db4bc9 |
* Better and more compact API (nonce and iv attributes for ciphers, automatic
|
|
|
db4bc9 |
generation of random nonces and IVs, simplified CTR cipher mode, and more)
|
|
|
db4bc9 |
* SHA-3 (including SHAKE XOFs) and BLAKE2 hash algorithms
|
|
|
db4bc9 |
* Salsa20 and ChaCha20 stream ciphers
|
|
|
db4bc9 |
* scrypt and HKDF
|
|
|
db4bc9 |
* Deterministic (EC)DSA
|
|
|
db4bc9 |
* Password-protected PKCS#8 key containers
|
|
|
db4bc9 |
* Shamir's Secret Sharing scheme
|
|
|
db4bc9 |
* Random numbers get sourced directly from the OS (and not from a CSPRNG in
|
|
|
db4bc9 |
userspace)
|
|
|
db4bc9 |
* Cleaner RSA and DSA key generation (largely based on FIPS 186-4)
|
|
|
db4bc9 |
* Major clean ups and simplification of the code base
|
|
|
db4bc9 |
|
|
|
db4bc9 |
PyCryptodome is not a wrapper to a separate C library like OpenSSL. To the
|
|
|
db4bc9 |
largest possible extent, algorithms are implemented in pure Python. Only the
|
|
|
db4bc9 |
pieces that are extremely critical to performance (e.g. block ciphers) are
|
|
|
db4bc9 |
implemented as C extensions.
|
|
|
db4bc9 |
|
|
|
db4bc9 |
Note: all modules are installed under the Cryptodome package to avoid conflicts
|
|
|
db4bc9 |
with the PyCrypto library.}
|
|
|
db4bc9 |
|
|
|
db4bc9 |
Name: python-%{srcname}
|
|
|
db4bc9 |
Version: 3.10.1
|
|
|
db4bc9 |
Release: 1%{?dist}
|
|
|
db4bc9 |
Summary: A self-contained cryptographic library for Python
|
|
|
db4bc9 |
|
|
|
db4bc9 |
# PyCrypto-based code is public domain, further PyCryptodome contributions are
|
|
|
db4bc9 |
# BSD
|
|
|
db4bc9 |
License: BSD and Public Domain
|
|
|
db4bc9 |
URL: http://www.pycryptodome.org/
|
|
|
db4bc9 |
Source0: https://github.com/Legrandin/pycryptodome/archive/v%{version}/%{srcname}-%{version}.tar.gz
|
|
|
db4bc9 |
# Use external libtomcrypt library
|
|
|
db4bc9 |
Patch0: %{name}-3.10.1-use_external_libtomcrypt.patch
|
|
|
db4bc9 |
|
|
|
db4bc9 |
BuildRequires: make
|
|
|
db4bc9 |
BuildRequires: gcc
|
|
|
db4bc9 |
BuildRequires: libtomcrypt-devel
|
|
|
db4bc9 |
BuildRequires: python3-devel
|
|
|
db4bc9 |
BuildRequires: python3dist(setuptools)
|
|
|
db4bc9 |
# Needed for documentation
|
|
|
db4bc9 |
BuildRequires: python3dist(sphinx)
|
|
|
db4bc9 |
|
|
|
db4bc9 |
%description
|
|
|
db4bc9 |
%{_description}
|
|
|
db4bc9 |
|
|
|
db4bc9 |
|
|
|
db4bc9 |
%package -n python3-%{srcname}
|
|
|
db4bc9 |
Summary: %{summary}
|
|
|
db4bc9 |
# GMP library is dl-opened
|
|
|
db4bc9 |
Requires: gmp%{?_isa}
|
|
|
db4bc9 |
%py_provides python3-%{srcname}
|
|
|
db4bc9 |
|
|
|
db4bc9 |
%description -n python3-%{srcname}
|
|
|
db4bc9 |
%{_description}
|
|
|
db4bc9 |
|
|
|
db4bc9 |
|
|
|
db4bc9 |
%package -n python3-%{srcname}-selftest
|
|
|
db4bc9 |
Summary: PyCryptodome test suite module
|
|
|
db4bc9 |
Requires: python3-%{srcname}%{?_isa}
|
|
|
db4bc9 |
%py_provides python3-%{srcname}-selftest
|
|
|
db4bc9 |
|
|
|
db4bc9 |
%description -n python3-%{srcname}-selftest
|
|
|
db4bc9 |
%{_description}
|
|
|
db4bc9 |
|
|
|
db4bc9 |
This package provides the PyCryptodome test suite module (Cryptodome.SelfTest).
|
|
|
db4bc9 |
|
|
|
db4bc9 |
|
|
|
db4bc9 |
%prep
|
|
|
db4bc9 |
%autosetup -n pycryptodome-%{version} -p0
|
|
|
db4bc9 |
|
|
|
db4bc9 |
# Drop bundled libraries
|
|
|
db4bc9 |
rm -r src/libtom/
|
|
|
db4bc9 |
|
|
|
db4bc9 |
# Remove shebang
|
|
|
db4bc9 |
sed '1{\@^#! /usr/bin/env python@d}' lib/Crypto/SelfTest/__main__.py >lib/Crypto/SelfTest/__main__.py.new && \
|
|
|
db4bc9 |
touch -r lib/Crypto/SelfTest/__main__.py lib/Crypto/SelfTest/__main__.py.new && \
|
|
|
db4bc9 |
mv lib/Crypto/SelfTest/__main__.py.new lib/Crypto/SelfTest/__main__.py
|
|
|
db4bc9 |
|
|
|
db4bc9 |
|
|
|
db4bc9 |
%build
|
|
|
db4bc9 |
touch .separate_namespace
|
|
|
db4bc9 |
%py3_build
|
|
|
db4bc9 |
|
|
|
db4bc9 |
# Build documentation
|
|
|
db4bc9 |
%make_build -C Doc/ man SPHINXBUILD=sphinx-build
|
|
|
db4bc9 |
|
|
|
db4bc9 |
|
|
|
db4bc9 |
%install
|
|
|
db4bc9 |
%py3_install
|
|
|
db4bc9 |
|
|
|
db4bc9 |
|
|
|
db4bc9 |
# Install man pages
|
|
|
db4bc9 |
install -Dpm 0644 Doc/_build/man/pycryptodome.1 $RPM_BUILD_ROOT%{_mandir}/man1/pycryptodome.1
|
|
|
db4bc9 |
|
|
|
db4bc9 |
|
|
|
db4bc9 |
%check
|
|
|
db4bc9 |
PYTHONPATH=$RPM_BUILD_ROOT%{python3_sitearch}/ %{__python3} setup.py test
|
|
|
db4bc9 |
|
|
|
db4bc9 |
|
|
|
db4bc9 |
%files -n python3-%{srcname}
|
|
|
db4bc9 |
%doc AUTHORS.rst Changelog.rst README.rst
|
|
|
db4bc9 |
%license LICENSE.rst
|
|
|
db4bc9 |
%{python3_sitearch}/Cryptodome/
|
|
|
db4bc9 |
%exclude %{python3_sitearch}/Cryptodome/SelfTest/
|
|
|
db4bc9 |
%{python3_sitearch}/%{srcname}-*.egg-info/
|
|
|
db4bc9 |
%{_mandir}/man1/pycryptodome.1.*
|
|
|
db4bc9 |
|
|
|
db4bc9 |
|
|
|
db4bc9 |
%files -n python3-%{srcname}-selftest
|
|
|
db4bc9 |
%{python3_sitearch}/Cryptodome/SelfTest/
|
|
|
db4bc9 |
|
|
|
db4bc9 |
|
|
|
db4bc9 |
%changelog
|
|
|
db4bc9 |
* Tue Feb 09 2021 Mohamed El Morabity <melmorabity@fedoraproject.org> - 3.10.1-1
|
|
|
db4bc9 |
- Update to 3.10.1
|
|
|
db4bc9 |
|
|
|
db4bc9 |
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.9.8-3
|
|
|
db4bc9 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
|
|
db4bc9 |
|
|
|
db4bc9 |
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.9.8-2
|
|
|
db4bc9 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
|
|
db4bc9 |
|
|
|
db4bc9 |
* Tue Jul 07 2020 Mohamed El Morabity <melmorabity@fedoraproject.org> - 3.9.8-1
|
|
|
db4bc9 |
- Update to 3.9.8
|
|
|
db4bc9 |
|
|
|
db4bc9 |
* Fri Jun 05 2020 Miro Hrončok <mhroncok@redhat.com> - 3.9.7-3
|
|
|
db4bc9 |
- Drop python2-pycryptodomex (#1785783)
|
|
|
db4bc9 |
|
|
|
db4bc9 |
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 3.9.7-2
|
|
|
db4bc9 |
- Rebuilt for Python 3.9
|
|
|
db4bc9 |
|
|
|
db4bc9 |
* Fri Feb 21 2020 Mohamed El Morabity <melmorabity@fedoraproject.org> - 3.9.7-1
|
|
|
db4bc9 |
- Update to 3.9.7
|
|
|
db4bc9 |
|
|
|
db4bc9 |
* Mon Feb 17 2020 Mohamed El Morabity <melmorabity@fedoraproject.org> - 3.9.6-2
|
|
|
db4bc9 |
- Move test suite module to a separate package (RHBZ #1802989)
|
|
|
db4bc9 |
|
|
|
db4bc9 |
* Mon Feb 03 2020 Mohamed El Morabity <melmorabity@fedoraproject.org> - 3.9.6-1
|
|
|
db4bc9 |
- Update to 3.9.6
|
|
|
db4bc9 |
|
|
|
db4bc9 |
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.9.4-2
|
|
|
db4bc9 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
|
|
db4bc9 |
|
|
|
db4bc9 |
* Tue Nov 19 2019 Mohamed El Morabity <melmorabity@fedoraproject.org> - 3.9.4-1
|
|
|
db4bc9 |
- Update to 3.9.4
|
|
|
db4bc9 |
|
|
|
db4bc9 |
* Fri Nov 15 2019 Mohamed El Morabity <melmorabity@fedoraproject.org> - 3.9.3-1
|
|
|
db4bc9 |
- Update to 3.9.3
|
|
|
db4bc9 |
|
|
|
db4bc9 |
* Fri Nov 15 2019 Mohamed El Morabity <melmorabity@fedoraproject.org> - 3.9.2-1
|
|
|
db4bc9 |
- Update to 3.9.2
|
|
|
db4bc9 |
- Spec cleanup
|
|
|
db4bc9 |
|
|
|
db4bc9 |
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 3.9.0-2
|
|
|
db4bc9 |
- Rebuilt for Python 3.8.0rc1 (#1748018)
|
|
|
db4bc9 |
|
|
|
db4bc9 |
* Wed Aug 28 2019 Mohamed El Morabity <melmorabity@fedoraproject.org> - 3.9.0-1
|
|
|
db4bc9 |
- Update to 3.9.0
|
|
|
db4bc9 |
|
|
|
db4bc9 |
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 3.8.2-2
|
|
|
db4bc9 |
- Rebuilt for Python 3.8
|
|
|
db4bc9 |
|
|
|
db4bc9 |
* Fri Aug 09 2019 Mohamed El Morabity <melmorabity@fedoraproject.org> - 3.8.2-1
|
|
|
db4bc9 |
- Update to 3.8.2
|
|
|
db4bc9 |
|
|
|
db4bc9 |
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.8.1-3
|
|
|
db4bc9 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
|
|
db4bc9 |
|
|
|
db4bc9 |
* Tue Apr 09 2019 Miro Hrončok <mhroncok@redhat.com> - 3.8.1-2
|
|
|
db4bc9 |
- Readd python2-pycryptodomex (#1672052)
|
|
|
db4bc9 |
|
|
|
db4bc9 |
* Fri Apr 05 2019 Mohamed El Morabity <melmorabity@fedoraproject.org> - 3.8.1-1
|
|
|
db4bc9 |
- Update to 3.8.1
|
|
|
db4bc9 |
|
|
|
db4bc9 |
* Fri Mar 29 2019 Mohamed El Morabity <melmorabity@fedoraproject.org> - 3.8.0-1
|
|
|
db4bc9 |
- Update to 3.8.0
|
|
|
db4bc9 |
|
|
|
db4bc9 |
* Fri Feb 15 2019 Mohamed El Morabity <melmorabity@fedoraproject.org> - 3.7.3-1
|
|
|
db4bc9 |
- Update to 3.7.3
|
|
|
db4bc9 |
|
|
|
db4bc9 |
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.7.0-2
|
|
|
db4bc9 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
|
|
db4bc9 |
|
|
|
db4bc9 |
* Mon Nov 19 2018 Mohamed El Morabity <melmorabity@fedoraproject.org> - 3.7.0-1
|
|
|
db4bc9 |
- Update to 3.7.0
|
|
|
db4bc9 |
- Use the same .spec file for all supported releases of Fedora and EL
|