interplane.Get Omega
Read in your language

aien-receipts

Append-only AIEN verification receipts, indexed by repository and exact source commit. Read verdicts, signatures and retained logs before making a claim.

Brought by drakestapleton

branch main Branches Tags History

aien-receipts / audit / tls / omega-mv / bench / gen-certs.sh

18 lines · 1227 bytes Raw Blame History
1#!/bin/sh
2# Benchmark PKI: one ECDSA P-256 root (trust anchor) signs one ECDSA P-256 leaf for bench.test.
3# Every client arm verifies the same chain against the same root.pem.
4set -eu
5d=${1:-www}; mkdir -p "$d"; cd "$d"
6openssl genpkey -algorithm EC -pkeyopt ec_paramgen_curve:P-256 -out root.key 2>/dev/null
7openssl req -x509 -new -key root.key -subj /CN=tlsproof-bench-root -days 60 -sha256 \
8 -addext basicConstraints=critical,CA:true -addext keyUsage=critical,keyCertSign,cRLSign -out root.pem
9openssl genpkey -algorithm EC -pkeyopt ec_paramgen_curve:P-256 -out leaf.key 2>/dev/null
10openssl req -new -key leaf.key -subj /CN=bench.test -addext subjectAltName=DNS:bench.test -out leaf.csr
11printf 'basicConstraints=critical,CA:false\nkeyUsage=critical,digitalSignature\nextendedKeyUsage=serverAuth\nsubjectAltName=DNS:bench.test\n' > leaf.ext
12openssl x509 -req -in leaf.csr -CA root.pem -CAkey root.key -CAcreateserial -days 30 -sha256 -extfile leaf.ext -out leaf.pem 2>/dev/null
13# bodies: byte i = i mod 251
14python3 - <<'PY'
15for name, n in (("small.bin", 1024), ("1m.bin", 1 << 20), ("16m.bin", 16 << 20)):
16 open(name, "wb").write(bytes(i % 251 for i in range(n)))
17PY
18sha256sum root.pem leaf.pem small.bin 1m.bin 16m.bin