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

cripto_endevs_comunity

v0.1.1

Published

Un micro-módulo de cifrado excéntrico y seguro basado en AES-GCM con sistema de Ratcheting.

Readme

🛑 CryptoNugget (JS/Node)

El Motor Criptográfico Universal con Mutación Continua (Ratcheting). Nada se guarda, todo se transforma.

crypto-nugget es la versión en JavaScript/Node.js del protocolo excéntrico de cifrado efímero. Proporciona una capa de seguridad extremadamente alta utilizando AES-256-GCM y un sistema de "Ratcheting" criptográfico mediante HMAC-SHA256.

A diferencia de los métodos de cifrado estáticos, en CryptoNugget las claves de cifrado y descifrado mutan permanentemente después de cada uso.

✨ Características

Ratcheting (Forward Secrecy): Las claves se devoran a sí mismas tras cada mensaje procesado. Imposible descifrar el pasado aunque se comprometa el futuro.

Isomórfico (Universal): Funciona tanto en el navegador (usando la API nativa WebCrypto) como en backend (Node.js 15+ usando crypto.webcrypto).

Cero Dependencias: Motor puro. Seguro, auditable y ultra-ligero.

📦 Instalación

npm install crypto-nugget

🚀 Uso Rápido

El protocolo funciona estableciendo dos nodos que comparten una Semilla Maestra inicial. Un nodo asume el rol de "Iniciador" (true) y el otro de "Receptor" (false).

  1. Inicialización y Cifrado (Nodo A)

// En Node.js usa require, en ES Modules usa import const NuggetEngine = require('crypto-nugget');

async function iniciarComunicacion() { // 1. Instanciamos el motor (ideal si necesitas múltiples conexiones) const NodoA = Object.create(NuggetEngine);

// 2. Generamos o proveemos una Semilla Maestra compartida
const semillaMaestra = await NodoA.generarSemilla();
console.log("Semilla Maestra compartida:", semillaMaestra);

// 3. Inicializamos como Iniciador (true)
await NodoA.inicializar(semillaMaestra, true);

// 4. Ciframos cualquier dato
const datosSecretos = JSON.stringify({ objetivo: "Luna", estado: "Paranoico" });
const criptograma = await NodoA.cifrar(datosSecretos);

console.log("Paquete Cifrado Mutante:", criptograma);

return { semillaMaestra, criptograma };

}

  1. Descifrado en el destino (Nodo B)

async function recibirComunicacion(semillaMaestra, paqueteRecibido) { const NodoB = Object.create(NuggetEngine);

// Inicializamos como Receptor (false) usando la MISMA semilla
await NodoB.inicializar(semillaMaestra, false);

try {
    const textoPlano = await NodoB.descifrar(paqueteRecibido);
    console.log("Mensaje Descifrado:", JSON.parse(textoPlano));
} catch (error) {
    console.error("Fallo de seguridad o desincronización:", error.message);
}

}

🔬 Observando el "ADN" Mutante

Puedes comprobar cómo el estado interno de las claves evoluciona después de cada operación. Esto es útil para auditar o depurar la sincronización entre nodos:

// Muestra los primeros bytes hexadecimales de las claves actuales const adn = await NodoA.getVisualADN(); console.log(Estado actual -> TX: ${adn.tx} | RX: ${adn.rx});

⚠️ Advertencia de Seguridad y Sincronización

Por la propia naturaleza del "Ratcheting", el protocolo espera que los paquetes se procesen estrictamente en el mismo orden en el que fueron enviados.

Si se pierde un paquete en la red.

Si un atacante intenta inyectar un paquete viejo (Replay Attack).

Si un mensaje se corrompe.

El método descifrar() arrojará un error y los nodos quedarán desincronizados permanentemente por diseño (para evitar manipulación de estado). Si esto ocurre, el canal debe ser destruido y debe reinicializarse una nueva conexión con una nueva semilla.

Construido para la comunidad. Arequipa 2026.