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

kryptos-solver

v1.0.0

Published

Kryptos K1-style Vigenere solver using beam search, chi-squared, IoC, and bigram scoring. Adopted from https://github.com/chillhackr/kryptos

Readme

kryptos-solver

Kryptos K1-style Vigenere solver using beam search, chi-squared, IoC, and bigram scoring. K2 in dev.

Install

npm install kryptos-solver

kryptos-solver

A cryptographic toolset in development for analyzing and solving Jim Sanborn's Kryptos sculpture. Ported from the Go logic, this package uses various techniques to recover keys without prior knowledge, targeted at solving KRYPTOS with as limited knowledge as possible.

🚀 Installation

The Workflow

This package includes a run-me.js script to help you get started immediately.

node run-me.js

Basic Usage


import { K1Solver } from 'kryptos-solver';

const solver = new K1Solver();
const k1cipher = "EMUFPHZLRFAXYUSDJKZLDKRNSHGNFIVJYQTQUXQBQVYUVLLTREVJYQTMKYRDMFD";

// solve(ciphertext, minKeyLen, maxKeyLen, beamWidth, frozenPositions)
const results = solver.solve(k1cipher, 8, 8, 10000);

console.log(`Top Key: ${results[0].key}`);
console.log(`Decrypted: ${results[0].plaintext}`);

Poking from the Unknown: kryptos-solver doesn't just decrypt; it analyzes.

  1. Statistical Scoring The solver evaluates candidates using:

Chi-Squared Analysis: Measuring how closely a decryption matches English letter frequencies.

Index of Coincidence (IoC): Detecting the "burstiness" of the text to filter out noise.

Bigram Scoring: Checking for common English pairs like "TH", "HE", and "IN". (more should be considered)

  1. Beam Search Instead of brute-forcing trillions of combinations, we use a Beam Search algorithm. It keeps only the most promising key prefixes at each step, allowing you to tweak and analysis different key lengths.

  2. Frozen Positions If you suspect part of the key (e.g., the first two letters are "PA"), you can "freeze" them to drastically speed up the search:

//const frozen = { 0: 'P', 1: 'A' };
//solver.solve(ciphertext, 10, 10, 5000, frozen);
solver.solve(ciphertext, 10, 10, 5000); // run with default, no freezing

History & The Keyed Alphabet K1 is what I understand to be a Keyed Vigenère cipher, but there may be a more accurate term Quagmire III. Its security relies on two things:

The Indicator Key: (PALIMPSEST)

The Keyed Alphabet: (KRYPTOS)

Can we solve it if the alphabet is unknown? Yes. While this package defaults to the known KRYPTOS alphabet, the methodology remains the same. An analyst would use this solver inside a loop, testing different potential "Alphabet Keywords" from a dictionary until the Chi-Squared scores "spike" toward a solution. This is where all the fun lies.

Notes

Test Logic: npm run test (Runs native Node.js tests)

It is expected the key will not return, the idea is to tweak this based on observed results and different settings.

Dev Mode: npm run dev (Watch mode for your run-me.js)

Roadmap

K1 Quagmire III Solver

Beam Search Algorithm

[ ] K2 Transposition Analysis (Coming Soon)