Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

attested-relay-timelock

This package bundles the native Rust RandomX v2.0.1 generator, solver, checkpoint journal, calibration, and archive decryption commands in a platform wheel. It has no Python substitute for RandomX. Build the wheel from this complete repository with pip wheel --no-deps ./python/attested-relay-timelock (Rust, CMake, and a C++ compiler are required). Source-only PyPI installation is not supported; publish the platform wheels after native validation on each platform.

attested-relay-timelock calibrate --mode full --samples 10000
attested-relay-timelock solve --manifest puzzle.json \
  --service-public-key ATTESTATION_VERIFIED_ED25519_HEX \
  --checkpoint epoch.jsonl --key-out epoch.key
attested-relay-timelock decrypt-record --manifest puzzle.json \
  --service-public-key ATTESTATION_VERIFIED_ED25519_HEX \
  --epoch-key epoch.key --record ciphertext.json --plaintext-out record.bin

Re-run the identical solve command after a restart to resume. The append-only journal preserves completed entries after interrupted writes. Checkpoint digests detect accidental corruption; checkpoints are local progress hints, and a malicious writer can waste computation but cannot produce a returned key without passing the segment AEAD and published epoch-key commitment. Protect the journal directory.

The public key is a required independent trust pin, obtained from verified attestation or a previously verified archived identity. A manifest's self-reported signer does not establish trust.

The high-level Puzzle API uses an authenticated archive bundle URL:

from attested_relay_timelock import Puzzle

puzzle = Puzzle.from_url(
    "https://relay.girl.surgery/v1/artifacts/SHA256.bundle.json",
    expected_pcr0=INDEPENDENTLY_VERIFIED_PCR0_HEX,
)
epoch_key = puzzle.solve(checkpoint="./solver-state/epoch.jsonl")
plaintext = puzzle.decrypt_record(
    "downloaded.record.json",
    epoch_key=epoch_key,
    plaintext_out="./solver-state/decrypted-record.bin",
)

Replace SHA256 with the bundle's actual 64-character content digest. Install attested-relay-timelock[archive] on Python 3.11 or later for this interface; the existing follow extra also installs the archive verifier. A bare .puzzle.json URL is rejected because it lacks the linked Nitro identity evidence. The required PCR0 pin must come from an independently trusted build measurement, not from the downloaded archive or its hosting server. Verification checks every artifact digest, AWS Nitro signature/certificate chain, PCRs, attested TLS/service keys, Graviton5 policy, manifest signature, and work parameters. Historical warming evidence is valid here; it does not establish present service readiness or when a puzzle was made public.

puzzle.manifest_id, puzzle.service_public_key, puzzle.manifest, puzzle.policy, and puzzle.attestation expose authenticated metadata. Dictionary properties return independent copies. solve() writes the verified manifest next to the checkpoint and returns the recovered key's Path; its default name is <manifest_id>.key, or set key_out= explicitly. It defaults to genuine native full mode; mode="light" computes the same result more slowly. Solving can take days. Interrupt and resume with the same checkpoint/output paths; an already completed key output raises FileExistsError rather than replacing it. decrypt_record() verifies the manifest signature, epoch/key commitment and record AEAD authentication natively, and creates a new plaintext output. The record envelope itself has no service signature. Once an epoch key is public, anyone holding it can create another valid AEAD envelope; identifying the original archived record then also requires an independently trusted digest or publication record. Both operations work offline after from_url() completes. Existing differing manifests, keys and plaintext files are preserved. Protect solver-state directories from other writers.

The native decryptor returns authenticated bytes without interpreting their encoding. Current audit plaintext is canonical CBOR version 3, including a software_version field; decode it with cbor2.loads(plaintext.read_bytes()). Historical diagnostic archives use JSON version 2, decoded with json.loads(plaintext.read_bytes()). Inspect the decoded version field and handle only the format/version your application supports. The encrypted .record.json envelope remains JSON in both cases; its filename does not imply that the decrypted bytes are JSON. Puzzle decrypts both formats through the same native authentication path.

Only explicit insecure_local=True permits a loopback HTTP URL (for example, the operator's SSH archive tunnel). It never disables Nitro/PCR/hardware checks. Archive fetches share a bounded timeout, reject redirects and enforce size limits. URLs with credentials, queries or fragments are rejected. There is no URL-only trust shortcut or development-attestation bypass in this API.

light mode uses the genuine RandomX algorithm with a 256 MiB cache and computes dataset items as needed. full uses a shared 2080 MiB dataset for faster execution. Both produce identical hashes. Production iteration counts must be calibrated in full mode on the reference CPU, compiled into the enclave image, and measured under seven-worker load. Short tests never establish a seven-day delay.

Continuous solving uses verified historical bundles and the paginated all-artifact index, restarting discovery from its first page each poll so newly inserted hashes are not missed:

attested-relay-timelock follow https://relay.example --expected-pcr0 PCR0_HEX \
  --state-dir ./solver-state --max-workers 7

Install the follow extra (and the matching attested-relay package). Each bundle must pass archived Nitro identity verification before its independently authenticated service key is handed to the native solver. Seven full-mode solvers require roughly 16 GiB for datasets/caches plus process overhead. Existing verified keys are reused; failed solvers preserve checkpoints and are retried on later discovery scans. Keys are stored locally; this command does not publish them to an external service.

Release files for attested-relay-timelock 0.2.0a2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for attested-relay-timelock 0.2.0a2
File Interpreter ABI Platform
attested_relay_timelock-0.2.0a2-py3-none-manylinux_2_34_x86_64.whl Python 3 none Linux glibc 2.34+ x86-64 Details
attested_relay_timelock-0.2.0a2-py3-none-manylinux_2_34_aarch64.whl Python 3 none Linux glibc 2.34+ ARM64 Details
attested_relay_timelock-0.2.0a2-py3-none-macosx_15_0_arm64.whl Python 3 none macOS 15.0+ ARM64 Details

Total release size: 1.7 MB

Release files / attested_relay_timelock-0.2.0a2-py3-none-manylinux_2_34_x86_64.whl

Download URL attested_relay_timelock-0.2.0a2-py3-none-manylinux_2_34_x86_64.whl
Size 628.2 kB
Tags Linux glibc 2.34+ x86-64 Python 3
SHA-256 checksum
How to use checksums
1289d53332bf4e0cc4334099a291dcbdf0474e809185948fa55bc5ab9f41e4b8
BLAKE2b-256 checksum
How to use checksums
7bb167a0611622c0b68f0af7abae259f6bf135a4f836551615370f29f5dc332c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Release files / attested_relay_timelock-0.2.0a2-py3-none-manylinux_2_34_aarch64.whl

Download URL attested_relay_timelock-0.2.0a2-py3-none-manylinux_2_34_aarch64.whl
Size 570.4 kB
Tags Linux glibc 2.34+ ARM64 Python 3
SHA-256 checksum
How to use checksums
c16199becd86d49a6b26d18ef899226be315fc6dead11c23821cf8791cd60826
BLAKE2b-256 checksum
How to use checksums
1ae2e28674ffb7e29fd3f49a673115541a2a21186c843c8a0733e25ea33f5496
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Release files / attested_relay_timelock-0.2.0a2-py3-none-macosx_15_0_arm64.whl

Download URL attested_relay_timelock-0.2.0a2-py3-none-macosx_15_0_arm64.whl
Size 550.1 kB
Tags Python 3 macOS 15.0+ ARM64
SHA-256 checksum
How to use checksums
5c88ccaaa131ad0ed7ce166e3cecfd960dce684975c982452089ca6e2c5232c3
BLAKE2b-256 checksum
How to use checksums
e7fdb8acd9eabd1e16b577ce9c012e54b85b3837a33ea990e6866cee74e0e216
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page