Advertisement
Guest User

Untitled

a guest
Oct 12th, 2017
476
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement