Skip to content

Latest commit

 

History

History
47 lines (38 loc) · 866 Bytes

file-encryption.md

File metadata and controls

47 lines (38 loc) · 866 Bytes

Encrypting files

The standard seems to be gpg. You generate some keys, and use that for encryption and signing.

Generate Keys

gpg --gen-key

or

gpg --full-generate-key

Encrypt a file

gpg --output file.txt.enc --recipient [email protected] --encrypt file.txt
shred file.txt
rm file.txt

Decrypt a file

gpg --output file.txt --decrypt file.txt.enc

Export Key

gpg --list-secret-keys [email protected]
gpg --export-secret-keys [email protected]

Import Key

gpg --import-key my-key.key
gpg --edit-key [email protected]
gpg> trust

TODO

  • You can convert gpg keys to pgp text files
  • See the apt guide, there's some information there since it deals with this

Sources