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.0a4

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.0a4
File Interpreter ABI Platform
attested_relay_timelock-0.2.0a4-py3-none-manylinux_2_34_x86_64.whl Python 3 none Linux glibc 2.34+ x86-64 Details
attested_relay_timelock-0.2.0a4-py3-none-manylinux_2_34_aarch64.whl Python 3 none Linux glibc 2.34+ ARM64 Details
attested_relay_timelock-0.2.0a4-py3-none-macosx_15_0_arm64.whl Python 3 none macOS 15.0+ ARM64 Details

Total release size: 1.8 MB

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

Download URL attested_relay_timelock-0.2.0a4-py3-none-manylinux_2_34_x86_64.whl
Size 648.9 kB
Tags Linux glibc 2.34+ x86-64 Python 3
SHA-256 checksum
How to use checksums
9ee0d844f77bc7f88a2b78550c0380346a21f22e6c8b4c46155ab89554b9c7a6
BLAKE2b-256 checksum
How to use checksums
d75685a3d3c36e070857771ca86b8aa54e79d40ca3056a1a9c035c23c52135fb
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.0a4-py3-none-manylinux_2_34_aarch64.whl

Download URL attested_relay_timelock-0.2.0a4-py3-none-manylinux_2_34_aarch64.whl
Size 593.7 kB
Tags Linux glibc 2.34+ ARM64 Python 3
SHA-256 checksum
How to use checksums
d474d50248bd9808009567d3b75d1107a1fa34694c44ae2d83b6dc2d9f84ce45
BLAKE2b-256 checksum
How to use checksums
eb74481e7f9978c94585953b7cf86c78fbaba9e166dbf4802435289546cb40a6
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.0a4-py3-none-macosx_15_0_arm64.whl

Download URL attested_relay_timelock-0.2.0a4-py3-none-macosx_15_0_arm64.whl
Size 568.1 kB
Tags Python 3 macOS 15.0+ ARM64
SHA-256 checksum
How to use checksums
489e70d8d4dae15dfa83563e0bcdbf52ceb2ad23d3e916e3693d4b3183e4d477
BLAKE2b-256 checksum
How to use checksums
5270d9239e675bf1d0de7cbfa13daaf36abb274ff6d1ca90948a5ddfa53c3402
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