SHA256
8
0
forked from pool/liboqs
Files
liboqs/liboqs.spec
Marcus Meissner 5ceb73367d - Updated to 0.14.0:
* Key encapsulation mechanisms:
    - HQC: Disabled compiler optimizations to avoid secret-dependent branching in certain configurations. HQC remains disabled by default.
    - ML-KEM: Updated the default ML-KEM implementation to [PQCP's mlkem-native v1.0.0](https://github.com/pq-code-package/mlkem-native/releases/tag/v1.0.0).
  * Digital signature schemes:
    - New API: added an API function to check if a signature scheme supports signing with a context string.
    - SNOVA: added [SNOVA](https://snova.pqclab.org/) from NIST Additional Signature Schemes Round 2.
  * Other changes:
     - Added an AVX512VL-optimized backend for SHA3.
     - Improved memory management throughout the codebase.
- CVE-2025-52473: Disabled compiler optimizations for HQC to avoid
  secret-dependent branches. Thank you to Zhenzhi Lai and Zhiyuan Zhang
  from from the University of Melbourne and the Max Planck Institute
  for Security and Privacy for identifying the issue. (bsc#1246301)
- new major library version liboqs.so.8

OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/liboqs?expand=0&rev=36
2025-07-10 19:46:26 +00:00

114 lines
3.3 KiB
RPMSpec

#
# spec file for package liboqs
#
# Copyright (c) 2025 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/
#
Name: liboqs
Version: 0.14.0
Release: 0
Summary: C library for quantum-resistant cryptographic algorithms
License: MIT
Group: Productivity/Security
URL: https://github.com/open-quantum-safe/liboqs/
Source: https://github.com/open-quantum-safe/liboqs/archive/refs/tags/%{version}.tar.gz
Source1: baselibs.conf
Patch0: liboqs-fix-build.patch
Patch1: liboqs-fix-prototypemismatch.patch
Patch2: reproducible.patch
BuildRequires: cmake
BuildRequires: doxygen
BuildRequires: libopenssl-devel
# for tests
BuildRequires: python3-pytest
BuildRequires: python3-PyYAML
BuildRequires: python3-pytest-xdist
%description
liboqs is a C library for quantum-resistant cryptographic algorithms.
See the bundled README.md for particular limitations on intended use.
%package -n liboqs8
Summary: C library for quantum-resistant cryptographic algorithms
Group: System/Libraries
%description -n liboqs8
liboqs is a C library for quantum-resistant cryptographic algorithms.
See the bundled README.md for particular limitations on intended use.
%package devel
Summary: Headers for liboqs, a library for quantum-resistant cryptography
Group: Development/Languages/C and C++
Requires: liboqs8 = %{version}
%description devel
liboqs is a C library for quantum-resistant cryptographic algorithms.
See the bundled README.md for particular limitations on intended use.
%prep
%autosetup -p1
%build
export RPM_OPT_FLAGS="%{optflags} -std=gnu11"
# 20220702: The %%cmake macro can't be used because a 'CMakeLists.txt' folder
# exists
cmake -S . -B build -DBUILD_SHARED_LIBS:BOOL=ON -DOQS_DIST_BUILD:BOOL=ON -DOQS_ENABLE_KEM_HQC=ON
pushd build
%cmake_build
popd
%install
%cmake_install
# need to find out what cmake option is needed
mv %{buildroot}%{_prefix}/local/* %{buildroot}%{_prefix}
#if [ "%{_lib}" != "lib" ]; then
# mv %{buildroot}%{_prefix}/lib %{buildroot}%{_libdir}
#fi
rmdir %{buildroot}%{_prefix}/local/
%check
pushd build
make run_tests
popd
%post -n liboqs8 -p /sbin/ldconfig
%postun -n liboqs8 -p /sbin/ldconfig
%files -n liboqs8
%license LICENSE.txt
%{_libdir}/liboqs.so.%version
%{_libdir}/liboqs.so.8
%doc README.md
%files devel
%license LICENSE.txt
%dir %{_includedir}/oqs
%{_includedir}/oqs/*
%{_libdir}/liboqs.so
%{_libdir}/pkgconfig/liboqs.pc
%dir %{_libdir}/cmake/
%dir %{_libdir}/cmake/liboqs/
%{_libdir}/cmake/liboqs/liboqsTargets-noconfig.cmake
%{_libdir}/cmake/liboqs/liboqsTargets.cmake
%{_libdir}/cmake/liboqs/liboqsConfig.cmake
%{_libdir}/cmake/liboqs/liboqsConfigVersion.cmake
%changelog