File Encryption¶
For encrypting sensitive data when sending it through the Internet, you can use PGP encryption. It is a public key encryption program that has become the most popular standard for email encryption. PGP uses a private key that must be kept secret and a public key that the sender and receiver must share.
In the example below, we will use GPG (GNU Privacy Guard), which is a complete and free implementation of the OpenPGP standard. If you do not have GPG setup yet, first follow the instructions under “Set Up GPG Keys” in this tutorial: How To Use GPG to Encrypt and Sign Messages. Also, you can find a brief list of software that has PGP capability here.
How To Import the Talkable Public Key¶
Before encrypting or decrypting you should import the Talkable public key. Here is a command to do it:
curl https://d2jjzw81hqbuqv.cloudfront.net/integration/talkable_public_key.asc | gpg --import
To check that the Talkable public key importing was done right, make sure that the next command is successful:
gpg --list-keys dev@talkable.com
Encrypting¶
To encrypt data, you can use the following syntax:
gpg --encrypt --sign --armor -r dev@talkable.com name_of_file
This encrypts data using the Talkable public key and signs it with your own
private key to guarantee that it is coming from you. Encrypted files will have the
same name as the input files, but with an .asc
extension. After this, you can
safely send the encrypted file to Talkable. Make sure to send us the public key
as well.
Note
You should include a second "-r"
recipient with your own email address if
you want to be able to read the encrypted message.
Decrypting¶
To decrypt a file simply call GPG on it:
gpg file_name.asc