Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # ref: http://irtfweb.ifa.hawaii.edu/~lockhart/gpg/gpg-cs.html
- # Create the keypair
- gpg --gen-key
- # Create revocation key.
- gpg --gen-revoke -armor --output=revocationCertificate.asc me@mail.address
- #export keys
- gpg --export -a "User Name" > public.key
- gpg --export-secret-key -a "User Name" > private.key
- #send pub to keyserver
- gpg --keyserver keyserver.ubuntu.com --send-keys KEY-ID
- # Import key from keyserver
- gpg --keyserver keyserver.ubuntu.com --recv 79986AB0
- gpg --list-keys
- # List his fingerprint
- gpg --fingerprint he@mail.address
- #sign his key
- gpg --sign-key he@mail.address
- # list the signed key as ascii ( send it to him so that he can show to others signed by me )
- gpg --export --armor he@mail.address
- #encrypt plain with his (he) pub key. This will generate plain.asc which can be send only to recipients
- #only those recipients can decrypt the message
- gpg --encrypt --sign --armor -r he@mail.address -r arunkumarv@cdac.in plain
- #encrypt files
- gpg --encrypt filename #this will ask recipients. give me@address otherwise I cannot decrypt the message
- gpg --encrypt --sign -r me@myaddress.com filename
- gpg --output filename --decrypt filename.gpg
- #decrypt files
- gpg filename
- gpg -d filename # just display
Add Comment
Please, Sign In to add comment