File libpqcrypto.spec of Package libpqcrypto
#
# spec file for package leancrypto
#
# Copyright (c) 2017 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/
#
Name: libpqcrypto
# https://libpqcrypto.org/libpqcrypto-latest-version.txt
Version: 20180314
Release: 0
Summary: Cryptographic software library produced by the PQCRYPTO project
License: MIT
Group: Productivity/Security
Url: https://libpqcrypto.org/
Source: https://libpqcrypto.org/libpqcrypto-%version.tar.gz
Patch0: libpqcrypto-shortertimeouts.patch
Patch1: libpqcrypto-gnu-stack.patch
Patch2: libpqcrypto-generic-compiler.patch
BuildRequires: libopenssl-devel
BuildRequires: gmp-devel
BuildRequires: clang
BuildRequires: python3
%description
libpqcrypto is a new cryptographic software library produced by the PQCRYPTO project.
PQCRYPTO, working jointly with many other researchers around the world,
submitted 22 proposals to NIST's ongoing post-quantum standardization
project. Each submission specifies a family of cryptographic systems,
offering various tradeoffs between performance and security. Each
submission includes software: a (portable) reference C implementation,
and in many cases additional (not necessarily portable) implementations
providing better performance (often using assembly language or
"intrinsics"). libpqcrypto includes software for the following 77
cryptographic systems (50 signature systems and 27 encryption systems)
from 19 of the 22 PQCRYPTO submissions:
- BIG QUAKE: crypto_kem_bigquake{1,3,5}
- Classic McEliece: crypto_kem_mceliece{6960119,8192128}
- CRYSTALS-DILITHIUM: crypto_sign_dilithium{2,3,4}
- CRYSTALS-KYBER: crypto_kem_kyber{512,768,1024}
- DAGS: crypto_kem_dags{3,5}
- FrodoKEM: crypto_kem_frodokem{640,976}
- Gui: crypto_sign_gui{184,312,448}
- KINDI: crypto_kem_kindi{256342,256522,512222,512241,512321}
- LUOV: crypto_sign_luov{863256,890351,8117404,4849242,6468330,8086399}
- MQDSS: crypto_sign_mqdss{48,64}
- NewHope: crypto_kem_newhope{512,1024}cca
- NTRU-HRSS-KEM: crypto_kem_ntruhrss701
- NTRU Prime: crypto_kem_{ntrulpr,sntrup}4591761
- Picnic: crypto_sign_picnicl{1,3,5}{fs,ur}
- qTESLA: crypto_sign_qtesla{128,192,256}
- Rainbow: crypto_sign_rainbow{1a,1b,1c,3b,3c,4a,5c,6a,6b}
- Ramstake: crypto_kem_ramstakers{216091,756839}
- SABER: crypto_kem_{firesaber,lightsaber,saber}
- SPHINCS+: crypto_sign_sphincs{f,s}{128,192,256}{haraka,sha256,shake256}
libpqcrypto collects this software into an integrated library, with
- a unified compilation framework,
- an automatic test framework,
- automatic selection of the fastest implementation of each system,
- a unified C interface following the NaCl/TweetNaCl/SUPERCOP/libsodium API,
- a unified Python interface,
- command-line signature/verification/encryption/decryption tools, and
- command-line benchmarking tools.
libpqcrypto also integrates some symmetric-crypto software from
SUPERCOP, including the AES-256-CTR stream cipher (an OpenSSL wrapper
and a separate implementation from Romain Dolbeau), the Salsa20-256 and
ChaCha20-256 stream ciphers (implementations from Daniel J. Bernstein,
Romain Dolbeau, Martin Goll, Shay Gueron, Ted Krovetz, Tanja Lange, Andrew
Moon, Samuel Neves, and Peter Schwabe), the Poly1305 MAC (implementations
from Daniel J. Bernstein, Billy Brumley, Andrew Moon, and Peter Schwabe),
the SHA-512 hash function (an OpenSSL wrapper, a separate implementation
from Daniel J. Bernstein, and a separate implementation from Thomas Pornin
via sphlib), portions of the Keccak Code Package (from Guido Bertoni,
Joan Daemen, Michaƫl Peeters, Gilles Van Assche, and Ronny Van Keer),
and the SHAKE256 hash function (a KCP wrapper and implementations from
David Leon Gil). For credits regarding the public-key software, see the
individual submission packages to NIST.
Beware that the components of libpqcrypto vary in licenses. Some parts are in the public domain, but others are not.
%package -n libpqcrypto1
Summary: Cryptographic software library produced by the PQCRYPTO project
Group: System/Libraries
Provides: %{name} = %{version}-%{release}
Obsoletes: %{name} < %{version}-%{release}
%description -n libpqcrypto1
libpqcrypto is a new cryptographic software library produced by the PQCRYPTO project.
This is the shared library of the pqcrypto package.
%package devel
Summary: Cryptographic software library produced by the PQCRYPTO project
Group: Development/Languages/C and C++
Requires: libpqcrypto1 = %{version}
%description devel
libpqcrypto is a new cryptographic software library produced by the PQCRYPTO project.
This is the development package of the pqcrypto package.
#package examples
#Summary: Examples for the library produced by the PQCRYPTO project
#Group: Development/Languages/C and C++
#Requires: libpqcrypto1 = %{version}
#description examples
#libpqcrypto is a new cryptographic software library produced by the PQCRYPTO project.
#
#This packages contain example tools using the library.
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%build
./do
%install
find -ls
mkdir %buildroot/usr
mkdir %buildroot/%_libdir
mkdir %buildroot/%_libdir/%name
mv link-install/run-20180314/*/include %buildroot/usr
mv link-install/run-20180314/*/lib/0/lib* %buildroot/%_libdir
#mv link-install/run-20180314/*/command/* %buildroot/%_libdir/%name
%post -n libpqcrypto1 -p /sbin/ldconfig
%postun -n libpqcrypto1 -p /sbin/ldconfig
%files -n libpqcrypto1
%defattr(-,root,root)
/%{_libdir}/libpqcrypto.so.1
%files devel
%defattr(-,root,root)
%{_includedir}/*
/%{_libdir}/libpqcrypto.so
/%{_libdir}/libpqcrypto.a
#files examples
#defattr(-,root,root)
#dir /%{_libdir}/%name
#/%{_libdir}/%name/*
%changelog