IJHack / QtPass

QtPass is a multi-platform GUI for pass, the standard unix password manager.
https://qtpass.org/
GNU General Public License v3.0
1.03k stars 162 forks source link

How to generate passphrases using a Diceware-compatible dictionary file? (XKCD style passphrases) #549

Open MountainX opened 4 years ago

MountainX commented 4 years ago

Is there a way to use this pass extension or a similar one with QtPass?

pass-genphrase: Passphrase generator extension for pass, the password manager. https://github.com/congma/pass-genphrase

Currently, I have to use a tool like this separately, and I am looking for something integrated into QtPass instead:

XKCD-password-generator: Generate secure multiword passwords/passphrases, inspired by XKCD https://github.com/redacted/XKCD-password-generator

issue-label-bot[bot] commented 4 years ago

Issue-Label Bot is automatically applying the label question to this issue, with a confidence of 0.75. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

martinburchell commented 3 years ago

A bit of a hack. On Ubuntu I have a script xkcdpwgen which looks like this:

#!/bin/bash

XKCD_HOME=$HOME/workspace/XKCD-password-generator/
PWGEN=$XKCD_HOME/xkcdpass/xkcd_password.py

$PWGEN -d "" -n 4

Then in the QtPass config under Programs, I set pwgen to point to the script This means that the XKCD password generator will always be called with the same arguments, so the Password Length setting in QtPass is ignored.

mulles commented 2 years ago

@martinburchell probably you know what arguments Qtpass uses to call pwgen? Or you can point me to the project file? Seems to be different from $ pwgen 4 1 (generate a password with lenght 4 and only 1 and not more passwords)

In case you do, one could optimize the script to call $PWGEN -d "" -n $'the number for the argument'so that one can adjust the number of words uses for the generated passphrase.

Steps to install the script:

1. $pip3 install xkcdpass $touch ~/.local/bin/xkcdpwgen.sh $chmod u+x ~/.local/bin/xkcdpwgen.sh

  1. Copy this
    
    #!/bin/bash

XKCD_HOME=/usr/bin/xkcdpass PWGEN=$XKCD_HOME

$PWGEN -d " " -n 4''


to the created xkcdpwgen.sh  file. 
3. File out ~/.local/bin/xkcdpwgen.sh    for pwgen in Qtpass

thx so much for sharing your idea :+1: 
martinburchell commented 2 years ago

@mulles

Just looking here:

https://github.com/IJHack/QtPass/blob/master/src/pass.cpp#L69

The arguments to pwgen appear to be:

The UI only gives you control of the length of the password in characters, not the number of words. I suppose the script could repeatedly generate passwords until it found one the right length but that would limit the possibilities considerably.