Documentation
Docs40. Cryptographic Primitives

40. Cryptographic Primitives

Kortana utilizes a robust, modern cryptographic suite engineered for quantum resistance awareness, zero-latency verification, and mathematical correctness.

40.1 Hash Functions

The Kortana architecture deploys three specialized cryptographic hash functions, each selected for specific mathematical and performance properties:

  • SHA-256 (FIPS 180-4): Used as the core hashing primitive for the continuous Delegated Proof of History (dPOH) Verifiable Delay Function. Its strict pre-image resistance and sequential computation requirements prevent parallelization, establishing an objective physical clock.
  • Keccak-256 (SHA-3 predecessor): The Ethereum-standard hashing algorithm, used for EVM address derivation, contract storage slot mapping, Merkle-Patricia Trie node hashing, and function selector computation.
  • BLAKE3: An ultra-high-speed cryptographic hash function optimized for modern SIMD architectures (AVX-512, NEON). Used internally for high-throughput P2P message framing checksums, block header hashing, and memory-mapped state validation.

40.2 Signature Schemes

Kortana implements three distinct digital signature schemes:

  • secp256k1 ECDSA: The standard elliptic curve signature scheme used across all Ethereum-compatible KEVM transactions. Kortana strictly enforces EIP-2 low-S canonical malleability checks (s <= secp256k1_n / 2).
  • Ed25519 (EdDSA): High-speed Edwards-curve signature algorithm used for native ktn: accounts, CLI operations, and P2P SIGMA handshake authentication. Ed25519 provides complete immunity to side-channel timing attacks and ultra-fast verification.
  • BLS12-381: Pairing-friendly elliptic curve used by consensus validators in KSC BFT. BLS12-381 allows thousands of validator signatures to be aggregated into a single, constant-size 96-byte Quorum Certificate (G2).

40.3 Encryption, Key Derivation & Encoding

  • AES-128-CTR & AES-256-GCM: Symmetric ciphers used for password-encrypted Keystore V3 wallet files and P2P transport encryption under the SIGMA protocol.
  • scrypt: A memory-hard password-based key derivation function (KDF) that protects encrypted keystores against GPU/ASIC brute-force dictionary attacks.
  • Constant-Time Comparison: All authentication, MAC verification, and signature checks universally enforce sodium_memcmp to eliminate timing side-channel attacks.
  • RLP (Recursive Length Prefix): The canonical byte serialization standard for block headers, transactions, receipts, and state trie nodes.