Explore more
Securing data with Make
PGP (Pretty Good Privacy)
1 min
https //apps make com/crypto#encryptor modules is a cryptographic tool that encrypts a message using both symmetric and asymetric keys a signature can be sent with the message to further ensure integrity and authentication the sender generates a temporary session key, a random number used only once the session key is used as a symmetric key to encrypt the message the sender uses a public key from the receiver to encrypt and send the session key the sender transfers both the encrypted session key and the encrypted message to the receiver finally, the receiver uses their private key to decrypt the session key and then uses the session key to decrypt the message pgp keys in {{product name}} must have at least 2048 bits example encrypt and decrypt a pgp message with the encryptor app in this example we will select content to encrypt and send to a recipient generate a pair of private and public keys for the sender and recipient encrypt the message decrypt the message step 1 select content to encrypt in this example, we set a variable initialtext with our content to send encrypted in your scenario, you may have the content set another way or pulled from a different source step 2 generate a pair of private and public keys for the sender and recipient go to a pgp key generator website of your choice in this example, we use https //pgpkeygenerator com/ select or set the following values key algorithm rsa (ecc can be used in make as well) key size 2048 bits name enter a name to identify the use of the keys email enter an email address passphrase content used to protect the private key expiration time select when you want the keys to expire click generate keys to get a pair of private and public rsa keys if you are using a different tool to generate your keys, your steps may be different copy the private and public keys and save them in a safe place additionally, remember the passphrase you used you will need all three in make both the sender and recipient need a set of private and public keys the sender and recipient create these key pairs separately and share the public keys with each other to encrypt a message, the sender uses the recipient's public key the recipient uses their private key to decrypt the message if the sender also uses their private key to sign the message (not required), the recipient needs the sender's public key to validate the signature step 3 encrypt the message add the encryptor > encrypt a pgp message module to your scenario for the required public key , click create a keychain enter a name for your recipient's public key in the public key field, enter the recipient's public key click create optional if you want to attach a verifiable signature, click create a keychain for the private key field repeat steps 3, 4, and 5 to create the sender's private key in the message field, map the value of the content you want to encrypt click save the ouput of this module is the encrypted message and a verifiable signature is included step 4 decrypt the message add the encryptor > decrypt a pgp message module to your scenario for the required private key , click create a keychain enter a name for your recipient's private key in the private key field, enter the recipient's private key click create optional if a verifiable signature was attached, click create a keychain for the public key field repeat steps 3, 4, and 5 to create the sendér's public key in the message field, map the value of the content you want to decrypt for the verify signature with a public key field, click yes or no click yes if a signature is attached click save the message is decrypted the output of this module is the decrypted message and should match the original content set in the initialtext variable if the wrong private key is used, the message has been modified, or there is a problem with the sender's signature, the module outputs an error