Git Product home page Git Product logo

atoponce / webpassgen Goto Github PK

View Code? Open in Web Editor NEW
138.0 8.0 23.0 22.49 MB

Simple web-based password generator

Home Page: https://atoponce.github.io/webpassgen/

License: GNU Affero General Public License v3.0

HTML 22.22% JavaScript 74.87% CSS 2.91%
password generator diceware diceware-passphrases diceware-passphrase-generator diceware-password password-generator entropy passphrase passphrase-generator

webpassgen's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

webpassgen's Issues

Fix bug counting whitespace passwords

There are 22 characters of different byte sizes:

  • " ": U+0020 (1 byte)
  • "᠎": U+180E (3 bytes)
  • " ": U+2000 (3 bytes)
  • " ": U+2001 (3 bytes)
  • " ": U+2002 (3 bytes)
  • " ": U+2003 (3 bytes)
  • " ": U+2004 (3 bytes)
  • " ": U+2005 (3 bytes)
  • " ": U+2006 (3 bytes)
  • " ": U+2007 (3 bytes)
  • " ": U+2008 (3 bytes)
  • " ": U+2009 (3 bytes)
  • " ": U+200A (3 bytes)
  • "​": U+200B (3 bytes)
  • "‌": U+200C (3 bytes)
  • "‍": U+200D (3 bytes)
  • " ": U+202F (3 bytes)
  • "⁠": U+2060 (3 bytes)
  • " ": U+3000 (3 bytes)
  • "": U+FEFF (3 bytes)
  • "󠀠": U+E0020 (4 bytes)

At 22 unique whitespace characters, that's log2(22) ~= 4.459 bits per character. That means we should expect these character counts for the following minimum security levels:

  • 56 bits: 13 characters
  • 64 bits: 15 characters
  • 72 bits: 17 characters
  • 80 bits: 18 characters
  • 88 bits: 20 characters
  • 96 bits: 22 characters
  • 104 bits: 24 characters
  • 112 bits: 26 characters
  • 120 bits: 27 characters
  • 128 bits: 29 characters

Add additional Dutch word lists

I have read your blog post with great interest and have tried the tool.

You might be interested in this blog post

https://el-tramo.be/blog/diceware-nl/

that is describing additional (better?) lists for the Dutch language.

I suspect you will at least take a look and hopefully include this in your valuable tool.

Pre-hyphenated words lose their hyphen

Consider the following passphrase created from the Beale wordlist in the Diceware container:

privy m-16 suit saul fact kicks ooze

When checking the "Hyphenate" box, the passphrase then becomes:

privy-m-16-suit-saul-fact-kicks-ooze

If un-checking the "Hyphenate" box, the hyphen in the "m-16" word is lost:

privy m 16 suit saul fact kicks ooze

Probably the best way to fix this, is before un-hyphenating the passphrase, to check for hyphenated words in the selected wordlist, store any matches in a variable, and after removing all the hyphens, to restore the hyphenated word to its correct location.

Download doesn't work on Safari

I downloaded the code and opened index.html in Safari on OSX. Forms show up where I can select an option and press the "Generate" button, but clicking that button does nothing. I have javascript enabled. I'm suspecting that Safari by default blocks file:// javascript or something like that. If this is a common problem with Safari and this web page, it would be nice if the README file mentioned it and how to fix it.

Adjust password vertically

Now with "Verb, Adjective, Noun" as a valid passphrase generator, it's possible that the passphrase extends 5 lines at 128 bits, and is common to be 3 lines at 80 bits. However, a "Base94" password will only ever occupy a single line. The UX isn't great here. Instead, adjust it such that the password is vertically aligned in the <div>.

feature: extended general English list

It would be useful to have an English list that balances these three goals:

  • minimizes memorization effort
  • maximizes the chances that the word will be familiar to most speakers
  • keeps entropy at an acceptable level

I'm not sure of the best way to accomplish this. I'm envisioning an Alternate list that isn't "English (all)", but is instead a subset of the wordlists that make up that list. Perhaps called "English (common)" or "English (broad)" or "English (most)" or something like that. Specialized lists (like Star Trek, Simpsons, etc.) would be excluded.

Initial source lists might be:

  • All EFF English lists
  • Bitcoin English
  • English (NLP)
  • PGP
  • Pokerware
  • Wordle

... but with all capitalized words lower-cased (which would eliminate having to remember that words 2 and 5 are capitalized, etc., but that's up for discussion) and then deduplicated. My hope is that this will produce a list in the 20K range or higher.

Any future general (not topic-specific) English wordlists could also be added.

Stylesheet can't be loaded when accessed locally (file://) (CORS)

Mirrored a local copy and clicked around to try this out. When clicking Dark Mode, getting a:
Uncaught DOMException: Failed to read the 'rules' property from 'CSSStyleSheet': Cannot access rules at :1:25 error on latest chrome.

Upon review this appears to be due to the accessing of the stylesheet interface (css.rules[0]) locally (which for whatever reason, they decided should be a violation of CORS even when the index.html is served via file://).

Being what the function is doing with Dark Mode, this would seemingly be easily fixed by including both dark and light mode in the stylesheet and just activating using a selector. Happy to do a PR if you'd like.

(For many apps this wouldn't really be an issue, but given the security concerns with PW generation, it's probably fairly common for people to download and attempt to run locally without standing up a server. At first glance, don't see any other issues that would would make this not run perfectly fine locally?)

Refs:
https://stackoverflow.com/questions/48753691/cannot-access-cssrules-from-local-css-file-in-chrome-64/49160760#49160760
https://stackoverflow.com/questions/49161159/uncaught-domexception-failed-to-read-the-rules-property-from-cssstylesheet

Instructions to run locally on iOS devices

Instructions to run the password generator locally on an iOS device from the ZIP file downloaded directly from GitHub.

Prerequisites:

Workflow:

Open the Safari browser.
Open the demo site at https://ae7.st/g/.
Scroll to the bottom and click the download link (insert screenshot).
a248e918-0d96-4c26-a1db-109dabb9971b

This will open the releases page from the GitHub repository.
Click the link that says 'Source code (zip)'.
2b390346-1a9d-4358-864b-84ba5556cdbd

This will open the zip file in the Documents app.
Click the zip file, to expand it into it's own folder.
f72ead48-e7bc-4e36-9ab1-e4ba7874a199

Move into the folder and click the Index file. This will open the local copy of the file.
d7f8ceb6-2e3c-4716-a418-7f987b33167f
c4928020-f01e-4fa4-a5e0-ce7fcd485283

feature: element count

Along with the bits of entropy, and the character count, It might be informative to include a compact expression of how many "elements" there were in the source list ("7777 elements").

This could help shape intuitions for the layperson.

(There may be another term that is better than "element". I led with that because some of the lists are words, some are pseudo words, some are characters, etc.)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.