Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: yesiamben/diceware
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: grempe/diceware
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Can’t automatically merge. Don’t worry, you can still create the pull request.
Loading
Showing 623 changed files with 273,594 additions and 70,716 deletions.
21 changes: 21 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
root = true

[*]
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
tab_width = 2
indent_style = space
indent_size = 2

[**.rb]
indent_style = space
indent_size = 2

[**.js]
indent_style = space
indent_size = 4

[**.html]
indent_style = space
indent_size = 2
15 changes: 15 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: 2
updates:
- package-ecosystem: npm
directory: "/"
schedule:
interval: daily
time: "13:00"
open-pull-requests-limit: 10
ignore:
- dependency-name: clipboard
versions:
- 2.0.7
- dependency-name: big.js
versions:
- 6.0.3
Empty file added .gitignore
Empty file.
6 changes: 0 additions & 6 deletions .htaccess

This file was deleted.

Empty file added .nojekyll
Empty file.
1 change: 1 addition & 0 deletions CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
diceware.rempe.us
1 change: 1 addition & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
The MIT License (MIT)

Copyright (c) 2015 Ben
Copyright (c) 2015 Glenn Rempe <glenn@rempe.us>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
128 changes: 126 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,126 @@
# Diceware Lookup and Generator
A Diceware lookup in JavaScript, based on this http://world.std.com/~reinhold/diceware.html
# Diceware Passphrase Generator

[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)

A [Diceware](http://world.std.com/~reinhold/diceware.html) passphrase generator,
implemented in JavaScript, that uses the
[Cryptographically Secure Pseudo Random Number
Generator](https://en.wikipedia.org/wiki/Cryptographically_secure_pseudorandom_number_generator)
(CSPRNG) in your browser as its source of entropy instead of rolling physical
dice.

## Hosted Version

[https://diceware.rempe.us](https://diceware.rempe.us)

## Important Features

- All random number generation is done in your browser using
[window.crypto.getRandomValues()](https://developer.mozilla.org/en-US/docs/Web/API/RandomSource/getRandomValues)
- Single page JavaScript application with no communication back to a server
- Can be run locally from a Git clone, with all dependencies baked in
- Git tags and commits are
[signed with my public code signing key](https://www.rempe.us/keys/)
- Can be run without a network connection. No logging or analytics
- All assets are served from `www.rempe.us`, an
[A+ rated TLS website](https://www.ssllabs.com/ssltest/analyze.html?d=www.rempe.us&latest)
- All CSS/JS have
[Subresource Integrity](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity)
hashes
- Realtime estimate of the security level of your generated passphrase
- Support for many language specific word lists

It may just be the closest thing to rolling your own dice. You can do that too
of course, and just use this app as a quick way to lookup your passphrase in the
word lists.

## Using It

Just choose a language and click a button corresponding to the number of words
you want to generate. You'll get a new passphrase with each click. Each
generation rolls a set of five virtual dice for **each** word. Words are chosen
from the included Diceware word lists. The die roll numbers are shown next to
each word.

## Security

If you are security conscious you are of course encouraged to download the
[source code](https://github.com/grempe/diceware) for this app and run it
locally. Due to the security methods in use such as Subresource Integrity,
you'll need to serve the application from a small local web server and not from
a `file:///` URL.

One of the simplest to install and use for this purpose is
[serve](https://github.com/vercel/serve#readme).

Example:

```sh
cd diceware

$ npx serve

┌────────────────────────────────────────┐
│ │
│ Serving!
│ │
│ Local: http://localhost:5000 │
│ │
│ Copied local address to clipboard!
│ │
└────────────────────────────────────────┘
```

### Tin Foil Hat Version

If you want to be _REALLY REALLY_ secure. Roll the dice with a flashlight under
a black hood with a printout of the Diceware word list. No computers needed!

_Not really kidding_

### Installation Security : Signed Git Commits

Most, if not all, of the commits and tags in the repository for this code are
signed with my PGP/GPG code signing key. I have uploaded my code signing public
keys to GitHub and you can now verify those signatures with the GitHub UI. See
[this list of commits](https://github.com/grempe/diceware/commits/master) and
look for the `Verified` tag next to each commit. You can click on that tag for
additional information.

You can also clone the repository and verify the signatures locally using your
own GnuPG installation. You can find my certificates and read about how to
conduct this verification at
[https://www.rempe.us/keys/](https://www.rempe.us/keys/).

### Contributing

Bug reports and pull requests are welcome on GitHub at
[https://github.com/grempe/diceware](https://github.com/grempe/diceware). This
project is intended to be a safe, welcoming space for collaboration, and
contributors are expected to adhere to the
[Contributor Covenant](http://contributor-covenant.org) code of conduct.

## Legal

### Copyright

(c) 2016 Glenn Rempe <[glenn@rempe.us](mailto:glenn@rempe.us)>
([https://www.rempe.us/](https://www.rempe.us/))

### License

The gem is available as open source under the terms of the
[MIT License](http://opensource.org/licenses/MIT).

### Warranty

Unless required by applicable law or agreed to in writing, software distributed
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied. See the LICENSE.txt file for
the specific language governing permissions and limitations under the License.

## Thanks

This implementation was inspired by the very nicely done
[https://github.com/yesiamben/diceware](https://github.com/yesiamben/diceware).
I took the opportunity to upgrade some security aspects and the UI.
17 changes: 17 additions & 0 deletions css/app.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
body {
padding-top: 90px;
}

#diceWords li {
font-family: 'Courier New', Courier, 'Lucida Sans Typewriter', 'Lucida Typewriter', monospace;
font-size: 30px;
}

#diceWords li span {
font-family: 'Courier New', Courier, 'Lucida Sans Typewriter', 'Lucida Typewriter', monospace;
font-size: 10px;
}

.listSelectionLink {
font-size: 11px;
}
1 change: 0 additions & 1 deletion css/styles.css

This file was deleted.

Loading