-
Hi, The README of the oqs-provider repo states that:
Is there a straight forward way to activate the algorithms? I looked through the documentation, but cannot find the "enabled" flag that is stated anywhere in the configuration (I'm guessing the generate.yml is meant). FROM debian:bookworm-slim AS builder
# Default location where all binaries wind up:
ARG INSTALLDIR=/opt/oqssa
ARG MAKE_DEFINES="-j12"
ARG DEFAULT_GROUPS="x25519:x448:kyber512:p256_kyber512:kyber768:p384_kyber768:kyber1024:p521_kyber1024"
ARG LIBOQS_BUILD_DEFINES="-DOQS_DIST_BUILD=ON"
# Installing dependencies:
# [...]
# Download liboqs
RUN git clone -b main --depth 1 --recurs \
https://github.com/open-quantum-safe/liboqs.git
# Build liboqs
WORKDIR /opt/liboqs
RUN mkdir build
WORKDIR /opt/liboqs/build
RUN cmake -GNinja ${LIBOQS_BUILD_DEFINES} -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=${INSTALLDIR} ..
RUN ninja
# Run tests
# RUN ninja run_tests
# Install liboqs
RUN ninja install
# ==== OpenSSL ====
WORKDIR /opt
RUN git clone --depth 1 --branch master https://github.com/openssl/openssl.git
# build openSSL
WORKDIR /opt/openssl
RUN LDFLAGS="-Wl,-rpath -Wl,${INSTALLDIR}/lib64" ./config shared --prefix=${INSTALLDIR} && \
make ${MAKE_DEFINES} && make install_sw install_ssldirs;
ENV PATH="${INSTALLDIR}/bin:${PATH}"
# ==== oqs openssl provider ====
WORKDIR /opt
# Download oqs-provider
RUN git clone --depth 1 --recurs -b main \
https://github.com/open-quantum-safe/oqs-provider
# Build oqs-provider
WORKDIR /opt/oqs-provider
RUN mkdir build
WORKDIR /opt/oqs-provider/build
RUN cmake -GNinja -DOPENSSL_ROOT_DIR=${INSTALLDIR} -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=${INSTALLDIR} ..
RUN ninja
RUN cp /opt/oqs-provider/build/lib/oqsprovider.so /opt/oqssa/lib64/
# Activate the oqs provider systemwide
WORKDIR /opt
ENV PATH="${INSTALLDIR}/bin:${INSTALLDIR}/python/bin:${PATH}"
RUN sed -i "s/default = default_sect/default = default_sect\noqsprovider = oqsprovider_sect/g" /opt/oqssa/ssl/openssl.cnf && \
sed -i "s/\[default_sect\]/\[default_sect\]\nactivate = 1\n\[oqsprovider_sect\]\nactivate = 1\nmodule = \/opt\/oqssa\/lib64\/oqsprovider.so/g" /opt/oqssa/ssl/openssl.cnf && \
sed -i "s/providers = provider_sect/providers = provider_sect\nssl_conf = ssl_sect\n\n\[ssl_sect\]\nsystem_default = system_default_sect\n\n\[system_default_sect\]\nGroups = \$ENV\:\:DEFAULT_GROUPS\n/g" /opt/oqssa/ssl/openssl.cnf && \
sed -i "s/\# Use this in order to automatically load providers/\# Set default KEM groups if not set via environment variable\nKDEFAULT_GROUPS = $DEFAULT_GROUPS\n\n# Use this in order to automatically load providers/g" /opt/oqssa/ssl/openssl.cnf && \
sed -i "s/HOME\t\t\t= ./HOME\t\t= .\nDEFAULT_GROUPS\t= ${DEFAULT_GROUPS}/g" /opt/oqssa/ssl/openssl.cnf
ENV OPENSSL=${INSTALLDIR}/bin/openssl
ENV OPENSSL_CNF=${INSTALLDIR}/ssl/openssl.cnf Running
I'm guessing that this is due to the signature algorithm (falcon512). |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
Well, turns out that I didn't read properly 😅. The README states that algorithms not denoted with a * are not enabled. That explains why I couldn't find the flag in the configuration. But I still don't understand why dilithium as a signature works, but falcon does not. |
Beta Was this translation helpful? Give feedback.
OK, this approach opens the risk that you (may) have mismatching
liboqs
versions. Be sure to use one of our docker images matching the code on the interop server. Alternatively, create a local client/server setup (then guaranteed to have the same code/library version) following these steps.