Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Generate password from dictionary with BSD licensing and practices

License

NotificationsYou must be signed in to change notification settings

guijan/dictpw

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

Analysis

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.

Example

$build/dictpwcanary.gnat.uncross.waking$build/dictpw -n3chummy.iguana.outsider

Compiling

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.

Linux, macOS, other Unix systems, and HaikuOS

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

Windows hosts optionally depend on Inno Setup in the$env:PATH to produce aninstaller.

MSYS2

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.

Visual Studio

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

Windows documentation

The installer also installs the manual. Checkdictpw.txt inside theinstallation directory.

Custom dictionary

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.


[8]ページ先頭

©2009-2025 Movatter.jp