This guide explains how to build and test the OTLS repository using Docker, without needing to install dependencies directly on your host machine.
- Docker
- Docker Compose
OTLS supports two different elliptic curves for cryptographic operations in the com_conv example:
- BLS12-446 (default): A pairing-friendly curve suitable for advanced cryptographic protocols
- Ed25519: A widely-used curve optimized for performance and security
You can select the curve during the build process in several ways:
- Using environment variable:
export RELIC_CURVE=Ed25519
docker compose build- Using command line argument:
docker compose build --build-arg RELIC_CURVE=Ed25519Optionally pass BUILD_ON_MAC=yes after --build-arg to build on MAC.
- Using default (BLS12-446):
docker compose buildThe build output will indicate which curve is being used. If an unknown curve is specified, the build will fail with a clear error message.
- Build the Docker image:
docker compose build- Run the Docker container in interactive mode:
docker compose up -d
docker compose exec otls bash- Once inside the container, you can run the tests:
# For local testing (both parties on same machine)
./run ./bin/[binaries] 12345 [more opts]
# For example
./run ./bin/example 12345 123 124