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

@sudp-protocol/authorizer

v0.1.1

Published

Authorizer-side primitives for SUDP (Secret-Use Delegation Protocol): canonical JSON, β computation, wrapping-key derivation, AEAD-as-wrap, plus a WebAuthn adapter under the ./webauthn subpath.

Downloads

142

Readme

@sudp-protocol/authorizer

Authorizer-side primitives for SUDP — the Secret-Use Delegation Protocol.

The Authorizer is the party that authorizes a secret-backed operation by signing the binding hash β = SHA-256(DS_BIND ‖ r ‖ H(canonical(o))) with an authenticator. This package ships the carrier-agnostic crypto the Authorizer needs, plus an optional WebAuthn adapter.

The Rust counterpart that runs in the Custodian is the sudp crate in the same repository. Both sides must agree byte-for-byte on canonical encoding, β, the AEAD-as-wrap AAD shapes, and the wrap-key derivation.

Layout

@sudp-protocol/authorizer            ← carrier-agnostic protocol primitives
  canonicalize, sha256,
  computeBinding, computeBatchBinding,
  deriveWrappingKey, wrapBindingAd, sealAd,
  aeadSeal, aeadOpen, aeadEncrypt, base64url helpers,
  DS_BIND / DS_WRAP / DS_SEAL constants

@sudp-protocol/authorizer/webauthn   ← WebAuthn-specific adapter
  prfToUserKey(prfOutput) → 32-byte y_c
  assertionToWire(assertion) → wire-shape assertion

Other authenticator realisations (YubiKey static, secure-enclave, HSM, mock) bring their own adapters and do not touch the WebAuthn subpath. The core remains agnostic of how y_c was produced.

Usage sketch

import {
  computeBinding,
  DS_BIND,
  deriveWrappingKey,
  wrapBindingAd,
  aeadSeal,
} from "@sudp-protocol/authorizer";
import { prfToUserKey, assertionToWire } from "@sudp-protocol/authorizer/webauthn";

// 1) Authorizer-side: compute the binding hash β.
const beta = await computeBinding(DS_BIND, rFreshness, operation);

// 2) Run the WebAuthn ceremony with `beta` as the challenge. The PRF
//    extension returns raw bytes — turn them into the 32-byte y_c.
const cred = (await navigator.credentials.get({
  publicKey: {
    challenge: beta,
    extensions: { prf: { eval: { first: prfSalt } } },
    /* ... rpId, allowCredentials, userVerification: "required", etc. */
  } as PublicKeyCredentialRequestOptions,
})) as PublicKeyCredential;

const prfOut = new Uint8Array(
  (cred.getClientExtensionResults() as { prf?: { results?: { first?: ArrayBuffer } } })
    .prf!.results!.first!,
);
const yc = await prfToUserKey(prfOut);

// 3) Derive W_c and use it to wrap key material destined for the custodian.
const Wc = await deriveWrappingKey(yc, prfSalt, credentialId);
const wrapped = aeadSeal(Wc, plaintext, wrapBindingAd(credentialId));

// 4) Ship `{ assertionToWire(cred), wrapped, ... }` to the custodian as
//    part of the grant.

End-to-end protocol walkthrough

For how this package fits with the Rust Custodian and the Requester across all three phases:

Status

Pre-1.0, alongside the Rust crate. Wire format and trait shapes may move before the 1.0 cut. See the top-level README and the Rust crate's CHANGELOG.

License

Apache-2.0. See LICENSE.