bbusschots / hsxkpasswd

A Perl module and terminal command for generating secure memorable passwords inspired by the fabulous XKCD web comic and Steve Gibson's Password Hay Stacks. This is the library that powers www.xkpasswd.net
http://www.bartb.ie/xkpasswd
BSD 2-Clause "Simplified" License
278 stars 48 forks source link

Support for ÆØÅ characters in dictionary #4

Closed blueskyleaf closed 9 years ago

blueskyleaf commented 9 years ago

It seems like there is no support for international characters like the norwegian æøå in the dictionary, because I get no passwords who contains those characters even though I have words with them in the dictionary file.

Can this be fixed?

bbusschots commented 9 years ago

You are correct - at the moment the library actively strips out non-alphanumeric characters from the dictionary. I made the decision to strip accents early in the project's history to simplify the entropy calculations, but with hind-sight I now see that was a mistake.

My plan to fix the problem is to add a configuration variable to turn on or off the suppression of accented characters as desired - users could then chose between a more varied alphabet, or more accurate entropy calculations.

blueskyleaf commented 9 years ago

Ah, I see. So it wasn't just my playing tricks on me ;-)

Yes, I'd love the option to turn on these characters. Is manually defining the special characters we want a good way to go? Like extrachar = "æøå"; Because that is all the characters I need myself. Would that help preserve the accuracy of the entropy calculations? Btw, may I ask what it means that the entropy calculations gets less accurate when introducing this kinds of characters?

bbusschots commented 9 years ago

This functionality is now ready for testing in the CPAN-Prep branch: https://github.com/bbusschots/xkpasswd.pm/tree/CPAN-Prep

blueskyleaf commented 9 years ago

Great :)