KIRQ Integration Tutorial

KIRQ VM
Toshiba QKD
QKD Client
TAO Agent
1
Configure KIRQ VM Connection
Set up environment variables and establish secure connection to your KIRQ VM interface. This creates the bridge between your home machine and the Toshiba QKD hardware.
# /opt/tao-signal-agent/.env.kirq QKD_API_URL=https://<KIRQ_VM_IP>/api/v1/keys QKD_AUTH_TOKEN=<YOUR_KIRQ_AUTH_TOKEN> KIRQ_NETWORK_ID=<YOUR_NETWORK_ID> TOSHIBA_ENDPOINT=<TOSHIBA_QKD_IP>
What happens: SSH tunnel establishes, authentication verified, API endpoint accessible
2
Update Rust QKD Client
Modify the QKD client to route requests through KIRQ VM instead of direct connection. This enables quantum key retrieval with proper authentication and routing.
// src/qkd/api.rs pub async fn fetch_kirq_entropy(&self) -> Result<Vec<String>> { let kirq_endpoint = format!("{}/kirq/{}/qkd", self.api_url, self.kirq_network_id); let response = self.client .get(&kirq_endpoint) .header("Authorization", format!("Bearer {}", self.auth_token)) .header("X-Kirq-Network", &self.kirq_network_id) .send().await?; Ok(keys) }
What happens: Rust client connects through KIRQ VM, retrieves quantum keys via BB84 protocol
3
Fix STARK Proof Verification
Address the reviewer's concern about STARK proofs "not proving anything" by ensuring circuit constraints are meaningful and VRF output links to actual quantum entropy.
// Verify STARK proof actually proves: // 1. Quantum measurement was performed correctly // 2. VRF output derives from quantum entropy // 3. No classical simulation occurred // 4. Entropy meets min-entropy threshold (0.98/bit)
What happens: STARK circuit validates quantum measurement integrity, proves entropy quality
4
Entropy Push Receiver
Implement the FastAPI endpoint that receives entropy pushes from KIRQ Hub. Enforces quantum no-cloning principle: entropy consumed on read, never stored.
@router.post("/entropy/push") async def receive_entropy_push(push: EntropyPush): # Classify entropy type (QKD, HSM, mixed, quantum_vault) entropy_type = classify_entropy_type(push.sources) # Pass-through to consumers (no storage) await entropy_channel.put(event) return {"accepted": True, "type": entropy_type}
What happens: Entropy flows through system, classified by source, consumed once
5
TAO Signal Integration
Connect Python TAO Signal Agent with Rust QKD client via PyO3 bindings or subprocess. Enable background forwarding to Quantum Harmony priority queue.
class CryptoRNGService: def _init_qkd_client(self): kirq_config = { "api_url": os.getenv("QKD_API_URL"), "auth_token": os.getenv("QKD_AUTH_TOKEN"), "kirq_network_id": os.getenv("KIRQ_NETWORK_ID") } self.qkd_client = KirqQKDClient(**kirq_config)
What happens: Python-Rust bridge established, entropy flows to TAO Signal Agent
6
Deploy Quantum Harmony
Complete end-to-end deployment with libp2p QKD channels and priority queue management. Full quantum entropy distribution from Toshiba hardware to blockchain validators.
// Quantum Harmony priority queue { "jsonrpc": "2.0", "method": "submit_event", "params": [qrng_event, 100], // Priority 100 for quantum entropy "id": 1 }
What happens: Full system active, quantum entropy powers blockchain consensus
Home Machine
Your Computer
SSH: Idle
KIRQ VM
Interface Layer
Auth: Pending
Toshiba QKD
BB84 Protocol
QBER: 0%
QKD Client
Rust + Falcon-512
Keys: 0
TAO Signal
Python API
Entropy: 0 kbps
Quantum Harmony
Blockchain
Blocks: 0
Current Step:Initializing...
Entropy Flow:0 bits/sec
QKD Key Rate:0 kbps
STARK Proofs:0 generated