npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@dyber/quantacore-sdk

v1.0.1

Published

Node.js bindings for the QUAC 100 Post-Quantum Cryptographic Accelerator

Downloads

13

Readme

@dyber/quantacore-sdk

Node.js bindings for the QUAC 100 Post-Quantum Cryptographic Accelerator.

npm version License

Features

  • ML-KEM (Kyber): Post-quantum key encapsulation (512, 768, 1024 security levels)
  • ML-DSA (Dilithium): Post-quantum digital signatures (44, 65, 87 security levels)
  • QRNG: Quantum random number generation with hardware entropy
  • Hardware Hashing: SHA-2, SHA-3, SHAKE, HMAC, HKDF
  • HSM Key Storage: Secure key management in hardware
  • TypeScript: Full type definitions included

Requirements

  • Node.js 16.0 or later
  • QUAC 100 device and native library installed
  • Linux, Windows, or macOS

Installation

npm install @dyber/quantacore-sdk

Quick Start

import {
  initialize,
  cleanup,
  openFirstDevice,
  KemAlgorithm,
} from '@dyber/quantacore-sdk';

// Initialize library
initialize();

// Open device
const device = openFirstDevice();

// Generate ML-KEM-768 key pair
const keypair = device.kem.generateKeypair(KemAlgorithm.MlKem768);

// Encapsulate (sender)
const { ciphertext, sharedSecret } = device.kem.encapsulate(
  keypair.publicKey,
  KemAlgorithm.MlKem768
);

// Decapsulate (receiver)
const decrypted = device.kem.decapsulate(
  keypair.secretKey,
  ciphertext,
  KemAlgorithm.MlKem768
);

// Clean up
device.close();
cleanup();

Examples

Key Exchange (ML-KEM)

import { initialize, cleanup, openFirstDevice, KemAlgorithm } from '@dyber/quantacore-sdk';

initialize();
const device = openFirstDevice();
const kem = device.kem;

// Generate key pair
const keypair = kem.generateKeypair768();

// Encapsulate
const { ciphertext, sharedSecret } = kem.encapsulate768(keypair.publicKey);

// Decapsulate
const decrypted = kem.decapsulate768(keypair.secretKey, ciphertext);

console.log('Secrets match:', sharedSecret.equals(decrypted));

device.close();
cleanup();

Digital Signatures (ML-DSA)

import { initialize, cleanup, openFirstDevice, SignAlgorithm } from '@dyber/quantacore-sdk';

initialize();
const device = openFirstDevice();
const sign = device.sign;

// Generate key pair
const keypair = sign.generateKeypair(SignAlgorithm.MlDsa65);

// Sign
const message = Buffer.from('Hello, World!');
const signature = sign.sign(keypair.secretKey, message, SignAlgorithm.MlDsa65);

// Verify
const isValid = sign.verify(keypair.publicKey, message, signature, SignAlgorithm.MlDsa65);
console.log('Signature valid:', isValid);

device.close();
cleanup();

Hashing

import { initialize, cleanup, openFirstDevice, HashAlgorithm } from '@dyber/quantacore-sdk';

initialize();
const device = openFirstDevice();
const hash = device.hash;

// One-shot hash
const digest = hash.sha256('Hello, World!');
console.log('SHA-256:', digest.toString('hex'));

// Incremental hash
const ctx = hash.createContext(HashAlgorithm.Sha3_256);
ctx.update('Hello, ');
ctx.update('World!');
console.log('SHA3-256:', ctx.finalize().toString('hex'));

// HMAC
const key = Buffer.from('secret');
const mac = hash.hmacSha256(key, 'message');
console.log('HMAC:', mac.toString('hex'));

// HKDF
const derived = hash.hkdfSha256(
  Buffer.from('ikm'),
  Buffer.from('salt'),
  Buffer.from('info'),
  32
);

device.close();
cleanup();

Random Number Generation (QRNG)

import { initialize, cleanup, openFirstDevice } from '@dyber/quantacore-sdk';

initialize();
const device = openFirstDevice();
const random = device.random;

// Random bytes
const bytes = random.bytes(32);
console.log('Random bytes:', bytes.toString('hex'));

// Random integers
console.log('Dice roll:', random.int(1, 6));
console.log('Random uint32:', random.uint32());

// Random float
console.log('Random float:', random.float());

// UUID
console.log('UUID:', random.uuid());

// Shuffle array
const items = [1, 2, 3, 4, 5];
random.shuffle(items);
console.log('Shuffled:', items);

device.close();
cleanup();

HSM Key Storage

import { initialize, cleanup, openFirstDevice, KeyType, KeyUsage } from '@dyber/quantacore-sdk';

initialize();
const device = openFirstDevice();
const keys = device.keys;

// Store a key
const keyData = Buffer.alloc(32).fill(0x42);
keys.store(0, KeyType.Secret, 0, KeyUsage.Encrypt | KeyUsage.Decrypt, 'my-key', keyData);

// Load the key
const loaded = keys.load(0);
console.log('Key loaded:', loaded.equals(keyData));

// Get key info
const info = keys.getInfo(0);
console.log('Label:', info.label);

// Delete the key
keys.delete(0);

device.close();
cleanup();

API Reference

Library Functions

  • initialize(flags?) - Initialize the library
  • cleanup() - Clean up the library
  • isInitialized() - Check initialization state
  • getVersion() - Get library version
  • openFirstDevice() - Open first available device
  • openDevice(index) - Open device by index
  • getDeviceCount() - Get number of devices
  • enumerateDevices() - List all devices

Device

  • device.kem - KEM operations
  • device.sign - Signature operations
  • device.hash - Hash operations
  • device.random - Random number generation
  • device.keys - HSM key storage
  • device.getInfo() - Get device information
  • device.getStatus() - Get device status
  • device.selfTest() - Run self-test
  • device.close() - Close device

Algorithms

| Type | Variants | |------|----------| | KemAlgorithm | MlKem512, MlKem768, MlKem1024 | | SignAlgorithm | MlDsa44, MlDsa65, MlDsa87 | | HashAlgorithm | Sha256, Sha384, Sha512, Sha3_256, Sha3_384, Sha3_512, Shake128, Shake256 |

Environment Variables

| Variable | Description | |----------|-------------| | QUAC100_LIB_PATH | Path to native library |

Running Tests

npm test
npm run test:coverage

Running Examples

npm run example:basic
npm run example:kem
npm run example:sign
npm run example:hash
npm run example:random

Documentation

License

Copyright © 2024-2025 Dyber, Inc. All rights reserved.

This software is proprietary and confidential. See LICENSE for details.

Support

  • Email: [email protected]
  • Website: https://dyber.org
  • GitHub Issues: https://github.com/dyber-pqc/quantacore-sdk/issues