Documentation
Docs42. Security Architecture & Threat Model

42. Security Architecture & Threat Model

The Kortana blockchain is architected under an adversarial threat model that assumes the presence of Byzantine validating nodes, malicious transaction submitters, hostile network partitioning, and weaponized smart contract bytecode payloads.

42.1 Consensus & Cryptographic Security

Consensus safety in Kortana is mathematically proven under the standard Byzantine Fault Tolerance assumption where total malicious voting power cannot exceed f out of N >= 3f + 1 total bonded stake. Finality is non-probabilistic: once a proposed block receives 2f + 1 valid BLS12-381 signatures aggregated into a Quorum Certificate (QC), the block is finalized permanently.

To prevent equivocating validators from causing chain splits after sudden power outages, every node maintains an fsynced High-Water Mark in RocksDB. Before broadcasting any vote or proposal, the node flushes its current view and height to non-volatile disk; if the process crashes and restarts, it refuses to vote on any proposal at or below the high-water mark. Furthermore, the Delegated Proof of History (dPOH) SHA-256 hash stream is strictly non-parallelizable, preventing attackers with massive computational arrays from pre-computing future leader hash chains.

42.2 Network Security & DDoS Mitigation

The KortanaNet peer-to-peer layer deploys multi-layered defense-in-depth mitigations against distributed denial-of-service, Sybil, and Eclipse attacks. Every incoming TCP connection must complete a cryptographic SIGMA (Sign-and-MAC) handshake before allocating application heap memory. Connections with invalid signatures or blacklisted public keys are terminated immediately at the transport boundary.

To eliminate memory exhaustion (OOM) exploits, the node enforces a strict 16 MB maximum frame cap on all network packets. If an incoming message header declares a payload exceeding 16 MiB, the frame is dropped instantly. Peer tables enforce /24 IPv4 and /48 IPv6 subnet caps alongside ASN diversity tracking, preventing botnets from dominating a validator's routing table. Public JSON-RPC nodes sit behind edge reverse proxies that enforce per-IP rate limiting and payload validation.

42.3 Execution Security

Smart contract security in Kortana is enforced at both the language and virtual machine layers. The Kortana Virtual Machine (KVM) eliminates the dangerous, error-prone stack manipulation of traditional virtual machines by using a 32-register architecture with fixed 4-byte instructions and checked 256-bit arithmetic. All arithmetic operations trap on overflow or underflow by default.

The Quorlin programming language enforces Mandatory Capability Declarations (reads and writes) at compile time. Functions declared with reads are statically prohibited from mutating storage slots, transferring balances, or invoking external state-modifying functions, lowering directly to StaticCall instructions and eliminating entire classes of reentrancy vulnerabilities. Dynamic dispatch, untyped fallback functions, and dangerous self-destruct opcodes are deliberately omitted from the language.

42.4 Storage & State Security

Persistence in kortanad is secured by an enterprise-grade, 14-column family RocksDB backend. Every state transition, receipt insertion, and block header commit is batched into an atomic transaction written synchronously to a Write-Ahead Log (WAL) with mandatory fsync durability.

During startup, the crash recovery engine validates the Merkle-Patricia State Trie against the authoritative block header state_root. If a disk corruption or uncommitted WAL discrepancy is detected, the node safely halts with an actionable diagnostic report rather than propagating a corrupted state root to the network.