You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It should be possible to use the openssl (s_client), curl and GNOME Web/epiphany clients with all algorithm combinations available at the Open Quantum Safe TLS/X.509 interoperability test server at https://test.openquantumsafe.org (set up using `oqs-provider v0.6.1` and `liboqs v0.10.1`) but no guarantees are given for software not explicitly labelled with the name of a person offering support for it. Since [OQS-BoringSSL](https://github.com/open-quantum-safe/boringssl) no longer maintains the same set of algorithms, software that depends on OQS-BoringSSL (e.g., nginx-quic and curl-quic) may not fully (inter)operate with the test server.
39
41
@@ -62,6 +64,7 @@ All modifications to this repository are released under the same terms as [liboq
62
64
Dindyal Jeevesh Rishi (University of Mauritius / cyberstorm.mu)
63
65
Dan Rouhana (University of Washington)
64
66
JT (Henan Raytonne Trading Company)
67
+
David Gomez-Cambronero (Telefonica Innovacion digital)
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 && \
91
+
sed -i "s/HOME\t\t\t= ./HOME\t\t= .\nDEFAULT_GROUPS\t= ${DEFAULT_GROUPS}/g" /opt/oqssa/ssl/openssl.cnf
This directory contains a Dockerfile that builds Locust using OpenSSL v3 using the [OQS provider](https://github.com/open-quantum-safe/oqs-provider) and Python3, which allows `Locust` to negotiate quantum-safe keys and use quantum-safe authentication in TLS 1.3.
3
+
4
+
For more information on `Locust`, see the [official Locust project](https://github.com/locustio/locust).
5
+
6
+
## Quick start
7
+
8
+
1) Be sure to have [docker installed](https://docs.docker.com/install).
9
+
2) Run `docker build -t oqs-locust:0.0.1 .` to create a post quantum-enabled Locust docker image.
10
+
3) In order to configure endpoints and their weight, modify the file [scenarios/locustfile.py](scenarios/locustfile.py), more information can be found in [USAGE.md](USAGE.md)
11
+
4) To verify all components perform quantum-safe operations, first start the container with docker compose
12
+
13
+
```
14
+
LOGGER_LEVEL=DEBUG HOST=https://YOUR_QS_HOST:4433 docker compose up --scale worker=8
15
+
```
16
+
4) Connect to the locust web interface at `http://localhost:8189` and start a load test.
17
+
18
+
19
+
## Notes on this Version:
20
+
21
+
In this version, we utilize the subprocess module to execute the oqs-openssl command within Locust. Ideally, the objective should be to leverage native Python libraries. However, as of now, there are no Python libraries that support quantum-safe (QS) group for TLS 1.3. Once such libraries become available, we should prioritize recompiling Python (for add the OQS-openssl version) and using the appropriate Python libraries for this functionality.
22
+
23
+
For further reference on the Locust API, please refer to the official documentation [here](https://docs.locust.io/en/stable/).
24
+
25
+
## Usage
26
+
27
+
Information how to use locust: [available in the separate file USAGE.md](USAGE.md).
This directory contains a Dockerfile that builds the [OpenSSL v3](https://github.com/openssl/openssl)[OQS provider](https://github.com/open-quantum-safe/oqs-provider), and Python3 which allows locust to negotiate quantum-safe keys in TLS 1.3.
3
+
4
+
## Start
5
+
1) Run `docker build -t oqs-locust:0.0.1 .` to create a post quantum-enabled Locust docker image.
6
+
2) To verify all components perform quantum-safe operations, first start the container with docker compose, setting all environment variables as needed. For example:
7
+
```
8
+
LOGGER_LEVEL=DEBUG HOST=https://YOUR_QS_HOST:4433 GROUP=kyber1024 docker compose up --scale worker=8
9
+
```
10
+
3) Connect to the locust web interface at `http://localhost:8189` and start a load test.
11
+
12
+
By default, Locust supports all algorithms supported by the OQS openssl.
13
+
14
+
Some environments variables you need to know
15
+
- LOGGER_LEVEL: Set the log level for the locust master and worker. Default is ERROR.
16
+
- HOST: Set the host to test. Default is https://test:4433
17
+
- WORKERS: Set the number of workers. Default is 8. Ideally, the number of workers should be the same as the number of cores in the machine.
18
+
- MASTER_PORT: Set the port for the master. Default is 8189.
19
+
- GROUP: Set the key exchange scheme for openssl. Default is kyber768.
20
+
21
+
In Locust web server, you need to set 2 variables:
22
+
- Number of users to simulate: The number of users to simulate that will hit the server.
23
+
- Hatch rate: The rate per second in which users are spawned.
24
+
25
+
After that, you can start the test:
26
+
27
+
STATISTICS
28
+

29
+
30
+
CHARTS
31
+

32
+
33
+
### HOW TO CREATE A PERFORMANCE SCENARIO IN LOCUST
34
+
35
+
Using Locust, you can configure a performance scenario. For this, you can use the following structure. Note: This is just a basic example, and the real implementation might use subprocess and openssl to handle post-quantum cryptographic curves, as in the actual [locustfile.py](scenarios/locustfile.py).
36
+
37
+
```python
38
+
from locust import HttpUser, TaskSet, task, between
39
+
classUserBehavior(TaskSet):
40
+
# on_start is called when a Locust starts, before any task is scheduled
41
+
defon_start(self):
42
+
self.index()
43
+
self.about()
44
+
45
+
# tasks is a list of tasks that a Locust will choose from to execute
46
+
# tasks are chosen with the weighted_task_set attribute
47
+
@task(1)
48
+
defindex(self):
49
+
self.client.get("/")
50
+
51
+
# in this case the about task is twice as likely to be chosen as the index task
0 commit comments