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

@kirkelliott/kdfts

v2.0.1

Published

Quantum-seeded KDF — Argon2id with salt from ANU vacuum fluctuations

Readme

kdfts

CI license

Argon2id KDF with optional quantum-backed salt provenance. Salt is sourced from the ANU Quantum Random Number Generator (photon shot noise at a beam splitter) when available, with strict mode for deployments where that provenance is required. Falls back to crypto.getRandomValues() otherwise.

Standard CSPRNGs already satisfy OWASP's salt requirements. The ANU source adds auditable entropy provenance — useful for compliance workflows or systems that need to document their randomness chain, not a substitute for strong KDF parameters.

Install

npm install @kirkelliott/kdfts

Get a free ANU API key at quantumnumbers.anu.edu.au:

export ANU_API_KEY=your-key-here

Usage

Derive and persist:

import { derive, formatCert } from '@kirkelliott/kdfts'

const { hash, certificate } = await derive('my-password', {
  context: 'myapp:user42:session',  // domain separation — optional but recommended
})

// Persist this single string — it contains everything needed to verify later
await db.users.update({ passwordHash: hash })

console.log(formatCert(certificate))
// ════════════════════════════════════════════════════
//   kdfts Key Certificate
// ════════════════════════════════════════════════════
//   Source:        ANU Quantum Vacuum (photon shot noise)
//   Timestamp:     2026-03-07T04:00:00.000Z
//   KDF:           argon2id
//   t / m / p:     3 / 65536 / 4
//   Key length:    32 bytes (256 bits)
//   Salt bytes:    32 bytes (256 bits)
//   Context:       myapp:user42:session
//
//   Salt hash:     7bcaf7d45ef1191f9d72556b5f7f6e17...
//   Key hash:      f0d6b878bb864d5261d5ccd05353bfc1...
// ════════════════════════════════════════════════════

Verify later:

import { verify } from '@kirkelliott/kdfts'

const valid = await verify('my-password', storedHash)
// Parameters, salt, and context are all read from the hash string.

Reuse a source across multiple derivations (saves one ANU round-trip):

import { QuantumSource, derive } from '@kirkelliott/kdfts'

const source = await QuantumSource.create()
console.log(source.source)  // 'anu' | 'crypto'

const [keyA, keyB] = await Promise.all([
  derive(passwordA, { source }),
  derive(passwordB, { source }),
])

Options

| Option | Type | Default | Description | |---|---|---|---| | context | string | — | Domain separation string, passed as Argon2id associatedData. Embedded in the hash — no need to pass to verify(). | | saltBytes | number | 32 | Bytes of quantum entropy to fetch. | | keyLength | number | 32 | Output key length in bytes. | | cost | { timeCost, memoryCost, parallelism } | { timeCost: 3, memoryCost: 65536, parallelism: 4 } | Argon2id parameters. memoryCost is in KiB. Embedded in the hash — no need to track separately. | | strict | boolean | false | Throw if the ANU source is unavailable instead of falling back to crypto.getRandomValues(). | | source | QuantumSource | — | Pre-created source for reuse or testing. |

Security notes

  • Salt is fetched fresh for every derive call — never reused
  • Context is passed as Argon2id associatedData and embedded in the hash — verify() reads it automatically
  • Verification uses crypto.timingSafeEqual — no timing oracle on key comparison
  • Argon2id defaults (timeCost=3, memoryCost=65536, parallelism=4) exceed OWASP minimum recommendations
  • The certificate records only SHA-256 hashes of the salt and key, never the raw values
  • Every claim in this README is validated by the test suite

License

MIT © Kirk Elliott