Skip to main content

RSA Encrypt

RSA Encrypt encrypts plaintext using a provided RSA public key (PEM format) and outputs the encrypted value.

The step allows configurable padding.


Parameters

PUBLIC_KEY

RSA public key in PEM format.

Example:

-----BEGIN PUBLIC KEY----- MIIBIjANBgkqh... -----END PUBLIC KEY-----

Required


PADDING_MODE

Specifies the RSA encryption padding mode.

Supported values:

  • Pkcs1
  • OaepSHA1
  • OaepSHA256
  • OaepSHA384
  • OaepSHA512

Default: Pkcs1


PLAIN_TEXT_ENCODING

Encoding used to convert plaintext into bytes before encryption.

Supported values:

  • utf8
  • unicode
  • ascii
  • base64 (if input is already base64)

Default: utf8


CIPHER_TEXT_ENCODING

Encoding used to convert encrypted bytes into output string.

Supported values:

  • base64 (recommended)
  • hex

Default: base64


PLAIN_TEXT_PARAM

Message parameter name that contains the plaintext input.

Default: PLAIN_TEXT


CIPHER_TEXT_PARAM

Message parameter name that receives the encrypted output.

Direction: Out
Default: CIPHER_TEXT


Execution Context Behavior

  1. Reads plaintext from PLAIN_TEXT_PARAM.
  2. Converts plaintext to bytes using PLAIN_TEXT_ENCODING.
  3. Imports the RSA public key from PUBLIC_KEY (PEM format).
  4. Encrypts using RSA.Encrypt with the configured PADDING_MODE.
  5. Encodes the encrypted bytes using CIPHER_TEXT_ENCODING.
  6. Writes the result to CIPHER_TEXT_PARAM.

Example Configuration

ParameterValue
PUBLIC_KEY-----BEGIN PUBLIC KEY-----...
PADDING_MODEOaepSHA256
PLAIN_TEXT_ENCODINGutf8
CIPHER_TEXT_ENCODINGbase64
PLAIN_TEXT_PARAMPLAIN_TEXT
CIPHER_TEXT_PARAMCIPHER_TEXT

Example Result

CIPHER_TEXT = [base64 encrypted output]