Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Alice
- gpg --gen-key
- gpg --list-keys
- gpg --export-secret-key -a alice@email.com > alice.priv.key
- gpg --armor --export alice@email.com > alice.pub.key
- ## Send alice.pub.key to Bob
- # Bob
- gpg --import alice.pub.key
- gpg -e -u alice@email.com -r alice@email.com data.txt
- openssl sha -sha256 data.txt.gpg > data.txt.gpg.sha256
- ## Send data.txt.gpg & data.txt.gpg.sha256 to Alice
- # Alice
- ## Validate the hashes
- openssl sha -sha256 data.txt.gpg
- cat data.txt.gpg.sha256
- ## Decrypt
- gpg -d data.txt.gpg > data.txt
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement