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

@aliran/core

v0.1.2

Published

Aliran shared crypto: OPRF login, Argon2id verifiers, key wrapping

Downloads

464

Readme

@aliran/core

Shared crypto (plus two infra helpers) for the Aliran peer-to-peer OTT streaming platform. It runs in Node (>= 20) and in the Bare runtime (the Android app's worklet) — the crypto modules use no Node-only APIs.

Every panel, broadcaster, repeater, and player in an Aliran deployment agrees on these primitives. The security model documents how they fit together.

Modules

index.js re-exports the five crypto modules. You import the three infra helpers by path — they are Node/Bare plumbing, not crypto. Each one reads or writes the disk, so index.js keeps them out: the client bundles index.js into the Bare worklet, which has no fs.

| Module | Exports | Purpose | |---|---|---| | oprf.js | oprfKeyGen blind evaluate evaluateFull finalize | OPRF over ristretto255 (@noble/curves) — the login protocol's core: the panel never sees a plaintext password, and the client never sees the OPRF key. | | password.js | randomSalt deriveVerifier verify wrapKeyFrom wrap unwrap ARGON2_DEFAULT SALT_BYTES | Argon2id verifiers + XSalsa20-Poly1305 secretbox wrapping of per-user key material (sodium-native). | | keybox.js | userKeyPair sealTo sealOpen authKeyPair authSign authVerify | X25519 sealed boxes (granting stream keys to a user) + Ed25519 signatures (proving a login/session). | | token.js | signToken verifyToken tokenValid | Panel-signed session tokens. | | pow.js | powSolve powVerify | Proof-of-work gate for unauthenticated RPCs. | | net-tune.js (by path) | tuneSwarm tuneSocket readKernelCeilings evaluateBuffer logSwarmTuning … | Hyperswarm UDP socket-buffer sizing + honest clamp detection (why). | | store-gc.js (by path) | purgeStaleCores DISCOVERY_HEX_RE | Reclaims stray Corestore core directories not on a keep-list. | | atomic-write.js (by path) | writeFileAtomic writeJsonAtomic atomicTmpPath isAtomicTmp | Replaces a file safely. It writes a temp file beside the target, flushes it to disk, then renames it over the target. A crash during the write cannot truncate the file. Secrets get their 0600 mode before the rename, so no other user can read them. |

import { blind, finalize, deriveVerifier, sealOpen, tokenValid } from '@aliran/core'
import { tuneSwarm } from '@aliran/core/net-tune.js'

Caveat

The OPRF group math uses the audited @noble/curves ristretto255 implementation. Argon2id and secretbox use sodium-native. Aliran wrote the composition itself — have it independently reviewed before you bet production credentials on it.

Test

npm test   # node test.mjs — fast, no network

MIT — part of the Aliran monorepo.