This directory contains a Dockerfile that builds curl with the OQS OpenSSL 1.1.1 fork, which allows curl to negotiate quantum-safe keys and use quantum-safe authentication in TLS 1.3.
docker build -t oqs-curl . to create a post quantum-enabled OpenSSL and Curl docker imagedocker run -it oqs-curl thus starting an OQS-enabled TLS test server.curl --curves kyber512 https://localhost:4433. If all works, the last command returns all TLS information documenting use of OQS-enabled TLS. The parameter to the --curves argument is the KEM_ALG chosen when building the docker container ('kyber512' by default).The Dockerfile
localhost QSC-TLS serverThe signature algorithm for the certificates is set to dilithium2 by default, but can be changed to any of the supported OQS signature algorithms with the build argumemt to docker --build-arg SIG_ALG=name-of-oqs-sig-algorithm, e.g. as follows:
docker build -t oqs-curl --build-arg SIG_ALG=qteslapiii .
Note for the interested: The build process is two-stage with the final image only retaining all executables, libraries and include-files to utilize OQS-enabled curl and openssl.
Two further, runtime configuration option exist that can both be optionally set via docker environment variables:
Setting the key exchange mechanism (KEM): By setting 'KEM_ALG'
to any of the supported KEM algorithms built into OQS-OpenSSL one can run TLS using a KEM other than the default algorithm 'kyber512'. Example: docker run -e KEM_ALG=newhope1024cca -it oqs-curl. It is always necessary to also request use of this KEM algorithm by passing it to the invocation of curl with the --curves parameter, i.e. as such in the same example: curl --curves newhope1024cca https://localhost:4433.
Setting the signature algorithm (SIG): By setting 'SIG_ALG' to any of the supported OQS signature algorithms one can run TLS using a SIG other than the one set when building the image (see above). Example: docker run -e SIG_ALG=picnicl1fs -it oqs-curl.
The Dockerfile also facilitates building the underlying OQS library to different specifications (by setting the --build-arg variable LIBOQS_BUILD_DEFINES as defined here.
For example, with this build command
docker build --build-arg LIBOQS_BUILD_DEFINES="-DOQS_USE_CPU_EXTENSIONS=OFF" -f Dockerfile -t oqs-curl-generic .
a generic system without processor-specific runtime optimizations is built, thus ensuring execution on all computers (at the cost of maximum runtime performance).
Information how to use the image is available in the separate file USAGE.md.
The Dockerfile provided allows for significant customization of the image built:
This permits changing the build options for the underlying library with the quantum safe algorithms. All possible options are documented here.
By default, the image is built such as to have maximum portability regardless of CPU type and optimizations available, i.e. to run on the widest possible range of cloud machines.
This permits changing the build options for the underlying openssl library containing the quantum safe algorithms.
The default setting defines a range of default algorithms suggested for key exchange. For more information see the documentation.
This defines the quantum-safe cryptographic signature algorithm for the internally generated (demonstration) CA and server certificates.
The default value is 'dilithium3' but can be set to any value documented here.
This defines the resultant location of the software installatiion.
By default this is '/opt/oqssa'. It is recommended to not change this. Also, all usage documentation assumes this path.
This defines the curl software version to be build into the image.
The default version set is known to work OK and depends on a patch. Therefore changing it is not recommended.
Allow setting parameters to make operation, e.g., '-j nnn' where nnn defines the number of jobs run in parallel during build.
The default is conservative and known not to overload normal machines. If one has a very powerful (many cores, >64GB RAM) machine, passing larger numbers (or only '-j' for maximum parallelism) speeds up building considerably.
Content type
Image
Digest
Size
27.2 MB
Last updated
about 6 years ago
docker pull openqsafe/curl