Comparison of algorithms - DevsDaddy/quarkdash GitHub Wiki

Benchmarks

Below is information on synthetic benchmark tests, as well as some comparative characteristics of popular encryption methods.

Advantages of QuarkDash over other algorithms

1. AES (symmetric encryption) in comparison

  • Quantum resistance – AES is vulnerable to Grover's algorithm (brute-force attack speeds up by √N).
  • Built-in key exchange – no pre-distribution of keys is required.
  • Forward secrecy – compromising a long-term key does not reveal past sessions.
  • Replay protection – in AES, this must be implemented separately.
  • Faster when implemented in software (QuarkDash is faster than AES without hardware acceleration).

2. ECC (Asymmetric on Elliptic Curves) in comparison

  • Quantum resistance – Shor's algorithm breaks ECC in polynomial time.
  • Better performance for large messages – ECIES encrypts data using AES, but adds the overhead of ECDH.
  • Smaller packet size – 44 bytes versus 61 bytes for ECIES.
  • Easier to implement – ​​no need to check points on the curve or protect against subgroup attacks.

3. RSA (asymmetric factorization) in comparison

  • Quantum resistance – RSA is broken by Shor's algorithm.
  • Huge performance gap – RSA is 250+ times slower for encryption, 1000+ times slower for decryption.
  • Smaller keys – No, RSA has a 256-byte key, while QuarkDash has 2 KB (but 256 bits of security versus 112 bits for RSA-2048).
  • No padding issues – RSA requires complex OAEP, which is susceptible to oracle attacks.
  • Linear scaling – QuarkDash has O(n) complexity, while RSA has O(n³).

Characteristic comparison

Characteristic QuarkDash (ChaCha20) QuarkDash (Gimli) AES-256-GSM ECDH/P-256 + AES RSA-2048 + AES
Type Hybrid Hybrid Symmetric Asymmetric (KEX) Hybrid
Quantum stability ✅ Ring-LWE ✅ Ring-LWE ❌ No ❌ No ❌ No
Encryption speed (1mb) ~2.5 GB/s ~2.8 GB/s ~1.2 GB/s ~50 MB/s (ECIES) ~10 MB/s
Decryption speed (1mb) ~2.5 GB/s ~2.8 GB/s ~1.2 GB/s ~50 MB/s ~1 MB/s
Session speed ~10-15 ms ~10-15 ms 0 ms (pre-shared) ~5 ms ~50 ms
Public key size ~2 KB ~2 KB N/A 33 bytes 256 bytes
Private key size ~1 KB ~1 KB N/A 32 bytes 256 bytes
Overhead size 44 bytes 44 bytes 28 bytes 61 bytes 256+ bytes
Forward secrecy ⚠️ optional
Replay security
Authentication ✅ MAC (SHAKE256) ✅ MAC (SHAKE256) ✅ (GSM) ✅ (ECIES)
Timing attacks security ✅ constant-time ⚠️ Partial ⚠️ Partial
The Difficulty of Quantum Hacking 2^256 2^256 2^128 (Grover) 0 (Shor) 0 (Shor)

Benchmarks

Please, note. This benchmark is launched at Intel i7-12700H, 32GB RAM, Node.js 20

Operation QuarkDash (ChaCha20) QuarkDash (Gimli) AES-256-GSM ECDH (P-256) + AES RSA-2048
Key generation 12.3ms 12.1ms N/A 1.2ms 48ms
Session (KEM) 8.7ms 8.5ms N/A 3.4ms 42ms
Encryption (1KB) 0.003ms 0.0028ms 0.005ms 0.05ms 0.8ms
Decryption (1KB) 0.003ms 0.0028ms 0.005ms 0.05ms 0.1ms
Encryption (1MB) 0.42ms 0.38ms 0.85ms 21ms 102ms
Decryption (1MB) 0.42ms 0.38ms 0.85ms 21ms 1080ms
Speed (MB/s) 2300 2630 1176 48 0.9