2023-07-17 15:46:13 +00:00
|
|
|
%global oqs_version 0.8.0
|
|
|
|
Name: liboqs
|
|
|
|
Version: %{oqs_version}
|
2023-07-20 11:41:52 +00:00
|
|
|
Release: 2%{?dist}
|
2023-07-17 15:46:13 +00:00
|
|
|
Summary: liboqs is an open source C library for quantum-safe cryptographic algorithms.
|
|
|
|
|
|
|
|
#liboqs uses MIT license by itself but includes several files licensed under different terms.
|
|
|
|
#src/common/crypto/sha3/xkcp_low/.../KeccakP-1600-AVX2.s : BSD-like CRYPTOGAMS license
|
|
|
|
#src/common/rand/rand_nist.c: See file
|
|
|
|
#see https://github.com/open-quantum-safe/liboqs/blob/main/README.md#license for more details
|
|
|
|
License: MIT AND Apache 2.0 AND BSD 3-Clause AND (BSD-3-Clause OR GPL-1.0-or-later) AND CC0-1.0 AND Unlicense
|
|
|
|
URL: https://github.com/open-quantum-safe/liboqs.git
|
|
|
|
Source: https://github.com/open-quantum-safe/liboqs/archive/refs/tags/0.8.0.tar.gz
|
|
|
|
#Source: liboqs-0.8.0-dev.tar.gz
|
|
|
|
|
|
|
|
BuildRequires: ninja-build
|
|
|
|
BuildRequires: cmake
|
|
|
|
BuildRequires: gcc
|
|
|
|
BuildRequires: astyle
|
|
|
|
BuildRequires: openssl-devel
|
|
|
|
BuildRequires: python3-pytest
|
|
|
|
BuildRequires: python3-pytest-xdist
|
|
|
|
BuildRequires: unzip
|
|
|
|
BuildRequires: xsltproc
|
|
|
|
#BuildRequires: doxygen
|
|
|
|
BuildRequires: graphviz
|
|
|
|
BuildRequires: python3-yaml
|
|
|
|
BuildRequires: valgrind
|
|
|
|
|
|
|
|
%description
|
|
|
|
liboqs provides:
|
|
|
|
- a collection of open source implementations of quantum-safe key encapsulation mechanism (KEM) and digital signature algorithms; the full list can be found below
|
|
|
|
- a common API for these algorithms
|
|
|
|
- a test harness and benchmarking routines
|
|
|
|
liboqs is part of the Open Quantum Safe (OQS) project led by Douglas Stebila and Michele Mosca, which aims to develop and integrate into applications quantum-safe cryptography to facilitate deployment and testing in real world contexts. In particular, OQS provides prototype integrations of liboqs into TLS and SSH, through OpenSSL and OpenSSH.
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
Summary: Development libraries for liboqs
|
|
|
|
Requires: liboqs%{?_isa} = %{version}-%{release}
|
|
|
|
|
|
|
|
%description devel
|
|
|
|
Header and Library files for doing development with liboqs.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -T -b 0 -q -n liboqs-%{oqs_version}
|
|
|
|
%autopatch -p1
|
|
|
|
#hobble
|
|
|
|
rm -rf src/kem/bike
|
|
|
|
rm -rf src/kem/bike/additional_r4
|
|
|
|
rm -rf src/kem/classic_mceliece
|
|
|
|
rm -rf src/kem/frodokem
|
|
|
|
rm -rf src/kem/hqc
|
|
|
|
rm -rf src/kem/ntruprime
|
|
|
|
#CC0-licensed code, we don't have exception for it - need to check later
|
|
|
|
rm -rf /src/sig/sphincs/pqclean_sphincs-sha2-128f-simple_avx2/
|
|
|
|
rm -rf /src/sig/sphincs/pqclean_sphincs-sha2-128s-simple_avx2/
|
|
|
|
rm -rf /src/sig/sphincs/pqclean_sphincs-sha2-192f-simple_avx2/
|
|
|
|
rm -rf /src/sig/sphincs/pqclean_sphincs-sha2-192s-simple_avx2/
|
|
|
|
rm -rf /src/sig/sphincs/pqclean_sphincs-sha2-256f-simple_avx2/
|
|
|
|
rm -rf /src/sig/sphincs/pqclean_sphincs-sha2-256s-simple_avx2/
|
|
|
|
rm -rf /src/sig/sphincs/pqclean_sphincs-shake-128f-simple_avx2/
|
|
|
|
rm -rf /src/sig/sphincs/pqclean_sphincs-shake-128s-simple_avx2/
|
|
|
|
rm -rf /src/sig/sphincs/pqclean_sphincs-shake-192f-simple_avx2/
|
|
|
|
rm -rf /src/sig/sphincs/pqclean_sphincs-shake-192s-simple_avx2/
|
|
|
|
rm -rf /src/sig/sphincs/pqclean_sphincs-shake-256f-simple_avx2/
|
|
|
|
rm -rf /src/sig/sphincs/pqclean_sphincs-shake-256s-simple_avx2/
|
|
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
%cmake -GNinja -DBUILD_SHARED_LIBS=ON -DOQS_USE_AES_OPENSSL=ON -DOQS_USE_AES_INSTRUCTIONS=OFF -DOQS_DIST_BUILD=ON -DOQS_ALGS_ENABLED=STD -DOQS_USE_SHA3_OPENSSL=ON -DCMAKE_BUILD_TYPE=Debug -LAH ..
|
|
|
|
%cmake_build
|
|
|
|
#ninja gen_docs
|
|
|
|
|
|
|
|
%check
|
|
|
|
#TODO tests
|
|
|
|
cd "%{_vpath_builddir}"
|
|
|
|
ninja run_tests
|
|
|
|
|
|
|
|
%install
|
|
|
|
%cmake_install
|
|
|
|
for i in liboqsTargets.cmake liboqsTargets-debug.cmake
|
|
|
|
do
|
|
|
|
cp $RPM_BUILD_ROOT/%{_libdir}/cmake/liboqs/$i /tmp/$i
|
|
|
|
sed -e "s;$RPM_BUILD_ROOT;;g" /tmp/$i > $RPM_BUILD_ROOT/%{_libdir}/cmake/liboqs/$i
|
|
|
|
rm /tmp/$i
|
|
|
|
done
|
|
|
|
|
|
|
|
%files
|
|
|
|
%license LICENSE.txt
|
|
|
|
%{_libdir}/liboqs.so.%{oqs_version}
|
|
|
|
%{_libdir}/liboqs.so.3
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
%{_libdir}/liboqs.so
|
|
|
|
%dir %{_includedir}/oqs
|
|
|
|
%{_includedir}/oqs/*
|
|
|
|
%dir %{_libdir}/cmake/liboqs
|
|
|
|
%{_libdir}/cmake/liboqs/liboqsTargets.cmake
|
|
|
|
%{_libdir}/cmake/liboqs/liboqsTargets-debug.cmake
|
|
|
|
%{_libdir}/cmake/liboqs/liboqsConfig.cmake
|
|
|
|
%{_libdir}/cmake/liboqs/liboqsConfigVersion.cmake
|
|
|
|
%{_libdir}/pkgconfig/liboqs.pc
|
|
|
|
#%dir %%{_datadir}/doc/oqs
|
|
|
|
#%doc %%{_datadir}/doc/oqs/html/*
|
|
|
|
#%doc %%{_datadir}/doc/oqs/xml/*
|
|
|
|
|
|
|
|
%changelog
|
2023-07-20 11:41:52 +00:00
|
|
|
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.0-2
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
|
|
|
|
2023-07-17 15:46:13 +00:00
|
|
|
* Mon Feb 13 2023 Dmitry Belyavskiy - 0.8.0-1
|
|
|
|
- Initial build of liboqs for Fedora
|
|
|
|
|