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 + XORat ~1,500 gas instead of ~50M. The valuable EVM cryptographic primitives have been extracted into standalone libraries:
- evm-lwe-math — gas-optimized LWE inner-product primitives
- evm-linear-accumulator — seed-derived linear hash accumulator over Z_q
- evm-mhf — EVM-native memory-hard function
- evm-lattice-pow — lattice-based proof of work
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:
- Topology mixing
- LWE control-function hiding (
n=384,sigma=25,q=65521) - Wire binding
Standalone cryptographic primitives (also available as separate repositories):
- LWE inner-product math: https://github.com/igor53627/evm-lwe-math
- Linear accumulator: https://github.com/igor53627/evm-linear-accumulator
- Memory-hard function primitive (MHF): https://github.com/igor53627/evm-mhf
- Lattice PoW primitive: https://github.com/igor53627/evm-lattice-pow
Compatibility note: the canonical contract keeps optional hash-PoW reveal gating and MHF-backed key derivation paths.
- 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
# 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.shRun local benchmark script:
forge script scripts/BenchmarkTLOS.s.sol --use 0.8.30Or broadcast to Tenderly:
source ~/.zsh_secrets
forge script scripts/BenchmarkTLOS.s.sol --rpc-url "$TENDERLY_RPC" --broadcast --unlocked -vvvcontracts/
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
TLOSWithPuzzleV5name is retained for compatibility, but it is now core-only.- MHF/PoW research primitives are maintained outside this repository.
reveal(bytes32)works only whenpowDifficulty == 0.- For PoW-enabled deployments use
revealWithPow(bytes32,uint64).
- 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.
This repo uses backlog.md:
backlog task list --plain
backlog task view TASK-66 --plainroborev runs on commit via post-commit hook:
roborev list
roborev show <job_id>
roborev address <job_id>