Encryption
Some simple pages on encryption software.
Age
Simple file encryption software that's unix only.
Generating key file with password protection
age-keygen | age -p > key.age
Basic key info
# created: 2023-03-28T22:22:05+02:00
# public key: pub key
SECRET-KEY
Encryption with key
age -r PUBLIC-KEY **file-name** > **output-file**
Decryption with key
Enter password if keyfile encrypted with one
age -d -i **path/to/key** **file-name** > **output-file**
Tared file
tar -cv directory | age r PUBLIC-KEY > **output-file**
GPG
How to use gpg for encryptions
Creation of keys
gpg --full-generate-key
Update expiration date
gpg --edit-key **email**
ls
key 0
expire
save
Changing the password
gpg --passwd **email**
Revoke/expire the key
# Generate your revoke certificate
gpg --output revoke.asc --gen-revoke key-ID
# Import the keys
gpg --import revoke.asc
# Search your key on the key-server
gpg --keyserver pgp.mit.edu --search-keys key-ID
# Send the revoked key to the key-server
gpg --keyserver pgp.mit.edu --send-keys key-ID
Backup private key
To backup
gpg -o private.gpg --export-options backup --export-secret-keys **email**
To import
# Import the key
gpg --import-options restore --import private.gpg
# Edit the key
gpg --edit-key **email**
# Choose 5 to completely trust the key
trust