Skip to content

Instantly share code, notes, and snippets.

@patovala
Last active November 15, 2021 21:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save patovala/4c6e86a63e258a771f5da7506747f2d8 to your computer and use it in GitHub Desktop.
Save patovala/4c6e86a63e258a771f5da7506747f2d8 to your computer and use it in GitHub Desktop.
secret generator to share securely over an insecure place
# Generate the key
`gpg --generate-key`
# Print your public key in the terminal
`gpg --export -a geguez@ioet.com | base64`
# Copy and share the public key with the person you will send the message to (this has to be done just once)
# import the public key of the sender (once per sender)
`echo <the text of the public key> | base64 --decode | gpg --import`
# Encrypt a message
`echo "<not encrypted message>" | gpg --encrypt -r <someone@ioet.com> | base64`
# Encrypt a message to send to multiple recipients
`echo "<not encrypted message>" | gpg --encrypt -r <one@ioet.com> -r <two@ioet.com> | base64`
# Decrypt a message
`echo <encrypted message> | base64 --decode | gpg --decrypt`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment