Loading

How to generate a PGP public/private key pair for Anypoint Enterprise Security

Publiseringsdato: Jul 25, 2025
Oppgave

GOAL

This knowledge base article explains how to generate a public/private key pair for Anypoint Enterprise Security.

For example, the Mule Message Encryption Processor and the Mule Digital Signature Processor can use public/key pairs in order to encrypt/decrypt or sign/verify messages.

Trinn

The GnuPG (GNU Privacy Guard) - https://www.gnupg.org/ is a complete and free implementation of the OpenPGP standard as defined by RFC4880 (also known as PGP). This implementation is the recommended one to generate public/private key pairs suitable for working with Anypoint Enterprise Security.

Please follow the below steps in order to generate a public/private key pair:

  1. Download a binary distribution of the GnuPG implementation for your operating system from here: https://www.gnupg.org/download/index.html, or alternatively instruct your operating system package manager to install it (for this please check the documentation of your operating system).
  2. Once installed, please open a new terminal window (e.g. a Linux bash terminal, a Windows cmd, etc) and make sure the gpg command is available (run gpg --version):
    gpg --version
    
    gpg (GnuPG/MacGPG2) 2.0.30
    libgcrypt 1.6.6
    Copyright (C) 2015 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.
    
    Home: ~/.gnupg
    Supported algorithms:
    Pubkey: RSA, RSA, RSA, ELG, DSA
    Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH,
            CAMELLIA128, CAMELLIA192, CAMELLIA256
    Hash: MD5, SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
    Compression: Uncompressed, ZIP, ZLIB, BZIP2
  3. Generate a new public/private key pair by running the command gpg --gen-key​ and just filling in the requested values by the command (the default values will work fine to do some quick testing).
  4. Once the command is complete, the new keys can be found in the default keyring (usually located under ${HOME}/.gnupg directory. The files are pubring.gpg for the public key and secring.gpg for the secret key).
  5. Then just reference those files in the configuration of the mule encryptors/decryptors.
Knowledge-artikkelnummer

001114815

 
Laster
Salesforce Help | Article