Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable to set and wipe the backup passphrase key #79

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

HenriGEIST
Copy link

This pull request enable setting resetting the backup passphrase key containing the sha256sum of the passphrase.
This is done by adding the BACKUP name in the code like RSA1 to RSA2 and ECC1 to ECC16.

Then it is possible to set the passphrase with:

read -s -p "Enter Passphrase:" PASSPHRASE1
echo
read -s -p "Retype passphrase:" PASSPHRASE2
echo
if [ "$PASSPHRASE1" != "$PASSPHRASE2" ]
then
echo "Error passphrases mismatch" > /dev/stderr
else
onlykey-cli setkey BACKUP x b $(printf "%s" "$PASSPHRASE1" | sha256sum | grep -o '[0-9a-fA-F]*')
fi
PASSPHRASE1=""
PASSPHRASE2=""

And wipe it with:

onlykey-cli wipekey BACKUP

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant