
OpenSSL s_server testing tool for tiny EC private keys for CVE-2026-111943 research.
A lightweight, automated containerized testing tool powered by Alpine Linux and OpenSSL s_server for testing with small integers as Elliptic Curve private keys.
It generates a two-tier Elliptic Curve (EC) certificate chain (CA + Server), signs the server certificate with custom SAN extensions (IPs and domain names), captures and echoes all executed OpenSSL commands, and serves a live HTML report explaining how the certificate and key were created while running in -WWW or -www mode.
fullchain.pem.CHAIN_MODE=c1), or all available paths combined (CHAIN_MODE=all).s Bytes Input: Directly accepts an EC private key scalar $s$ as a hex string (e.g., 0xdeadbeef1337 or deadbeef...) or small integer (e.g., 42), embedding the exact hex scalar into the generated EC private key so that openssl ec -text displays your exact bytes under priv:.S_BYTES, SERVER_S_BYTES, CA_S_BYTES.CA_CURVE, SERVER_CURVE, or fallback CURVE (e.g., prime256v1, secp384r1, secp521r1).CA_SUBJECT and SERVER_SUBJECT.DOMAINS and IPS (comma or space separated).WWW_MODE (WWW, www, HTTP).PORT (default 4433).fullchain.pem, tls.crt) and private keys are mounted to /certs, serving those instead.openssl x509 -text -noout and openssl ec -text -noout). In -WWW mode, visiting https://<host>:<port>/index.html renders this full report with one-click PEM file downloads.chart/) and ArgoCD Application (argocd/) matching Gitea CI/CD pipelines.s Bytes (Hex)docker run -p 4433:4433 \
-e S_BYTES="0xdeadbeef1337" \
ghcr.io/blackthornyugen/tiny-key-s-server:latest
When running openssl ec -in server.key.pem -text -noout, the private key scalar displays:
priv:
00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:
00:00:00:00:00:00:00:00:00:00:00:de:ad:be:ef:
13:37
sdocker run -p 4433:4433 \
-e S_BYTES="42" \
-e DOMAINS="localhost,test.internal" \
-e IPS="127.0.0.1,192.168.1.100" \
ghcr.io/blackthornyugen/tiny-key-s-server:latest
docker run -p 4433:4433 \
-e SERVER_S_BYTES="0xdeadbeef" \
-e CA_S_BYTES="0x1337c0de" \
-e CA_CURVE="prime256v1" \
-e SERVER_CURVE="prime256v1" \
ghcr.io/blackthornyugen/tiny-key-s-server:latest
If you have pre-generated certificates (such as Let's Encrypt or Vault certs):
docker run -p 4433:4433 \
-v /path/to/my/certs:/certs:ro \
ghcr.io/blackthornyugen/tiny-key-s-server:latest
When fullchain.pem (or tls.crt) and privkey.pem (or tls.key / server.key) are present in /certs, the container inspects and serves them directly without generating new certificates.
Because keys $a$ (server, scalar $s$) and $b$ (CA, scalar $s+1$ or CA_S_BYTES) are deterministic, intermediate key $b$ can be pre-signed by external root CAs ($c_1, c_2, \dots$) ahead of time, or roots can be mounted to be signed automatically on startup.
Place cross-signed chain PEMs in /certs/chains/:
/certs/chains/c1.pem (contains $b$ signed by $c_1$, and optionally $c_1$)/certs/chains/c2.pem (contains $b$ signed by $c_2$, and optionally $c_2$)# Serve specific cross-signed path (a -> b_c1 -> c1)
docker run -p 4433:4433 \
-e S_BYTES="0x01" \
-e CA_S_BYTES="0x02" \
-e CHAIN_MODE="c1" \
-v /path/to/chains:/certs/chains:ro \
ghcr.io/blackthornyugen/tiny-key-s-server:latest
# Serve all paths concatenated in fullchain.pem (a -> b_c1 + b_c2)
docker run -p 4433:4433 \
-e S_BYTES="0x01" \
-e CA_S_BYTES="0x02" \
-e CHAIN_MODE="all" \
-v /path/to/chains:/certs/chains:ro \
ghcr.io/blackthornyugen/tiny-key-s-server:latest
For CI/CD or lightweight execution without volume mounts:
docker run -p 4433:4433 \
-e S_BYTES="0x01" \
-e CHAIN_MODE="all" \
-e EXTRA_CHAIN_PEM="$(cat extra_chain.pem)" \
ghcr.io/blackthornyugen/tiny-key-s-server:latest
Mount external root CA certificates and private keys to /certs/roots/:
/certs/roots/c1.crt and /certs/roots/c1.keyOn boot, the container automatically generates an intermediate certificate for key $b$ signed by root $c_1$, and makes it available under CHAIN_MODE="c1" or CHAIN_MODE="all".
In -WWW mode, fetch the HTML report:
# Insecure (skip CA verification)
curl -k https://localhost:4433/index.html
# Download the generated CA certificate
curl -k -O https://localhost:4433/ca.crt.pem
# Secure request using the downloaded CA
curl --cacert ca.crt.pem https://localhost:4433/index.html
s_clientConnect and inspect the certificate chain in the terminal:
openssl s_client -connect localhost:4433 -showcerts