Skip to content

Latest commit

Β 

History

History
85 lines (70 loc) Β· 4.34 KB

File metadata and controls

85 lines (70 loc) Β· 4.34 KB
tags cyber, cip
crystal-type entity
crystal-domain cyber
status draft

nox security

security properties and formal guarantees of [[nox]]

security bounds

SOUNDNESS:       Invalid transactions rejected with probability β‰₯ 1 - 2^(-128)
PRIVACY:         Cannot distinguish transactions with same public structure
CONSERVATION:    Ξ£(energy) = initial + minted - burned (mathematically enforced)
QUANTUM RESIST:  Hash-based security only, ~128-bit post-quantum (Grover limit)

attack surface

Attack          β”‚ Defense
────────────────┼─────────────────────────────────────────────
Double Spend    β”‚ Nullifier set prevents reuse
Inflation       β”‚ Circuit enforces conservation
Front-Running   β”‚ Privacy hides transaction contents
Sybil           β”‚ Focus proportional to stake
DoS             β”‚ Focus-based metering limits computation
Eclipse         β”‚ Namespace completeness proofs
Replay          β”‚ Nonces and nullifiers ensure uniqueness
Forgery         β”‚ ZK proofs unforgeable without witness

formal properties

Turing completeness

Theorem: nox is Turing-complete. Proof: Construct encoding of arbitrary Turing machine M via patterns 0-4, 9. ∎

confluence

Theorem: nox is confluent. Proof: Orthogonal rewrite system by Huet-Levy (1980). ∎

cost determinism

Theorem: Cost is identical across all reduction orders and implementations. Proof: By structural induction on formula. ∎

focus conservation

Theorem: $\sum_i \text{focus}(i) = 1$ for all valid states. Proof: All operations preserve sum; invalid transitions rejected by verification. ∎

privacy soundness

Theorem: A valid ZK proof implies all circuit constraints are satisfied with probability $\geq 1 - 2^{-128}$. Proof: By [[zheng]] soundness. ∎

double-spend prevention

Theorem: Same record cannot be spent twice. Proof:

  1. Each record has unique (nonce, owner_secret) pair
  2. Nullifier = H(nonce, owner_secret) is deterministic
  3. Same record β†’ same nullifier
  4. Nullifier set is append-only
  5. Transaction rejected if nullifier already in set ∎

complexity comparison

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚     Operation       β”‚  Traditional  β”‚  Blockchain   β”‚   Database    β”‚     nox       β”‚
β”‚                     β”‚  (RAM model)  β”‚  (Ethereum)   β”‚  (SQL/NoSQL)  β”‚               β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Equality check      β”‚ O(n) compare  β”‚ O(n) compare  β”‚ O(n) compare  β”‚ O(1) hash     β”‚
β”‚ Membership proof    β”‚ O(n) scan     β”‚ O(log n) MPT  β”‚ O(log n) indexβ”‚ O(logΒ² n) polyβ”‚
β”‚ Completeness proof  β”‚ impossible    β”‚ impossible    β”‚ impossible    β”‚ O(logΒ² n) polyβ”‚
β”‚ Computation verify  β”‚ O(n) re-exec  β”‚ O(n) re-exec  β”‚ N/A           β”‚ O(log n) zhengβ”‚
β”‚ Recursive verify    β”‚ O(n) re-exec  β”‚ O(n) re-exec  β”‚ N/A           β”‚ O(1) composed β”‚
β”‚ Privacy + verify    β”‚ incompatible  β”‚ incompatible  β”‚ incompatible  β”‚ O(1) ZK proof β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Cost determinism    β”‚ βœ— cache-dep   β”‚ ~ gas approx  β”‚ βœ— query-dep   β”‚ βœ“ structural  β”‚
β”‚ Parallel safety     β”‚ βœ— explicit    β”‚ βœ— sequential  β”‚ βœ— locks       β”‚ βœ“ confluent   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

see [[cyber/nox]] for the execution model, [[cyber/bbg]] for the ZK privacy architecture, [[zheng]] for proof verification