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

@stellarsecurity/stellar-crypto

v1.0.2

Published

Core E2EE cryptography for Stellar (vault, EAK, AES-GCM, PBKDF2).

Readme

🚀 stellar-crypto

stellar-crypto is the official cryptographic core used across the Stellar Security ecosystem — powering encrypted storage, key-wrapping, secure sync, vault creation, and cross-platform AES-GCM operations.

This package provides:

  • 🔐 Vault creation using PBKDF2-SHA256 (210k iterations)
  • 🧩 EAK (Encrypted Access Key) extraction for login flows
  • 🗝️ Master Key wrapping/unwrapping using AES-GCM
  • 📦 Server bundle encoding (IV || ciphertext)
  • 📚 Typed interfaces for KDF params, vault headers, bundles
  • No dependencies — pure WebCrypto

All crypto happens client-side.
Stellar servers never see plaintext notes or master keys.
Stellar ID is optional — cryptography works independently.


🔧 Installation

npm install stellar-crypto

or (if using a scoped package):

npm install @stellarsecurity/stellar-crypto

📦 Quick Start

1. Create a vault (new user)

import { createVault, exportServerBundleFromHeader } from 'stellar-crypto';

const { header, mkRaw } = await createVault("mypassword");

// Send this to your backend:
const bundle = exportServerBundleFromHeader(header);

2. Login using EAK from server

import { extractPlainEAK } from 'stellar-crypto';

const { eakB64, eakBytes } = await extractPlainEAK(password, serverBundle);

// eakBytes = 32-byte master key for local encryption/decryption

3. Encrypt / decrypt notes

import { encryptTextWithMK, decryptTextWithMK } from 'stellar-crypto';

const blob = await encryptTextWithMK(eakBytes, "Hello world");

// later:
const text = await decryptTextWithMK(eakBytes, blob);

📁 Server Bundle Format

The backend stores:

{
  "crypto_version": "v1",
  "kdf_params": {
    "algo": "PBKDF2",
    "hash": "SHA-256",
    "iters": 210000
  },
  "kdf_salt": "base64",
  "eak": "base64(IV || ciphertext)"
}

This allows:

  • stateless server operations
  • deterministic login flows
  • end-to-end encryption without key disclosure

🛡️ Security Model

  • AES‑256‑GCM used for all encryption
  • PBKDF2-SHA256 with high iteration count
  • All secret material left only in RAM
  • No plaintext keys are ever sent to the backend
  • Optional app-lock layer (Argon2 or PBKDF2) can wrap bundles locally

Stellar servers cannot decrypt user data. Period.


🧪 Browser Compatibility

Uses native WebCrypto:

  • Chrome
  • Firefox
  • Safari
  • Edge
  • Android WebView
  • iOS WKWebView

No polyfills required.


🏗️ Roadmap

  • Argon2id KDF (WebAssembly)
  • ECDH key exchange (Secure sharing)
  • Multi-device key rotation
  • Attachment encryption

📝 License

MIT — do whatever you want, just don’t break security.


🧑‍💻 About Stellar Security

Swiss-based security company building open-source, zero-knowledge privacy tools.

https://stellarsecurity.com