#+title: Passwords
On utilise gopass (version cross-platform de pass). Les mots de passes sont encryptés avec GPG et on stocke le tout dans un dépôt git.
1. Installer gopass
2. Pour le navigateur, installer gopass-apijson puis
#+begin_src sh
gopass-jsonapi configure
#+end_src
Suivre les indications
3. Pour iphone, installer passforios. On va ensuite générer un code QR pour la clé GPG afin de la partager.
Script: https://github.com/yishilin14/asc-key-to-qr-code-gif
Source:
#+begin_src bash
#!/usr/bin/env bash
# Check requirements
hash qrencode 2>/dev/null || { echo >&2 "Aborting: qrencode not installed"; exit 1; }
# Check argument
if [ $# -ne 2 ]; then
echo "Usage: $0 <ascii armor key filename> <gif filename>"
exit 1
fi
asc_filename=$1
if [ ! -f ${asc_filename} ]; then
echo "Error: ${asc_filename} not found"
exit 1
fi
# Settings
gif_filename=$2
gif_delay=100
qrcode_size=1732
qrcode_version=30
# Split the file
rm -f ${asc_filename}.split*
split -b ${qrcode_size} ${asc_filename} ${asc_filename}.split
# Generate png
for f in ${asc_filename}.split*; do
qrencode -v ${qrcode_version} -o $f.png < $f
rm $f
done
if hash zbarimg 2>/dev/null; then
# Check png
> ${asc_filename}.scanned
for f in ${asc_filename}.split*; do
printf %s "$(zbarimg --raw -q $f)" >> ${asc_filename}.scanned
done
printf %s "$(cat ${asc_filename})" | diff ${asc_filename}.scanned -
rm ${asc_filename}.scanned
else
echo "Skip testing: zbarimg not installed"
fi
# Convert to gif
convert -delay ${gif_delay} ${asc_filename}.split* ${gif_filename}
echo "Generated: ${gif_filename}"
# Clean up png
rm ${asc_filename}.split*
#+end_src
1. EXporter en ascii amored
#+begin_src sh
gpg --export -a "Key ID" > public.asc
gpg --export-secret-keys -a "Key ID" > private.asc
#+end_src
2. Crééer une liste d'image pour clé (ne tient pas en une seule)
#+begin_src sh
./asc-to-gif.sh public.asc public.gif
./asc-to-gif.sh private.asc private.gif
#+end_src
Puis on scanne dans l'application