- Notifications
You must be signed in to change notification settings - Fork1
Generate password from dictionary with BSD licensing and practices
License
guijan/dictpw
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Dictpw randomly picks 4 words off a 7776-word dictionary and prints them with adot between each word. This is theDiceware method of password generationfrom the command line.
Which of the following 2 passwords is easier to memorize?
computer.stuffy.dexterity.carveJ#2%Q*PDfNI
A password scheme's security can be measured by the number of distinct passwordsit can generate. To keep these incredibly large numbers intelligible, they'regiven as exponents of 2, or bits. dictpw's default password length can generate7776^4 distinct passwords, or52 bits of security. Based on veryconservative estimates made usingmy calculator, a 100-dayattempt to crack such a password with 500000 USD budget for hardware (notcounting electricity and labor) would have a 25% chance of succeeding in 2024.
The reasoning for these numbers is included in the calculator's source code.
$build/dictpwcanary.gnat.uncross.waking$build/dictpw -n3chummy.iguana.outsider
Dictpw depends onMeson and a C compiler.Git is one method to acquire the source code.Some systems optionally depend on eitherlibbsd orlibobsd, if neither ispresent, libobsd is automatically downloaded and statically linked into dictpw.
Acquire the source code with git and enter its directory:
$git clone --depth 1 https://github.com/guijan/dictpw$cd dictpw
Compile the program:
$meson setup build&& meson compile -C build
The binary will be inbuild/dictpw.
Windows hosts optionally depend on Inno Setup in the$env:PATH
to produce aninstaller.
InstallMSYS2 and follow the installationinstructions; make sure to read theMSYS2-Introduction page aftercompleting the installation instructions-failure to do so may break your MSYS2installation.
The instructions below are the same for the UCRT64 (x64 binaries) and MINGW32(x86 binaries) environments. Other environments aren't supported for end users.
Install the dependencies:
foo@bar UCRT64 ~$winget install -e --id JRSoftware.InnoSetupfoo@bar UCRT64 ~$inno="$(cmd //c'echo %ProgramFiles(x86)%'| cygpath -uf-)/Inno Setup 6/"foo@bar UCRT64 ~$PATH="${PATH}:${inno}"foo@bar UCRT64 ~$pacboys -S --noconfirm git: dos2unix: groff: gcc:p meson:p ninja:p
Acquire the source code with git and enter its directory:
foo@bar UCRT64 ~$git clone --depth 1 https://github.com/guijan/dictpwfoo@bar UCRT64 ~$cd dictpw
Compile the program and installer:
foo@bar UCRT64 ~/dictpw$meson setup build&& meson compile installer -C build
The installer will be atbuild/setup-dictpw.exe, and the program itself willbe atbuild/dictpw.exe.
Open uppowershell.exe
and install the dependencies viaChocolatey:
PS C:\Users\foo> choco install -y groff innosetup meson git dos2unixPS C:\Users\foo> refreshenv
Acquire the source code with git and enter its directory:
PS C:\Users\foo> git clone --depth 1 https://github.com/guijan/dictpwPS C:\Users\foo> refreshenvPS C:\Users\foo> cd dictpw
Compile the installer:
PS C:\Users\foo\dictpw> meson setup build && meson compile installer -C build
The installer also installs the manual. Checkdictpw.txt inside theinstallation directory.
By default, dictpw uses the EFF'slong word list.You can specify a custom dictionary by setting thedict option with Meson. Adictionary is a file with one word per line.
About
Generate password from dictionary with BSD licensing and practices