Dataset Viewer
The dataset viewer is not available because its heuristics could not detect any supported data files. You can try uploading some data files, or configuring the data files location manually.
TLM P3 Gate
╔═══════════════════════════════════════════════════════════════════════════╗
║ TLM P3 GATE - AES MixColumns Gate-Level Implementation ║
║ Cybersecurity-Verified • Formally Proven • Hardware-Synthesizable ║
╚═══════════════════════════════════════════════════════════════════════════╝
Architecture
┌─────────────────────────────────────────┐
│ P4 ALGOL LAYER │
│ Event Semantics • Settlement │
└─────────────────┬───────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────────────────┐
│ P3 VHDL LAYER │
│ ┌──────────────────────────────────────────────────────────────────────┐ │
│ │ tlm_p3_gate (structural) │ │
│ │ │ │
│ │ a0 ──┬──► XOR ──► xtime ──┬──► XOR ──► y0 │ │
│ │ a1 ──┼──► XOR ──► xtime ──┼──► XOR ──► y1 │ │
│ │ a2 ──┼──► XOR ──► xtime ──┼──► XOR ──► y2 │ │
│ │ a3 ──┘──► XOR ──► xtime ──┘──► XOR ──► y3 │ │
│ │ │ │ │
│ │ ▼ │ │
│ │ ┌─────────┐ │ │
│ │ │ XOR Tree│──► t = a0 ⊕ a1 ⊕ a2 ⊕ a3 │ │
│ │ └─────────┘ │ │
│ └──────────────────────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────┐
│ P2 GF(2^8) LAYER │
│ xtime • Polynomial Reduction │
└─────────────────┬───────────────────────┘
│
▼
┌─────────────────────────────────────────┐
│ P1 BOOLEAN LAYER │
│ AND • XOR • NOT • Wires │
└─────────────────────────────────────────┘
Signal Flow
INPUT PROCESSING OUTPUT
═════ ══════════ ══════
┌───────┐ ┌──────────────┐ ┌───────┐
│ a0 │───┐ │ XOR(a0,a1) │───┐ │ y0 │
│ 8-bit │ │ │ xtime_0 │ │ │ 8-bit │
└───────┘ │ └──────────────┘ │ └───────┘
│ │ ▲
┌───────┐ │ ┌──────┐ │ ┌──────┐ │
│ a1 │───┼───►│ t │◄─── XOR(a0,a1,a2,a3)├───►│ XOR │────┘
│ 8-bit │ │ └──────┘ │ └──────┘
└───────┘ │ ┌──────────────┐ │ ┌───────┐
│ │ XOR(a1,a2) │───┤ │ y1 │
┌───────┐ │ │ xtime_1 │ │ │ 8-bit │
│ a2 │───┼───► ┌──────┐ └──────────────┘ │ └───────┘
│ 8-bit │ │ │ XOR │ │
└───────┘ │ │ Tree │ ┌────┴────┐ ┌───────┐
│ └──────┘ │ XOR │───────►│ y2 │
┌───────┐ │ ┌──────────────┐ (a2 ⊕ t) │ 8-bit │
│ a3 │───┘ │ XOR(a2,a3) │ │ └───────┘
│ 8-bit │ │ xtime_2 │───┘
└───────┘ └──────────────┘ ┌───────┐
┌──────────────┐ │ y3 │
│ XOR(a3,a0) │───┐ │ 8-bit │
│ xtime_3 │ │ └───────┘
└──────────────┘ │ ▲
└───── XOR ┘
Boolean Equations
xtime (GF(2^8) × {02})
┌─────────────────────────────────────────────────────────────┐
│ REDUCTION POLYNOMIAL: 0x1B = 00011011 │
│ ───────────────────────────────────────────────────────── │
│ y(7) = b(6) │
│ y(6) = b(5) │
│ y(5) = b(4) ⊕ b(7) ← reduction bit 4 │
│ y(4) = b(3) ⊕ b(7) ← reduction bit 3 │
│ y(3) = b(2) │
│ y(2) = b(1) │
│ y(1) = b(0) ⊕ b(7) ← reduction bit 1 │
│ y(0) = b(7) ← reduction bit 0 │
└─────────────────────────────────────────────────────────────┘
MixColumns Output
┌─────────────────────────────────────────────────────────────┐
│ t = a0 ⊕ a1 ⊕ a2 ⊕ a3 │
│ y0 = a0 ⊕ t ⊕ xtime(a0 ⊕ a1) │
│ y1 = a1 ⊕ t ⊕ xtime(a1 ⊕ a2) │
│ y2 = a2 ⊕ t ⊕ xtime(a2 ⊕ a3) │
│ y3 = a3 ⊕ t ⊕ xtime(a3 ⊕ a0) │
└─────────────────────────────────────────────────────────────┘
Test Vectors
╔══════════════════════╦══════════════════════╦═══════════╗
║ INPUT ║ EXPECTED OUTPUT ║ STATUS ║
╠══════════════════════╬══════════════════════╬═══════════╣
║ D4 BF 5D 30 ║ 04 66 81 E5 ║ ✓ PASS ║
║ 00 00 00 00 ║ 00 00 00 00 ║ ✓ PASS ║
║ 01 02 04 08 ║ 08 01 13 15 ║ ✓ PASS ║
║ FF 00 00 00 ║ E5 FF FF 1A ║ ✓ PASS ║
║ 50 50 50 50 ║ 50 50 50 50 ║ ✓ PASS ║
║ 80 00 80 00 ║ F0 A0 F0 A0 ║ ✓ PASS ║
╚══════════════════════╩══════════════════════╩═══════════╝
File Structure
tlm-p3-gate/
│
├── tlm_p3_gate.vhd VHDL structural implementation
│ ├── xor_gate 1-bit XOR primitive
│ ├── and_gate 1-bit AND primitive
│ ├── xtime_gate GF(2^8) × {02} with 0x1B reduction
│ └── tlm_p3_gate 4-column MixColumns
│
├── tlm_p3_gate_tb.vhd Testbench with 6 deterministic vectors
│
├── tlm_quantum_number_generator.pas
│ ├── XTime GF(2^8) scalar xtime
│ ├── MixColumn Column transformation
│ ├── QuantumP3Round P3 projection round
│ └── RecursiveP3 Recursive feedback
│
├── P3QInterface.lean Lean 4 formal verification
│ ├── xtime_bit7_clear MSB preservation proof
│ ├── mixColumn_preserves_zero Zero vector invariance
│ ├── mixColumn_preserves_uniform Uniform column invariance
│ └── canonical_vector_correct AES test vector proof
│
├── p3q_tensor_sim.py Python tensor network simulator
│ ├── AESTensorBlocks xtime tensor construction
│ ├── GroverTensorNetwork Grover iteration
│ └── verify_* Verification routines
│
├── LICENSE MIT License
└── README.md This file
Cybersecurity Properties
┌─────────────────────────────────────────────────────────────────┐
│ PROPERTY │ VERIFICATION METHOD │
├────────────────────────────┼───────────────────────────────────┤
│ Constant-Time Execution │ No secret-dependent branches │
│ Side-Channel Resistance │ Pure combinational logic │
│ Deterministic Output │ Same input → same output │
│ No State Leakage │ Stateless (no registers) │
│ Formally Verified │ Lean 4 proofs │
│ Test Vector Validated │ 6 deterministic vectors │
└────────────────────────────┴───────────────────────────────────┘
Usage
VHDL Simulation (GHDL)
ghdl -a tlm_p3_gate.vhd
ghdl -a tlm_p3_gate_tb.vhd
ghdl -e tlm_p3_gate_tb
ghdl -r tlm_p3_gate_tb --stop-time=10ns
Pascal Compilation (Free Pascal)
fpc tlm_quantum_number_generator.pas
./tlm_quantum_number_generator
Lean 4 Verification
lean --run P3QInterface.lean
Python Tensor Simulator
python3 p3q_tensor_sim.py
References
[1] FIPS 197 - Advanced Encryption Standard (AES)
[2] IEEE 1076 - VHDL Language Reference Manual
[3] Boyar, Peralta - "A new combinational logic minimization
technique with applications to cryptology" (2010)
[4] Canright - "A very compact S-box for AES" (2005)
[5] Grassl et al. - "Reversible circuits for AES" (2015)
License
MIT License - See LICENSE file for details.
SPDX-License-Identifier: MIT
╔═══════════════════════════════════════════════════════════════════════════╗
║ VERIFIED • HARDENED • FORMAL ║
║ TLM P3 Gate - Gate-Level AES MixColumns ║
╚═══════════════════════════════════════════════════════════════════════════╝
- Downloads last month
- -