SHARE
TWEET

Untitled

a guest Oct 12th, 2017 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Alice
  2. gpg --gen-key
  3. gpg --list-keys
  4. gpg --export-secret-key -a alice@email.com > alice.priv.key
  5. gpg --armor --export alice@email.com > alice.pub.key
  6. ## Send alice.pub.key to Bob
  7.  
  8. # Bob
  9. gpg --import alice.pub.key
  10. gpg -e -u alice@email.com -r alice@email.com data.txt
  11. openssl sha -sha256 data.txt.gpg > data.txt.gpg.sha256
  12. ## Send data.txt.gpg & data.txt.gpg.sha256 to Alice
  13.  
  14. # Alice
  15. ## Validate the hashes
  16. openssl sha -sha256 data.txt.gpg
  17. cat data.txt.gpg.sha256
  18. ## Decrypt
  19. gpg -d data.txt.gpg > data.txt
RAW Paste Data
Top