-
Notifications
You must be signed in to change notification settings - Fork 0
Get Started
Elijah Brown edited this page Apr 7, 2026
·
5 revisions
You can use the QuarkDash library as a regular library for both Backend and Frontend applications without any additional dependencies.
Installation using NPM:
npm install quarkdashOr using GitHub:
git clone https://github.com/devsdaddy/quarkdash
cd ./quarkdashQuarkDash can be used at client and server. The library is written on typescript.
/benchmarks/ # Benchmarks folder
/src/ # Source code folder
cipher.ts # Different cipher implementations (Gimli and ChaCha20 out-of-the-box)
crypto.ts # General QuarkDash module
index.ts # Main module
kdf.ts # KDF (based on SHAKE256) implementation
mac.ts # MAC (based on SHAKE256) implementation
ringlwe.ts # Ring-LWE implementation
types.ts # QuarkDash basic types
utils.ts # Crypto utils for QuarkDash
shake.ts # Shake-256 Keccak implementation
/dist/ # Builded library
/test/ # General tests (can be launched with jest)
/* Import modules */
import {CipherType, QuarkDash, QuarkDashUtils} from "../src";
/* Alice - client, bob - server, for example for key-exchange */
const alice = new QuarkDash({ cipher: CipherType.Gimli });
const bob = new QuarkDash({ cipher: CipherType.Gimli });
/* Generate key pair */
const alicePub = await alice.generateKeyPair();
const bobPub = await bob.generateKeyPair();
/* Initialize session at bob and jpin alice public key */
const ciphertext = await alice.initializeSession(bobPub, true) as Uint8Array;
await bob.initializeSession(alicePub, false);
await bob.finalizeSession(ciphertext);
/* Encrypt by alice and decrypt by bob */
const plain = QuarkDashUtils.textToBytes('Hello QuarkDash 🔒!');
const enc = await alice.encrypt(plain);
const dec = await bob.decrypt(enc);
console.log("Decrypted:", QuarkDashUtils.bytesToText(dec));| Command | Usage |
|---|---|
| npm run clean | Clean build |
| npm run build | Main build exec |
| npm run build:esm | Build esm module |
| npm run build:cjs | Build commonjs module |
| npm run build:types | Build types only |
| npm run test | Run basic tests |
| npm run bench | Run basic benchmakr |
Need more examples? Visit an examples page
Home | Get Started| NPM | Algorithm Overview | Contacts