Loading

MuleSoft Generate PGP Keys Using Kleopatra To Use With Cryptography Module

Publiseringsdato: Jan 22, 2026
Beskrivelse

This MuleSoft knowledge article explains how to generate a public/private key pair for Anypoint Enterprise Security using the Kleopatra application.

For example, in this scenario, it will be used and tied to the Cryptography Module, which uses public/key pairs in order to encrypt/decrypt or sign/verify messages.

Løsning

Crypto PGP (Pretty Good Privacy) Configuration for Anypoint Studio Using Kleopatra

In order to generate PGP keys using Kleopatra, please use the following steps: 

1. Open Kleopatra, go to 'File'>>'New Key pair'.
2. Click on 'Create a personal OpenPGP key pair'.
3 Click on Advance Settings, under 'Key Material', select RSA and check '+RSA', making sure 3,072 bits are selected for both.
4. Click OK
5. Add Name and E-mail, in your case add a check to 'Protect the generated key with passphrase'
6. Click 'Create' and add the desired passphrase
7. Click 'Finish'
8. Right-click the added entry and click on 'Export' and save the pub key with the desired name with .gpg file extension(pub key)
9. Right-click the added entry and click on 'Backup Secret Keys ' and save secret key with the desired name with .gpg file extension (secret key), and add a passphrase if you receive a prompt.
10. Right-click the added entry and click on 'Details'>>More Details>>
11. Note the ID value, which has 'Usage' as 'Encrypt' as it will be used in the Crypto Pgp configuration for Anypoint Studio as the following:
-ID (last 8 characters) - will be used as the 'Key id' value
-ID (full 16 characters) - will be used as the 'Fingerprint' value
12. Once noted, go to the sample app>>Global Elements>>Crypto Pgp
13. Add the following:
a. Public keyring: generated .gpg pub key in step 8
b. Private keyring: generated .gpg secret key in step 9
c. Add a new entry in the table using the ID information from step 11 and also add the passphrase used.

Once the configuration is complete, attempt to decrypt a file that has been encrypted with the generated keys.
 

DISCLAIMER

  • This article involves products and technologies which do not form part of the MuleSoft product set. Technical assistance for such products is limited to this article.
  • The article shows an example for testing purposes only. 
Knowledge-artikkelnummer

001121742

 
Laster
Salesforce Help | Article