Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(www): optional hybrid PQC key exchange for TLS connections #1004

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nils-wisiol
Copy link
Contributor

@nils-wisiol nils-wisiol commented Dec 25, 2024

Enables key agreement for TLS connections of www using hybrid PQC schemes (ECDHE + ML-KEM). Does not remove support for pure classical schemes (ECDHE only). Does not remove support for non-elliptic-curve DHE-RSA key agreement.

Hybrid PQC schemes using ML-KEM are supported from Chrome 131 onward; Firefox from 132 onward.

@nils-wisiol
Copy link
Contributor Author

Note that the Dockerfile hardcodes liboqs and oqs-provider versions which will fall through the cracks of our usual maintenance/upgrade checks. Not sure how to improve on that.

Comment on lines +4 to +6

RUN git clone --depth 1 --branch 0.12.0 https://github.com/open-quantum-safe/liboqs.git
RUN git clone --depth 1 --branch 0.8.0 https://github.com/open-quantum-safe/oqs-provider.git

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To avoid hard coding these, I would use a build arg. Then you can do something like:

Suggested change
RUN git clone --depth 1 --branch 0.12.0 https://github.com/open-quantum-safe/liboqs.git
RUN git clone --depth 1 --branch 0.8.0 https://github.com/open-quantum-safe/oqs-provider.git
ARG LIBOQS_VERSION=""
ARG OQSPROVIDER_VERSION=""
RUN if [ -z ${LIBOQS_VERSION} ]; exit 1; fi;
RUN if [ -z ${OQSPROVIDER_VERSION} ]; exit 2; fi;
RUN git clone --depth 1 --branch ${LIBOQS_VERSION} https://github.com/open-quantum-safe/liboqs.git
RUN git clone --depth 1 --branch ${OQSPROVIDER_VERSION} https://github.com/open-quantum-safe/oqs-provider.git

Then as part of the build step, or if you are using docker compose you can define it in the yaml file, you can define the version you want. The above should cause a build error if the versions aren't defined.

@@ -1,8 +1,9 @@
# According to https://ssl-config.mozilla.org/#server=nginx&version=1.16.1&config=intermediate&openssl=1.1.1c&guideline=5.4
# According to https://ssl-config.mozilla.org/#server=nginx&version=1.16.1&config=intermediate&openssl=1.1.1c&guideline=5.4 and added PQC hybrids support

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this is just a comment pointing to a reference, but it should probably be updated to OpenSSL 3.2 at some point.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point!

Comment on lines +43 to +46
# mountable content for web app (remove default stuff in there)
RUN rm /usr/share/nginx/html/*
COPY html/503.html /usr/share/nginx/html
COPY --from=webapp /usr/src/app/dist /usr/share/nginx/html
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At least the last thing should run last, because it changes most frequently; no need to redo the OpenSSL config when updating webapp contents


# configure openssl to use OQS provider
COPY --from=oqs-provider /oqs-provider/_build/lib/oqsprovider.so /
RUN cat <<EOF >> /etc/ssl/openssl.cnf
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an append operation. Do we know what's in the file before this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants