Gpg: Difference between revisions

From Wiki :-)
Jump to navigation Jump to search
No edit summary
No edit summary
Line 37: Line 37:


sudo cryptsetup --verbose --key-file - --cipher aes-xts-plain64 --key-size 512 --hash sha512 luksOpen keys.ext4.luks gpg_vault
sudo cryptsetup --verbose --key-file - --cipher aes-xts-plain64 --key-size 512 --hash sha512 luksOpen keys.ext4.luks gpg_vault
Remove private master key:
gpg2 --with-keygrip --list-key 0x<MASTERKEY>
rm -rf $GNUPGHOME/private-keys-v1.d/<KEYGRIPID>.key
all private keys are in private-keys-v1.d/.


== Resources ==
== Resources ==

Revision as of 23:59, 29 May 2017

Import public keys[1]: $ gpg --import keys.txt

Check the file's signature[2]: $ gpg --verify foo.sig foo

gpg --card-status

opensc-tool --list-readers

pcsc_scan

ykinfo -a

Delete keys: gpg --delete-keys

Delete secret keys: gpg --delete-secret-keys

List key: gpg --list-keys

List secret-keys: gpg --list-secret-keys

Create master key:

gpg2 --full-gen-key

https://wiki.debian.org/Subkeys

Create subkey:

gpg --edit-key <e-mail>

gpg2 --expert --card-edit

cryptsetup --verbose --key-file - --cipher aes-xts-plain64 --key-size 512 --hash sha512 luksFormat keys.ext4.luks

sudo cryptsetup --verbose --key-file - --cipher aes-xts-plain64 --key-size 512 --hash sha512 luksOpen keys.ext4.luks gpg_vault

Remove private master key:

gpg2 --with-keygrip --list-key 0x<MASTERKEY>

rm -rf $GNUPGHOME/private-keys-v1.d/<KEYGRIPID>.key

all private keys are in private-keys-v1.d/.

Resources

https://riseup.net/en/security/message-security/openpgp/best-practices#how-to-use-this-guide
http://ekaia.org/blog/2009/05/10/creating-new-gpgkey/
https://spin.atomicobject.com/2013/11/24/secure-gpg-keys-guide/

References