An open API service indexing awesome lists of open source software.

https://github.com/dotaadarsh/not-another-password-generator

A cryptographically strong password generator powered by real-world entropy.
https://github.com/dotaadarsh/not-another-password-generator

password-generator

Last synced: 13 days ago
JSON representation

A cryptographically strong password generator powered by real-world entropy.

Awesome Lists containing this project

README

          

# Not Another Password Generator

> A cryptographically strong password generator powered by real-world entropy โ€” not `Math.random()`.

---

## What makes this different?

Most password generators call `Math.random()` and call it a day. This one fuses **13 real-world entropy signals** into a SHA-256 hash every single time you click generate โ€” no reuse, no shortcuts.

---

## Entropy Sources

Every click collects fresh chaos from all of these simultaneously:

| Source | Signal |
|---|---|
| `performance.now()` | Sub-millisecond high-resolution timing jitter |
| `Date.now()` | Current timestamp |
| `crypto.getRandomValues()` | 128 bytes of CSPRNG output |
| `navigator.hardwareConcurrency` | CPU core count fingerprint |
| `navigator.deviceMemory` | Device RAM fingerprint |
| `navigator.platform` | OS/platform string |
| `navigator.language` | Browser language setting |
| Screen resolution + color depth | Display fingerprint |
| Intl timezone | Timezone fingerprint |
| Network round-trip latency | Live-measured fetch timing |
| Mouse movement buffer | Up to 256 recent `(x, y, t, dx, dy)` tuples |
| Performance navigation entries | Browser session state |
| Window inner dimensions | Viewport size |

All 13 sources are serialized โ†’ hashed with **SHA-256 via the Web Crypto API** โ†’ converted to a password using a counter-based CSPRNG (no `Math.random()` anywhere in the pipeline).

---

## Features

**๐Ÿ” Password Generation**
- Guaranteed mix of uppercase, lowercase, digits, and symbols
- Fisher-Yates shuffle seeded from a second SHA-256 pass
- Adjustable length from 6 to 64 characters
- Fresh entropy collected on every single click

**๐Ÿ‘ Show / Hide Toggle**
- Password is masked by default after generation
- Eye icon to reveal / re-mask instantly

**๐Ÿ”ฅ Burn After Reading**
- Copy the password โ†’ a 30-second countdown begins
- Color-coded urgency: yellow โ†’ orange โ†’ red as time runs out
- Password auto-wipes at zero โ€” cancel anytime

**๐Ÿ“Š Live Entropy Dashboard**
- Mouse entropy activity bar (live, decays when idle)
- Network latency display (measured on each generate)
- Active entropy sources count with hover popover listing all 13 sources

**โฑ Crack Time Estimator**
- Calculates entropy bits from charset pool ร— length
- Estimates time-to-crack at 100 billion guesses/sec (GPU cluster)
- Color-coded: red (instantly) โ†’ green (centuries) โ†’ purple glow (longer than the universe)

**๐ŸŽจ Color-Zoned Slider**
- Red/Orange: 6โ€“12 chars โ€” Weak
- Purple: 13โ€“30 chars โ€” Strong
- Deep Purple: 30โ€“64 chars โ€” Fortress

**๐ŸŒ— Light & Dark Mode**
- Toggle in the top bar
- Smooth transitions throughout

---

## Security Model

- **No backend.** Everything runs in your browser.
- **No data transmitted.** Passwords never leave your device.
- **No storage.** Nothing is written to localStorage, cookies, or any persistent store.
- **No `Math.random()`.** The entire pipeline uses `crypto.getRandomValues()` and `crypto.subtle.digest()`.
- **No dependencies** beyond React and Tailwind-compatible styles.

---

## Tech Stack

- **React 18** โ€” UI and state
- **Web Crypto API** โ€” SHA-256 hashing + CSPRNG bytes
- **`performance.now()`** โ€” High-resolution timing entropy
- **Fetch API** โ€” Network latency measurement
- **Mouse events** โ€” Live entropy buffer collection
- Fully client-side โ€” deployable on any static host

---

## Getting Started

```bash
# Clone the repo
git clone https://github.com/dotAadarsh/not-another-password-generator.git
cd not-another-password-generator

# Install dependencies
npm install

# Start dev server
npm run dev
```

Then open [http://localhost:5173](http://localhost:5173).

### Build for production

```bash
npm run build
```

The output in `dist/` is a fully static site โ€” drop it on GitHub Pages, Vercel, Netlify, or anywhere.

---

## How the Entropy Pipeline Works

```
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ 13 Real-World Signals โ”‚
โ”‚ timestamps ยท crypto bytes ยท hardware ยท โ”‚
โ”‚ network latency ยท mouse buffer ยท screen โ€ฆ โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
โ”‚ JSON.stringify + perf.now()
โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ SHA-256 Hash โ”‚ (Web Crypto API)
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
โ”‚ Uint8Array[32]
โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Counter-based CSPRNG โ”‚
โ”‚ Re-hash per character โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
โ”‚
โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Fisher-Yates Shuffle โ”‚ (seeded from 2nd SHA-256 pass)
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
โ”‚
โ–ผ
Strong Password โœ“
```

---

## License

MIT โ€” do whatever you want with it.

---


Built by @dotAadarsh



Buy Me A Chai