PGP Encryption/Decryption
Public Key: Used to encrypt
Secret Key: Used to decrypt
Generating Public and Secret key files for PGP Encryption/Decryption
1) Download gnu4win software through below link and install.
https://www.gnupg.org/download/index.html
Note: Install two software’s selected below
2) Now go to the start menu and launch Kleopatra.
3) Kleopatra is a PGP keychain manager application. The main window should look like as
below.
4) Now click on File => New key pair
5) Select the 'Create a personal OpenPGP key pair' option.
6) Enter your name and emails address into the following form.
7) Review your settings then click on the 'Create Key' button if everything is all right.
8) Now select a strong passphrase. This will protect your private key on your hard disk with
encryption.
Warning: Never reuse your passwords
Choose a brand-new passphrase that you have never used on any other service (e.g. Gmail)
before
9) If the key generation was successful, you should be offered with the following options and
Click on 'Finish' to finish the process.
10) Right-click on your PGP key-pair and select 'Change Expiry Date...'.
11) Set 2 Years as the expiry period then click 'OK'.
12) Expiry date should be set.
13) Right-click on the key-pair and select 'Export Secret Keys...' for secret key file.
14) Enter a filename and path for the backup.
15) Right-click on the key-pair and select 'Export ...' for public key file.
16) Please import generated public and secret file to src/main/resources path in our interface.
17) In Encryption connector, select PGP_ENCRYPTER in select encrypter.
a) In Connector configuration -> general, in default encrypter give as PGP_ENCRYPTER
and check the enable log check box.
b) In pgp Encrypter,
In public key ring filename = give the public key filename.
In secret key ring filename = give the secret key filename.
In secret alias Id = give some random value, in console we will get alias id when we
deploy mule project, copy the correct value from console and replace.
In secret passphrase = give passphrase which we gave while creating key pairs.
In principle = give “name <email>” which we gave while creating key pairs.
Now you can perform PGP Encryption/Decryption
Thank You