Skip to content

Latest commit

 

History

20 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ZK-Disorder

Hyperchaotic Zero-Knowledge Privacy Protocol

ZK-Disorder is a novel privacy primitive that abandons heavy arithmetic circuits (SNARKs/STARKs) in favor of Chaotic Dynamical Systems. By utilizing the fract hyperchaotic hash function, it achieves encryption and zero-knowledge proofs that are 10-50x orders of magnitude faster and lighter than elliptic-curve alternatives;

Status: Experimental / Research Grade. Primitive: FRACT-256 (Hyperchaotic Sponge)

-> FRACT: github/morphym/fract

grokipedia;

WHITEPAPER on zk-disorder:
https://pawit.co/whitepapers/zk-disorder.pdf

Anchor Program Impl: Anchor project impl.


Metrics (machine used 4vCPU 2.25GHZ x86)

FRACT.

Frame 2

ZK-Disorder diff.

Frame 2 (1) upscalemedia-transformed (3)

Verified on chain evidence

on solana devnet

Encryption Operation: 3,316 CU consumed (Slot 439,029,170) https://explorer.solana.com/tx/2mmQsU9JtY4UV95sj8JFmtauWqNfEd43L21CqLoazgXXcxmQGmsqqFNn ...

Proof Verification: 239,234 CU consumed (Slot 439,029,174) https://explorer.solana.com/tx/4cAFKBLee4MxMUGLCzp4w2sSXse5x2foQy98Rb87u6LiZt9fwG1A1fhK ...

Encryption & Proof Gen

princee@princee:~/projects/codename/sylix/sylix/zk_disorder$ ./target/release/bench
=== ZK-Disorder: Benchmark  ===
Specs: 8-Round Hyperchaotic Sponge, Cut-and-Choose (4 Slices)

[1] Encryption Phase (Client Side)
    Time:        747.00ns
    Throughput:  Extremely High (Linear Chaos)

[2] Proof Generation (Client Side)
    Time:        47.21µs
    Proof Size:  968 bytes (Borsh)
    Status:      FITS IN SINGLE UDP PACKET / MTU (Perfect)

[3] Verification (On-Chain Simulation)
    Result:      VALID
    Time:        25.16µs


[4] Stress Test (1,000 Iterations)
    Avg Verify Time: 11.17 µs
    Verify TPS:      89550

Test it for youself:

cargo build --release && ./target/release/bench

The Core Mechanic: Chaos as a Commitment

Traditional ZK proves knowledge of a path through an algebraic circuit. ZK-FRACT proves knowledge of a trajectory through a chaotic attractor.

1. The Lattice (Encryption)

The internal state is a 256-bit lattice evolving under the Hybrid Logistic-Tent Map ($\Phi$)- This is through 'FRACT'

  • Encryption: A Duplex Sponge. The secret key is the Capacity. The message is absorbed into the Rate.
  • Security: Mathematical chaos ensures that without the initial capacity, predicting the trajectory (decrypting) requires inverting a system with 4 positive Lyapunov exponents.

2. The Trace (Proof)

Instead of building a R1CS constraint system, the Prover records the "physics" of the encryption:

  1. Commitment: The Prover Merkle-hashes the entire execution trace (state at every round).
  2. Challenge: The Verifier (Fiat-Shamir) asks to see random slices of time (e.g., Round 3 to 4).
  3. Response: The Prover reveals only those specific state transitions.

3. The Check (Verification)

The Verifier runs the chaotic map $\Phi$ on State[i] and asserts it equals State[i+1].

  • If the physics holds, the trace is valid.
  • If the Merkle proofs hold, the trace was committed before the challenge.
  • Result: Valid proof of key ownership without revealing the key.

Performance Benchmarks

NOTE: Always run benchmarks in --release. Debug builds include overflow checks and lack vectorization, skewing chaotic map performance by 10-100x.

cargo run --bin bench --release

Security Analysis

Security relies on the hardness of the Chaotic Inversion Problem. Unlike RSA (factoring) or EC (discrete log), breaking ZK-FRACT requires finding a preimage in a non-linear system that expands entropy exponentially.

Brute Force Simulation

We attempted to recover a 128-bit key from a known plaintext/ciphertext pair.

cargo run --bin simple_brute --release

Results:

[Attack] Launching 50,000,000 brute-force attempts...
Status:    FAILED
Time:      124.37s
Speed:     0.40 Million keys/sec
Est. Time: 2.68e25 Years to exhaust key space

Classical Analysis: Recovering the key requires solving a system of coupled modular equations of degree $\ge 2$. The Jacobian is non-invertible in $\mathbb{Z}_{2^{64}}$, rendering algebraic attacks (Gröbner basis) computationally infeasible ($> 2^{192}$ ops).


Usage

Add it directly (prefered):

cargo add zk-disorder

Add manually Dependency:

[dependencies]
zk-disorder = "0.1.1" # check latest version.
fract = "1.2.3" # 1.2.3 is stable version for zk-disorder as it contain no deps, other version may contain deps that are for terminal or hex this is for general usecase, but, zk-disorder doesn't need such.

Run Tests:

cargo test --release

Docs

Read doc


References

License

Eveything presented is Licensed either MIT or CC 4.0.

About

A Hyperchaotic; Fast & Low cost ZK encryption on chain solana

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Contributors

Languages