Sisyphus repository
Last update: 21 october 2021 | SRPMs: 17367 | Visits: 22128227
en ru br
ALT Linux repos
S:0.7.0-alt2

Group :: System/Libraries
RPM: liboqs

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

# SPDX-License-Identifier: GPL-2.0-only
%define _unpackaged_files_terminate_build 1
%define _stripped_files_terminate_build 1

Name: liboqs
Version: 0.7.0
Release: alt2
Summary: C library for prototyping and experimenting with quantum-resistant cryptography
License: MIT
Group: System/Libraries
Url: https://openquantumsafe.org/liboqs/
Vcs: https://github.com/open-quantum-safe/liboqs/
# NIST: https://csrc.nist.gov/Projects/post-quantum-cryptography/

Source: %name-%version.tar
BuildRequires(pre): rpm-macros-cmake
BuildRequires(pre): rpm-macros-ninja-build
BuildRequires: astyle
BuildRequires: banner
BuildRequires: cmake
BuildRequires: libssl-devel
BuildRequires: ninja-build
BuildRequires: python3-module-pyaml
BuildRequires: python3-module-pytest
BuildRequires: python3-module-pytest-xdist

%description
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.

Supported key encapsulation mechanisms (KEMs): BIKE, Classic McEliece,
 FrodoKEM, HQC, Kyber, NTRU, NTRU-Prime, SABER, SIKE.

Supported signature schemes: Dilithium, Falcon, Picnic, Rainbow,
 SPHINCS+.

Warning: WE DO NOT CURRENTLY RECOMMEND RELYING ON THIS LIBRARY IN A
PRODUCTION ENVIRONMENT OR TO PROTECT ANY SENSITIVE DATA. This library is
meant to help with research and prototyping. While we make a best-effort
approach to avoid security bugs, this library has not received the level
of auditing and analysis that would be necessary to rely on it for high
security use. See Limitations and Security in README.md.

%package devel
Summary: %summary
Group: Development/C
Requires: %name = %EVR

%description devel
Development files for %name.

%prep
%setup
sed -i '\!DESTINATION!s!lib!%_libdir!' src/CMakeLists.txt
# Add armh to the list of supported arm32 arches.
sed -i '/CMAKE_SYSTEM_PROCESSOR.*armhf/s/")/|armv8l&/' CMakeLists.txt

%build
# CMake options https://github.com/open-quantum-safe/liboqs/wiki/Customizing-liboqs
# -DOQS_ENABLE_TEST_CONSTANT_TIME=ON -- does not pass.
%cmake -B build \
-GNinja \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DBUILD_SHARED_LIBS=ON \
-DOQS_DIST_BUILD=ON \
-DOQS_OPT_TARGET=generic
%ninja_build -C build

%install
%ninja_install -C build

%check
banner tests
# Tests require lowercase 'build' dir.
export LD_LIBRARY_PATH=$PWD/build/lib
# https://github.com/open-quantum-safe/liboqs/wiki/Minimal-example-of-a-post-quantum-signature
 cc -Ibuild/include -Lbuild/lib tests/example_sig.c -o example_sig -loqs
 ./example_sig
# https://github.com/open-quantum-safe/liboqs/wiki/Minimal-example-of-a-post-quantum-KEM
 cc -Ibuild/include -Lbuild/lib tests/example_kem.c -o example_kem -loqs
 ./example_kem
%ninja_build -C build run_tests

%files
%doc LICENSE.txt README.md RELEASE.md
%_libdir/liboqs.so.*

%files devel
%doc LICENSE.txt README.md RELEASE.md
%_includedir/oqs
%_libdir/cmake/liboqs
%_libdir/liboqs.so

%changelog

Full changelog you can see here

 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin