Sign inSign up

sahanaprasad07/post-quantum-container

By sahanaprasad07

•Updated over 2 years ago

post quantum capable container that can interop with nginx, curl and openquantumsafe test server

Image
Security
1

113

sahanaprasad07/post-quantum-container repository overview

In this container image,

  1. The liboqs provider that enables PQ crypto algorithm is activated by default. You can use this command to test it: openssl list -providers
  2. Check the script.sh file to see how openssl keys are generated.
  3. crypto policies is updated with the TEST-PQ sub policy. To check if, you can execute this command: update-crypto-policies --show
  4. nginx.conf file is updated to enable TLS settings on port 443. To test it, use the following command: openssl s_client -connect localhost:443 -tls1_3
  5. To test OpenSSL with curl, use the following command: curl --cacert root.crt https://localhost:443/⁠
  6. To test the PQ algorithm with the oqs test server, use the folowing command: openssl s_client -connect test.openquantumsafe.org:6041 -trace

Useful podman commands:

  1. podman image list
  2. podman build -t post-quantum-container .
  3. podman run -it --rm post-quantum-container
  4. podman run -it -p 8080:80 --name test localhost/post-quantum-container

Copy of my Containerfile:

FROM fedora:40

##Install the required packages

RUN sudo dnf install vim openssl nginx curl oqsprovider crypto-policies-scripts tcpdump sed -y

##Update the TEST-PQ subpolicy

RUN update-crypto-policies --set DEFAULT:TEST-PQ

COPY script.sh .

COPY README.txt .

CMD ["/bin/bash"]

Copy of my script.sh:

#OpenSSL key and certificates generation

openssl ecparam -out p256.pem -name P-256

openssl req -x509 -newkey ec:p256.pem -keyout root.key -out root.crt -subj /CN=localhost -batch -nodes -days 36500 -sha256

#nginx configuration

mkdir /etc/pki/nginx

mkdir /etc/pki/nginx/private

cp root.crt /etc/pki/nginx/server.crt

cp root.key /etc/pki/nginx/private/server.key

getent passwd nginx

chown -R nginx: /etc/pki/nginx

Tag summary

Content type

Image

Digest

sha256:6bd38ad70…

Size

219.3 MB

Last updated

over 2 years ago

docker pull sahanaprasad07/post-quantum-container:latest-pq-f40-cp