Verify
the signature, the hash chain, and how to check both without trusting us
Every index this site serves carries a signed stamp. The signature binds: schema version, corpus commit, build time, attribution, the full NOTICE text, and the corpus statistics, the canonical text is every stamp field except signature/public_key, sorted by key, joined as k=v lines. Algorithm: ECDSA-P256-SHA256, signature format IEEE P1363 (r||s, 64 bytes), base64.
What it does, and does not, attest
It attests that this exact index (schema, corpus commit, build) was produced by the holder of the Lex signing key. It does not attest that the underlying text matches the publisher, that is what the hash chain is for: every provision's text_sha256 derives deterministically from a verbatim publisher file whose sha256 is recorded in the open corpus repos. Re-run the pinned open-source extractor on the state's bytes and you get these bytes, the defence is never "trust Lex".
Verify the stamp yourself
curl -s https://law.soufien.lu/attestation.json -o att.json
curl -s https://law.soufien.lu/pubkey.pem -o pubkey.pem
python3 - <<'EOF'
import json, base64
from cryptography.hazmat.primitives.serialization import load_pem_public_key
from cryptography.hazmat.primitives.asymmetric import ec, utils as au
from cryptography.hazmat.primitives import hashes
att = json.load(open('att.json'))
pub = load_pem_public_key(open('pubkey.pem','rb').read())
for c in att['collections']:
s = c['stamp']
canon = chr(10).join(f'{k}={v}' for k, v in sorted(s.items()) if k not in ('signature','public_key')).encode()
raw = base64.b64decode(s['signature'])
r, sv = int.from_bytes(raw[:32],'big'), int.from_bytes(raw[32:],'big')
pub.verify(au.encode_dss_signature(r, sv), canon, ec.ECDSA(hashes.SHA256()))
print(c['collection'], 'OK', s['corpus_commit'], s['built_at'])
EOFVerify a citation against the state's bytes
Clone the evidence repo and the code, then re-derive offline:
git clone https://github.com/SFHAJJI/lex && git clone https://github.com/SFHAJJI/lex-corpus-lu-legilux cd lex && dotnet run --project src/Lex.Ingest -- verify derive --publisher lu-legilux --corpus ../lex-corpus-lu-legilux --articles ../lex-articles
Extraction profiles are immutable (akn-lu/1, xhtml-eu/1); a citation pinned under a profile verifies under that profile, forever. Contract: SCHEMA.md.