From 9d1fb9d448873dfd366e36e5af5e2b86f99d967640d0e22bf83a8ae0a8033fd2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= <tchvatal@suse.com>
Date: Tue, 3 Jul 2018 13:27:33 +0000
Subject: [PATCH] Accepting request 620465 from home:frispete:python

- Update to 3.6.3 (21 June 2018)
  - Resolved issues
    * GH#175: Fixed incorrect results for CTR encryption/decryption
      with more than 8 blocks.
- Update to 3.6.2 (19 June 2018)
  - New features
    * ChaCha20 accepts 96 bit nonces (in addition to 64 bit nonces)
      as defined in RFC7539.
    * Accelerate AES-GCM on x86 using PCLMULQDQ instruction.
    * Accelerate AES-ECB and AES-CTR on x86 by pipelining AESNI
      instructions.
    * As result of the two improvements above, on x86 (Broadwell):
      - AES-ECB and AES-CTR are 3x faster
      - AES-GCM is 9x faster
  - Resolved issues
    * On Windows, MPIR library was stilled pulled in if renamed to
      ``gmp.dll``.
  - Breaks in compatibility
    * In ``Crypto.Util.number``, functions ``floor_div`` and
      ``exact_div`` have been removed. Also, ``ceil_div`` is limited
      to non-negative terms only.
- suggesting libgmp10 and python-cffi
- add license file tag


- version 3.6.3: new build derived from python-pycryptodome 3.6.3

OBS-URL: https://build.opensuse.org/request/show/620465
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pycryptodome?expand=0&rev=12
---
 pycryptodome-3.6.1.tar.gz    |  3 --
 pycryptodome-3.6.3.tar.gz    |  3 ++
 python-pycryptodome.changes  | 31 ++++++++++++
 python-pycryptodome.spec     | 36 +++++++------
 python-pycryptodomex.changes |  5 ++
 python-pycryptodomex.spec    | 98 ++++++++++++++++++++++++++++++++++++
 6 files changed, 158 insertions(+), 18 deletions(-)
 delete mode 100644 pycryptodome-3.6.1.tar.gz
 create mode 100644 pycryptodome-3.6.3.tar.gz
 create mode 100644 python-pycryptodomex.changes
 create mode 100644 python-pycryptodomex.spec

diff --git a/pycryptodome-3.6.1.tar.gz b/pycryptodome-3.6.1.tar.gz
deleted file mode 100644
index cec57b1..0000000
--- a/pycryptodome-3.6.1.tar.gz
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:15013007e393d0cc0e69f4329a47c4c8597b7f3d02c12c03f805405542f70c71
-size 7167199
diff --git a/pycryptodome-3.6.3.tar.gz b/pycryptodome-3.6.3.tar.gz
new file mode 100644
index 0000000..e3fd335
--- /dev/null
+++ b/pycryptodome-3.6.3.tar.gz
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:9b2e142322273ee88c96ade5cfc0ff99b759be32a06d49ce55cd39adeb1e4541
+size 7137049
diff --git a/python-pycryptodome.changes b/python-pycryptodome.changes
index 47d113e..273acbb 100644
--- a/python-pycryptodome.changes
+++ b/python-pycryptodome.changes
@@ -1,3 +1,34 @@
+-------------------------------------------------------------------
+Tue Jul  3 10:17:10 UTC 2018 - hpj@urpla.net
+
+- Update to 3.6.3 (21 June 2018)
+  - Resolved issues
+    * GH#175: Fixed incorrect results for CTR encryption/decryption
+      with more than 8 blocks.
+
+- Update to 3.6.2 (19 June 2018)
+  - New features
+    * ChaCha20 accepts 96 bit nonces (in addition to 64 bit nonces)
+      as defined in RFC7539.
+    * Accelerate AES-GCM on x86 using PCLMULQDQ instruction.
+    * Accelerate AES-ECB and AES-CTR on x86 by pipelining AESNI
+      instructions.
+    * As result of the two improvements above, on x86 (Broadwell):
+      - AES-ECB and AES-CTR are 3x faster
+      - AES-GCM is 9x faster
+
+  - Resolved issues
+    * On Windows, MPIR library was stilled pulled in if renamed to
+      ``gmp.dll``.
+
+  - Breaks in compatibility
+    * In ``Crypto.Util.number``, functions ``floor_div`` and
+      ``exact_div`` have been removed. Also, ``ceil_div`` is limited
+      to non-negative terms only.
+
+- suggesting libgmp10 and python-cffi
+- add license file tag
+
 -------------------------------------------------------------------
 Wed May 16 12:26:23 UTC 2018 - tchvatal@suse.com
 
diff --git a/python-pycryptodome.spec b/python-pycryptodome.spec
index 2cb3540..9e74d23 100644
--- a/python-pycryptodome.spec
+++ b/python-pycryptodome.spec
@@ -20,13 +20,13 @@
 %bcond_without test
 %define oldpython python
 Name:           python-pycryptodome
-Version:        3.6.1
+Version:        3.6.3
 Release:        0
 Summary:        Cryptographic library for Python
 License:        BSD-2-Clause
 Group:          Development/Languages/Python
-Url:            http://www.pycryptodome.org
-Source:         https://files.pythonhosted.org/packages/source/p/pycryptodome/pycryptodome-%{version}.tar.gz
+Url:            https://www.pycryptodome.org
+Source:         https://pypi.io/packages/source/p/pycryptodome/pycryptodome-%{version}.tar.gz
 BuildRequires:  %{python_module devel}
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  fdupes
@@ -37,6 +37,10 @@ Obsoletes:      python-pycrypto < %{version}
 Provides:       %{oldpython}-pycrypto = %{version}
 Obsoletes:      %{oldpython}-pycrypto < %{version}
 %endif
+# PyCryptodome uses gmp via cffi as runtime optimization
+# would be better, if libgmp* would provide gmp
+Suggests:       libgmp10
+Suggests:       python-cffi
 
 %python_subpackages
 
@@ -44,32 +48,34 @@ Obsoletes:      %{oldpython}-pycrypto < %{version}
 PyCryptodome is a self-contained Python package of low-level
 cryptographic primitives.
 
-PyCryptodome is a fork of PyCrypto. It brings several enhancements
-with respect to the last official version of PyCrypto (2.6.1),
-for instance:
+PyCryptodome is a fork of PyCrypto, residing in the `Crypto` 
+namespace for better drop-in compatibility, while it brings several
+enhancements with respect to the last official version of PyCrypto
+(2.6.1), for instance:
 
 * Authenticated encryption modes (GCM, CCM, EAX, SIV, OCB)
 * Accelerated AES on Intel platforms via AES-NI
 * First class support for PyPy
 * Elliptic curves cryptography (NIST P-256 curve only)
-* Better and more compact API (`nonce` and `iv` attributes for ciphers,
-  automatic generation of random nonces and IVs, simplified CTR cipher mode,
-  and more)
+* Better and more compact API (`nonce` and `iv` attributes for
+  ciphers, automatic generation of random nonces and IVs, simplified
+  CTR cipher mode, and more)
 * SHA-3 (including SHAKE XOFs) and BLAKE2 hash algorithms
 * Salsa20 and ChaCha20 stream ciphers
 * scrypt and HKDF
 * Deterministic (EC)DSA
 * Password-protected PKCS#8 key containers
 * Shamir's Secret Sharing scheme
-* Random numbers get sourced directly from the OS (and not from a CSPRNG in userspace)
+* Random numbers get sourced directly from the OS (and not from a
+  CSPRNG in userspace)
 * Simplified install process, including better support for Windows
 * Cleaner RSA and DSA key generation (largely based on FIPS 186-4)
 * Major clean ups and simplification of the code base
 
 PyCryptodome is not a wrapper to a separate C library like *OpenSSL*.
-To the largest possible extent, algorithms are implemented in pure Python.
-Only the pieces that are extremely critical to performance (e.g. block ciphers)
-are implemented as C extensions.
+To the largest possible extent, algorithms are implemented in pure
+Python. Only the pieces that are extremely critical to performance
+(e.g. block ciphers) are implemented as C extensions.
 
 %prep
 %setup -q -n pycryptodome-%{version}
@@ -88,8 +94,8 @@ export CFLAGS="%{optflags}"
 %endif
 
 %files %{python_files}
-%defattr(-,root,root,-)
-%doc AUTHORS.rst Changelog.rst LICENSE.rst README.rst
+%license LICENSE.rst
+%doc AUTHORS.rst Changelog.rst README.rst
 %{python_sitearch}/*
 
 %changelog
diff --git a/python-pycryptodomex.changes b/python-pycryptodomex.changes
new file mode 100644
index 0000000..9473512
--- /dev/null
+++ b/python-pycryptodomex.changes
@@ -0,0 +1,5 @@
+-------------------------------------------------------------------
+Tue Jul  3 12:47:58 UTC 2018 - hpj@urpla.net
+
+- version 3.6.3: new build derived from python-pycryptodome 3.6.3
+
diff --git a/python-pycryptodomex.spec b/python-pycryptodomex.spec
new file mode 100644
index 0000000..2aff1fb
--- /dev/null
+++ b/python-pycryptodomex.spec
@@ -0,0 +1,98 @@
+#
+# spec file for package python-pycryptodomex
+#
+# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+#
+# 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 http://bugs.opensuse.org/
+#
+
+
+%{?!python_module:%define python_module() python-%{**} python3-%{**}}
+%bcond_without test
+%global modname pycryptodomex
+%define oldpython python
+Name:           python-pycryptodomex
+Version:        3.6.3
+Release:        0
+Summary:        Cryptographic library for Python
+License:        BSD-2-Clause
+Group:          Development/Languages/Python
+Url:            https://www.pycryptodome.org
+Source:         https://pypi.io/packages/source/p/pycryptodome/pycryptodome-%{version}.tar.gz
+BuildRequires:  %{python_module devel}
+BuildRequires:  %{python_module setuptools}
+BuildRequires:  fdupes
+BuildRequires:  python-rpm-macros
+# PyCryptodome uses gmp via cffi as runtime optimization
+# would be better, if libgmp* would provide gmp
+Suggests:       libgmp10
+Suggests:       python-cffi
+
+%python_subpackages
+
+%description
+PyCryptodomex is a self-contained Python package of low-level
+cryptographic primitives.
+
+Unlike PyCryptodome, it resides in its own namespace `Cryptodome`.
+
+PyCryptodome is a fork of PyCrypto. It brings several enhancements
+with respect to the last official version of PyCrypto (2.6.1),
+for instance:
+
+* Authenticated encryption modes (GCM, CCM, EAX, SIV, OCB)
+* Accelerated AES on Intel platforms via AES-NI
+* First class support for PyPy
+* Elliptic curves cryptography (NIST P-256 curve only)
+* Better and more compact API (`nonce` and `iv` attributes for
+  ciphers, automatic generation of random nonces and IVs, simplified
+  CTR cipher mode, and more)
+* SHA-3 (including SHAKE XOFs) and BLAKE2 hash algorithms
+* Salsa20 and ChaCha20 stream ciphers
+* scrypt and HKDF
+* Deterministic (EC)DSA
+* Password-protected PKCS#8 key containers
+* Shamir's Secret Sharing scheme
+* Random numbers get sourced directly from the OS (and not from a
+  CSPRNG in userspace)
+* Simplified install process, including better support for Windows
+* Cleaner RSA and DSA key generation (largely based on FIPS 186-4)
+* Major clean ups and simplification of the code base
+
+PyCryptodome is not a wrapper to a separate C library like *OpenSSL*.
+To the largest possible extent, algorithms are implemented in pure
+Python. Only the pieces that are extremely critical to performance
+(e.g. block ciphers) are implemented as C extensions.
+
+%prep
+%setup -q -n pycryptodome-%{version}
+touch .separate_namespace
+
+%build
+export CFLAGS="%{optflags}"
+%python_build
+
+%install
+%python_install
+%python_expand %fdupes %{buildroot}%{$python_sitearch}
+
+%if %{with test}
+%check
+%python_exec setup.py test
+%endif
+
+%files %{python_files}
+%license LICENSE.rst
+%doc AUTHORS.rst Changelog.rst README.rst
+%{python_sitearch}/*
+
+%changelog