Generate secure passwords you can actually remember!
Go to file
Douglas Muth 8bb1d7c11e Added link to Insult Passphrase Generator. Removed GitHub ribbon since I have a link in the FAQ. 2024-03-13 20:35:57 -04:00
.github Update FUNDING.yml 2022-04-19 20:42:42 -04:00
assets Lots and lots of refactoring into multiple files. Also changed wordlist to be plaintext, updated robots.txt (heh), and did general cleanup. This is to prepare for potentially having multiple wordlists. 2023-05-08 21:43:34 -04:00
bin Added Docker support 2023-06-10 13:34:08 -04:00
cypress Added front end testing with Cypress. 2022-12-11 22:44:57 -05:00
dist Added convertBigNumberToString(). 2023-02-04 20:08:03 -05:00
fonts Added support for air-gapped operation. #11 2018-05-12 14:12:06 -04:00
src Lots and lots of refactoring into multiple files. Also changed wordlist to be plaintext, updated robots.txt (heh), and did general cleanup. This is to prepare for potentially having multiple wordlists. 2023-05-08 21:43:34 -04:00
tests Lots and lots of refactoring into multiple files. Also changed wordlist to be plaintext, updated robots.txt (heh), and did general cleanup. This is to prepare for potentially having multiple wordlists. 2023-05-08 21:43:34 -04:00
.gitattributes Added $Id$ 2021-05-15 16:04:31 -04:00
.gitignore Added front end testing with Cypress. 2022-12-11 22:44:57 -05:00
.travis.yml Updated Nodejs versions 2021-03-13 19:48:22 -05:00
CODE_OF_CONDUCT.md Added Code of Conduct 2018-04-09 20:26:26 -04:00
CREDITS.md Fixed some typos 2021-07-23 20:16:05 -04:00
Dockerfile Added Docker support 2023-06-10 13:34:08 -04:00
LICENSE Update LICENSE 2023-06-10 12:21:41 -04:00
README.md Added Docker support 2023-06-10 13:34:08 -04:00
cypress.config.js Added front end testing with Cypress. 2022-12-11 22:44:57 -05:00
favicon.ico Added a favicon 2015-11-10 23:41:21 -05:00
go-sync-to-s3.sh Added CloudFront invalidation to deployment script. 2023-05-09 21:26:46 -04:00
index.html Added link to Insult Passphrase Generator. Removed GitHub ribbon since I have a link in the FAQ. 2024-03-13 20:35:57 -04:00
package-lock.json Bumped packages 2023-05-08 21:48:41 -04:00
package.json Tweaked build instructions to play nice with git worktree. 2023-05-08 21:52:29 -04:00
robots.txt Lots and lots of refactoring into multiple files. Also changed wordlist to be plaintext, updated robots.txt (heh), and did general cleanup. This is to prepare for potentially having multiple wordlists. 2023-05-08 21:43:34 -04:00
webpack.config.js Fix up for webpack 5. 2021-03-13 17:23:45 -05:00

README.md

Diceware

Feel free to check out the live version at https://diceware.dmuth.org/

Weak passwords are a big flaw in computer security due to a lack of "entropy" or randomness. For example, how many times have you used the name of a pet or relative or street in a password, or perhaps the number "1". Not very random, is it? :-) Worse still, if passwords are reused between services, that increases your security risk.

Fact is, humans are terrible at remembering random combiations of letters and numbers, but we are great at remembering phrases of words. That's where Diceware comes in.

Diceware is based on the proposal at http://world.std.com/~reinhold/diceware.html wherein virtual dice are roled 5 times, and the 5 digit number used against a lookup table of words. 4 dice rolls gives you 4 random words which are easy for a human being to remember, yet have a high amount of entropy which makes them hard to crack.

For more information on Diceware:

Can I run this on my own computer without using your website?

Yes! Go to https://github.com/dmuth/diceware/releases and download the latest diceware.zip file. When you unzip that file, the contents will be written to a directory called diceware/. You can then point a webserver on your machine to diceware/index.html in order to use Diceware.

Sadly, you cannot open diceware/index.html directly, as the CORS policy in Chrome prevents that. If you know of a way to fix that, please open an issue. :-)

Will this work on an iPhone?

Yep! It should work on any mobile phone or tablet that supports Javascript, but I have only tested it on an iPhone 5S at this time.

Will this work in an air-gapped environment?

Yes, copies of assets such as Bootstrap and jQuery have been made, and Diceware can now be run without requiring an Internet connection.

Development

This app is built with Webpack.

When done editing main.js, the packed file can be built by simply running webpack on the command line. It will be writing to dist/bundle.js. To run webpack in a mode so that it regularly checks for changed files, run webpack --watch --mode development.

In a move that departs from Best Practices, I have made the decision to include the packed file in Git. My reason for this is that the software will be ready to run as soon as it is checked out (or a ZIP is downloaded), and that is a key design feature of this app--I want it to be as easy to get up and running as possible.

A local webserver can be set up by running npm install http-server -g to install it, then http-server to listen on http://localhost:8080/

In summary:

  • Development
    • npm run clean - Cleanup after a previous run
    • npm install - Install NPM packages used by Diceware
    • npm run dev-build - Run webpack to pack Javascript files and watch for changes.
    • http-server
    • vim src/lib.js src/index.js
      • Be sure to check in your changes before the next step!
  • Testing
    • rm -fv src/index.js && git co src/index.js - Get the new SHA1 hash that will be displayed in debug messages.
      • The hash can be crosschecked with the results of git hash-object src/index.js
    • npm test - Make sure you didn't break any of the core logic!
    • npx cypress run - Run front-end testing
      • If the tests break, run npx cypress open to run tests interactively.
  • Deployment
    • npm run build - Webpack Javscript files in production mode (smaller file but takes longer)
    • ./go-sync-to-s3.sh - Do this if you're me, to upload to S3. If you're not me, you'll need to do something else, or possibly nothing at all.

In practice:

  • npm run clean; npm run dev-build - Run webpack in dev mode while working on Javascript
    • http-server - Stand up a local HTTP server
    • vim src/lib.js src/index.js
    • rm -fv src/index.js && git co src/index.js
  • npm run clean; npm run build - Run webpack in prod mode to produce final Javascript bundle
  • ./go-sync-to-s3.sh - Do this if you're me, to upload to S3. If you're not me, you'll need to do something else, or possibly nothing at all.

Releasing a New Build

  • npm run release-build to create the ZIP file diceware.zip with all assets in it, including bundle.js and the contents of node_modules/.
  • gh release create v1.0.1 to upload a release to https://github.com/dmuth/diceware/releases.
    • Change the tag for the version number accordingly.
  • gh release upload v1.0.1 diceware.zip to upload the ZIP file containing everything

Development In Docker

Wanna develop in Docker? We got you covered. Here are some helper scripts:

  • bin/docker-build.sh - Build the Docker copntainer
  • bin/docker-dev.sh - Run in dev mode--listening on http://localhost:8000/
  • bin/docker-prod.sh - Run in prod mode--listening on http://localhost:80/
  • bin/docker-push.sh - Push to Docker Hub

Who built this? / Contact

My name is Douglas Muth, and I am a software engineer in Philadelphia, PA.

There are several ways to get in touch with me:

Feel free to reach out to me if you have any comments, suggestions, or bug reports.