offend

command module
v0.0.0-...-bf622f5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 13, 2023 License: GPL-3.0 Imports: 17 Imported by: 0

README

Offend

Author

(c) 2021 VigilantDoomer

Description

Offend is a program to generate random passphrases using a wordlist and a source of randomness, such as cryptographic pseudo random number of generator your operating system provides, or by throwing dice. In the latter case, you need real world dice, and the program will instruct you to throw the dice, type the side you got, and repeat it until it is able to generate the passphrase with the given properties (desired entropy or number of words).

It is thus similar to diceware Python program, which in turn is merely an electronic implementation of diceware protocol by Arnold G. Reinhold (which was originally intended to operate on dice only, hence the name of 'diceware').

Offend has different defaults from diceware program, however:

  1. It uses default minimum entropy of 77.5 rather than 6 words. This minimum is equivalent to generating 6 words with a dictionary containing 7776 words, all of which are unique, and no word is a prefix of another. This approach guards against choosing wordlists with fewer amount of UNIQUE words, such as those with 4000 unique words repeated twice for use with 20-sided dice, as that setup may confuse the user to think they have entropy worth of 8000 words, but they don't.

  2. It will warn user if the chosen dictionary contains words that are prefixes of other words, or if dictionary contains repeated words. It will do so by printing dictionary stats even if verbosity parameter was not passed (with verbosity, dictionary stats will be printed even for dictionaries without any caveats). Note that duplicated words might be NOT a problem if every word is repeated exactly the same amount of time as any other (the distribution is fair), and the user supplies an entropy target rather than a "number of words in passphrase" target.

  3. The wordlists distributed with the program DO include SWEAR and OFFENSIVE words for better memorability, however you do not have to use them, and can use any wordlist supported by diceware program. As the result of this difference, the default wordlists, with exceptions of en_eff.txt (which is Electronic Frontier Foundation's large wordlist, https://www.eff.org/dice) and offend_scrap.txt, have better entropy per character and generate shorter passphrases on average, which is significant for when you need higher amount of words (and 6 words of 7776-word list is rather weak per my standards, you would want 10 words of 7776-word list to reach entropy of 128 bits).

Rationale

When I first stumbled upon EFF's wordlists for passphrase generation, I misread their reasoning about compiling these wordlists to INCLUDE offensive and rare words rather than EXCLUDE them. I figured that offensive and rare words would work better for remembering passphrases. Upon experiments, I also discovered that:

  1. As a non-native English speaker, the vocabulary in EFF wordlists contains words unknown to me, and those I could easily misspell. What is average native English speaker is able to get without mistakes is of no relevance to me.

  2. The passphrases generated by it are long, hard to memorize, especially if number of words greater than 6 words are used, and since the only time I would want to hold a passphrase or password in my head is for encrypted disks, my use case for strong protection exactly requires high entropy and rather large amount of words.

  3. Approach to use ONLY swear/offensive words fails, because I don't know too many, which results in even longer passphrases for a given entropy, as both words are longer on average (one needs to avoid words that are prefixes of others), and more words are needed (the dictionary is smaller). I still include the dictionary with high ratio of offensive words, but it is only 1728 words, and the only good thing about it is 3 throws of 12-sided dice per word.

  4. Mixing three languages (but limited to English characters) in a wordlist is awesome, and Russian language stands by its own for having lots of short words. Try "offend_trilingual", "offend_trimini", "offend_trimedium", "offend_triweak" and "offend_ru" (the latter if you know Russian language). For trilingual dictionaries, just treat the generated passphrases as incantations - try remember how the words are written, not think about how you say them. offend_trilingual, in particular, reaches 128 bits with only 9 words, not 10 - remember that typing a passphrase for encrypted disk is something some of us have to do DAILY before they can boot and log in into their operating system.

Important note: you do NOT have to use dictionaries with offensive words, you can use any dictionary you want, if its format is supported. Offend supports the same formats that diceware program supports. From Offend, you get the benefit that it will check your dictionary for any abnormalities that could have made you generate a weaker passphrase than you intended. If you didn't pass the verbose parameter, but Offend prints more than just a generated passphrase, it wants you to pay attention.

License

Offend is free software: you can redistribute it and/or modify it under the terms of GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Offend is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with Offend (see file COPYING.txt). If not, see https://www.gnu.org/licenses/.

The same license applies to packaged dictionaries.

Plans

  1. Document which dictionaries/technologies were used for generating the "offend_*" ones. While I did ensure that the resulting dictionaries can be placed under GPLv3, some of them could use a permissive license.

  2. Cover more of a program with tests to ensure program meets the security promises.

  3. Implement more features, as some features of Diceware are currently absent, and some original features might be desired, too.

  4. Write my own introduction to the concept of passphrases, as well as document the program better.

Usage

Usage: offend {-options}

  -c, --caps                  Capitalize words. (default true)
  -d, --delimiter string      Separate words by delimiter. Empty string by default
  -e, --entropy float         Desired entropy, in bits. (default 77.5)
  -f, --faces int             Number of faces/sides of dice, when "realdice" is used as source. (default 6)
  -l, --list                  List all the available wordlists which can be passed to -w (--wordlist) parameter
  -n, --num int               Number of words to concatenate.
  -r, --randomsource string   Get randomness from this source. Possible values: "realdice", "system". (default "system")
  -v, --verbose count         Be verbose. Use several times for increased verbosity.
  -w, --wordlist string       Use words from this wordlist. (default "offend_fast")


Website / contact information

You can contact me (the developer) through a forum: https://thegreatresist.freeforums.net username: vigilantdoomer displayname: Vigilante

And of course you can open an issue on github.

Documentation

Overview

Copyright (C) 2023, VigilantDoomer

This file is part of Offend program.

Offend is free software: you can redistribute it and/or modify it under the terms of GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Offend is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with Offend. If not, see <https://www.gnu.org/licenses/>.

This file is part of Offend program.

Offend is free software: you can redistribute it and/or modify it under the terms of GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Offend is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with Offend. If not, see <https://www.gnu.org/licenses/>.

This file is part of Offend program.

Offend is free software: you can redistribute it and/or modify it under the terms of GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Offend is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with Offend. If not, see <https://www.gnu.org/licenses/>.

This file is part of Offend program.

Offend is free software: you can redistribute it and/or modify it under the terms of GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Offend is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with Offend. If not, see <https://www.gnu.org/licenses/>.

This file is part of Offend program.

Offend is free software: you can redistribute it and/or modify it under the terms of GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Offend is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with Offend. If not, see <https://www.gnu.org/licenses/>.

This file is part of Offend program.

Offend is free software: you can redistribute it and/or modify it under the terms of GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Offend is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with Offend. If not, see <https://www.gnu.org/licenses/>.

This file is part of Offend program. It contains Sardinas-Patterson algorithm implementation: check if the dictionary can produce strictly non-ambiguous encodings, even if some words are prefixes of others

Offend is free software: you can redistribute it and/or modify it under the terms of GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Offend is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with Offend. If not, see <https://www.gnu.org/licenses/>.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL