Skip to content
This repository was archived by the owner on Feb 18, 2026. It is now read-only.
/ tlos Public archive

TLOS: Topology-Lattice Obfuscation for Smart Contracts

Notifications You must be signed in to change notification settings

igor53627/tlos

Repository files navigation

TLOS

Archived. Independent review identified a fundamental category error: TLOS uses LWE as a deterministic symmetric cipher (key derived from input via KDF), making the 640-gate circuit evaluation redundant — the same hidden-payload semantics are achievable with keccak256 + XOR at ~1,500 gas instead of ~50M. The valuable EVM cryptographic primitives have been extracted into standalone libraries:

See also lwe-jump-table for a working application of on-chain LWE control flow obfuscation.


Topology-Lattice Obfuscation for Smart Contracts.

This repository now contains core TLOS only:

  1. Topology mixing
  2. LWE control-function hiding (n=384, sigma=25, q=65521)
  3. Wire binding

Standalone cryptographic primitives (also available as separate repositories):

Compatibility note: the canonical contract keeps optional hash-PoW reveal gating and MHF-backed key derivation paths.

Status

  • Canonical contract: contracts/TLOSWithPuzzleV5.sol (core-only implementation)
  • Shared core library: contracts/libraries/LibTLOS.sol
  • External modules: evm-mhf, evm-lattice-pow, evm-lwe-math, evm-linear-accumulator
  • Core harness/tests: test/TLOSWithPuzzleV5Harness.sol, test/TLOSWithPuzzleV5.t.sol

Quickstart

# Initialize submodules (required for local build/test)
git submodule update --init --recursive

# Build
forge build --use 0.8.30

# Test
forge test --use 0.8.30

# Full core verification pipeline
SOLC_VERSION=0.8.30 ./scripts/verify_core.sh

Benchmarks

Run local benchmark script:

forge script scripts/BenchmarkTLOS.s.sol --use 0.8.30

Or broadcast to Tenderly:

source ~/.zsh_secrets
forge script scripts/BenchmarkTLOS.s.sol --rpc-url "$TENDERLY_RPC" --broadcast --unlocked -vvv

Repository layout

contracts/
  TLOSWithPuzzleV5.sol
  interfaces/IHoneypot.sol
  libraries/LibTLOS.sol

lib/
  evm-mhf/ (git submodule dependency)

test/
  TLOSMultiWitness.t.sol
  TLOSCrowdfund.t.sol
  TLOSTimedWitness.t.sol
  TLOSWithPuzzleV5.t.sol
  TLOSWithPuzzleV5Harness.sol
  TLOSStopLoss.t.sol

examples/
  TLOSMultiWitness.sol
  TLOSCrowdfund.sol
  TLOSTimedWitness.sol
  TLOSStopLoss.sol

docs/
  ARCHITECTURE.md
  SECURITY.md
  LATTICEPOW.md
  project/
    CHANGELOG.md
    KANBAN.md

Notes

  • TLOSWithPuzzleV5 name is retained for compatibility, but it is now core-only.
  • MHF/PoW research primitives are maintained outside this repository.
  • reveal(bytes32) works only when powDifficulty == 0.
  • For PoW-enabled deployments use revealWithPow(bytes32,uint64).

Narrative guidance

  • Core TLOS is a predicate-hiding mechanism: it hides the internal acceptance policy encoded in the circuit.
  • Low-entropy inputs remain dictionary-bound.
  • Treat check(bytes32) as a hidden-policy query over an encoded input, not as general data confidentiality.
  • For memory-hard KDF use-cases, compose with external evm-mhf.
  • For challenge-gated anti-bot flows, compose with external evm-lattice-pow.

Task tracking

This repo uses backlog.md:

backlog task list --plain
backlog task view TASK-66 --plain

Automated review

roborev runs on commit via post-commit hook:

roborev list
roborev show <job_id>
roborev address <job_id>

About

TLOS: Topology-Lattice Obfuscation for Smart Contracts

Resources

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors