# E82 external reproduction attestation

This is the **third-party path**. The E82 bundle is already verifiable with no CAIN code; this
schema records that an outside engineer actually ran it and got the same result.

## What counts

- A machine outside the CAIN-42 repository (your laptop, your CI, a clean container).
- The published `CAIN42_E82_EVIDENCE_BUNDLE.zip` and `verify_e82_offline.py`.
- No CAIN package import, no edit to the bundle, no reuse of the project's signing key.
- The verifier output `ok=true`, `55/55`, Merkle
  `63868034b46e901f2cec392cd25c22ab947516e594543e02155857a9c31c5ac9`.

## What does not count

- Running inside the CAIN repo or reusing its environment.
- Editing the bundle and re-signing the manifest with your own key.
- A screenshot without a signed attestation.
- A claim that “a third party verified it” without a named attestor's signature.

## Steps

1. Download:

   - `https://cainstudio.online/proof/bundle/evolution-82-vertical-agi-2026-11-17/CAIN42_E82_EVIDENCE_BUNDLE.zip`
   - `https://cainstudio.online/proof/bundle/evolution-82-vertical-agi-2026-11-17/verify_e82_offline.py.txt`

2. Run:

   ```bash
   sha256sum CAIN42_E82_EVIDENCE_BUNDLE.zip
   unzip CAIN42_E82_EVIDENCE_BUNDLE.zip
   python3 -m pip install cryptography
   python3 verify_e82_offline.py bundle > verifier-output.json
   ```

3. Copy `e82_external_attestation.template.json`, fill it in with your environment, the hashes,
   the verifier result, and a fresh nonce.

4. Sign canonical JSON (sorted keys, separators `,` and `:`, ASCII) with Ed25519:

   ```python
   import base64, json
   from cryptography.hazmat.primitives.asymmetric.ed25519 import Ed25519PrivateKey
   from cryptography.hazmat.primitives import serialization

   body = json.load(open("attestation.json"))
   body.pop("signature_b64", None)
   payload = json.dumps(body, sort_keys=True, separators=(",", ":"), ensure_ascii=True).encode()

   key = Ed25519PrivateKey.generate()
   signature = base64.b64encode(key.sign(payload)).decode()
   public = base64.b64encode(key.public_key().public_bytes(
       serialization.Encoding.Raw, serialization.PublicFormat.Raw)).decode()
   body["public_key_b64"] = public
   body["signature_b64"] = signature
   json.dump(body, open("attestation.signed.json", "w"), indent=1, sort_keys=True)
   ```

   Keep the private key; publish only the public key and signature.

5. Verify your own attestation:

   ```bash
   python3 verify_external_attestation.py attestation.signed.json
   ```

6. Submit the signed JSON to `firmeai2026@gmail.com` with subject
   `E82 external reproduction attestation`. We publish valid attestations, including failures.

## What a valid attestation means

It means **that named attestor signed that result**. It does not turn the attestor into a
certification body, and it does not replace a security audit. It is the L2 evidence the claim
ledger is asking for.

## Current status

- External reproductions recorded: **0**.
- Target: **3+** independent attestations with different OS/Python environments.
- Independent witness cosignatures: **0**.
- Third-party security audit: **not performed**.
