Skip to content
Elijah Brown edited this page Aug 28, 2026 · 7 revisions

Wlecome to QuarkDash Crypto Wiki

Welcome to QuarkDash Crypto library wiki. Here you can find comprehensive documentation on the encryption algorithm, including comparative characteristics, a description of the implementation of the basic system components, and much more.

Have a questions? Contact me


Table of Contents


About QuarkDash Crypto

QuarkDash Crypto - It is a hybrid cryptographic protocol that provides post-quantum security, high performance, and attack resistance. This library can be used as shared solution for client and server. Written on pure typescript. Dependency-free.

❓ Why QuarkDash Crypto?

🔹 Lightweight library with zero dependencies;
🔹 Powerful crypto algorithm written in Typescript;
🔹 Extremely fast (great for realtime and IoT applications);
🔹 Production ready with benchmarks;

🔒 General Components

  • Asymmetric key exchange: Ring-LWE (N=256, Q=7681, ROOT=5685) / R-Ring-LWE (Q=12289, ROOT=8340) with hardened NTT + 1-bit per-coeff reconciliation hint (ciphertext 544 B, backward-compatible with 512 B);
  • Symmetric encryption: ChaCha20 (RFC 7539) or lightweight Gimli with lazy keystream generation;
  • Key Derivation Function (KDF): SHAKE256 + HKDF-style expand (fixed, loop bug fixed, deterministic zero-salt for session);
  • Message Authentication Code (MAC): SHAKE256(key‖data) 32 B, constant-time verify, signTwo zero-copy;
  • Hash: SHA-256 / SHA-512 (padding & length fixed for 55/56 and 111/112 edge blocks) and SHAKE-256 (Keccak-f from js-sha3, correct domain separation 0x1F/0x80, empty-input & multi-block squeeze, C/WASM synced);
  • Replay protection: timestamp + sequence number + sliding window;
  • Passphrase KDF: PBKDF2-HMAC-SHA256 / Argon2id-lite;
  • Transports: WebSocket / HTTP / gRPC integrations.

⭐ Key Features

  • Quantum stability: not broken by Shor and Grover's algorithms;
  • Performance: encryption up to 2.8 GB/s, session establishment ~10 ms;
  • Forward secrecy: compromising a long-term key does not reveal past sessions;
  • Lazy keystream: seekable, cached, zero-copy XOR via ChaChaKeystream / GimliKeystream;
  • Re-keying (Key rotation): rekey() / applyRekey() with policy by bytes / messages / time limit (order fixed: encrypt-then-derive);
  • Passphrase: Human-readable pbkdf2 / argon2id lite keys and generateSalt();
  • Hardened Secured NTT: blinding, double-check, constant-time, polynome validation, correct primitive roots, bit-reversed Cooley-Tukey and cross-rounding hint;
  • Transports: native simple wrappers for WebSocket / gRPC / HTTP transport;
  • Flexibility – ChaCha20/Gimli, sync and async API, per-message nonce;

Contribution

Want to help develop the project? You can suggest changes or new features through the issues section of this repository.

Currently, the following are important to me:

  • Maintaining polite communication within the community;
  • Setting appropriate labels for issues and pull requests;
  • Complying with license agreements and the rights of other users;
  • Testing new functionality, explaining the need for improvements;

Licensing

QuarkDash Crypto library is distributed under the MIT license. You can use it however you like. I would appreciate any feedback and suggestions for improvement.

Clone this wiki locally