RSA Cryptography

Discover more about the RSA Cryptography component and how to use it on the Digibee Integration Platform.

RSA Cryptography encrypts and decrypts based on the RSA algorithm.

Parameters

Take a look at the configuration parameters of the component. Parameters supported by Double Braces expressions are marked with (DB).

ParameterDescriptionDefault valueData type

Account

Account to be used by the component.

N/A

String

Crypto Operation

Available operation types - Encrypt Fields, Decrypt Fields, Encrypt Payload, and Decrypt Payload.

Encrypt Fields

String

Fields To Encrypt/Decrypt

Fields to be encrypted/decrypted using a dotted notation (e.g., body.field1, body.field2, body).

a.test

String

Payload To Encrypt/Decrypt

Payload to be encrypted/decrypted using dotted notation.

N/A

String

Operation Mode

Operation mode to be used.

ECB

String

Padding

Used in a block cipher where we fill up the blocks with padding bytes (e.g., AES 128 bits uses 16 padding bytes).

OAEPWithSHA-512AndMGF1Padding

String

Charset

Charset of the provided key of type string.

UTF-8

String

Encrypted Message As Hexa

If the option is activated, the secret key response will be in hexadecimal; otherwise, it will be in base64.

False

Boolean

Fail On Error

If the option is enabled, the execution of the pipeline with an error will be interrupted; otherwise, the pipeline execution proceeds, but the result will show a false value for the "success" property.

False

Boolean

To encrypt, you must configure a Public key account or pass the property key via body with the respective key.

To decrypt, you must configure a Private key account.

Messages flow

Operation Encrypt Fields

Input

{	
    "operation": "encrypt_fields",	
    "operationMode": "ECB",	
    "padding": "OAEPWithSHA1AndMGF1Padding",	
    "encryptedFields": "data,data1",	
    "failOnError": true
    "key": "PoeK/VBTcUyRHFkmWYjckbhsRLnZur6S83lKZ78V51EL3KlDNnPJZkdz+m7joRfOxFuEqU=" //Inform the Key parameter if the Account is not configured
}

Payload

{	
    "data": someData,	
    "data1": someData1
}

Output

{	
    "data": "RXZlbiBpZiBwZXJmZWN0IGNyeXB0b2dyYXBoaWMgcm91dGluZXMgYXJlIH=",	
    "data1": "RXZlbiBpZifd441mZWN0IGNyeXB0b2dyYXBoaWMgcm91dGluZXMgYXJlIH="
}

Operation Decrypt Fields

Input

{	
    "operation": "decrypt_fields",	
    "operationMode": "ECB",	
    "padding": "OAEPWithSHA1AndMGF1Padding",	
    "encryptedFields": "data,data1",	
    "failOnError": true
}

Payload

{	
    "data": "RXZlbiBpZiBwZXJmZWN0IGNyeXB0b2dyYXBoaWMgcm91dGluZXMgYXJlIH=",	
    "data1": "RXZlbiBpZifd441mZWN0IGNyeXB0b2dyYXBoaWMgcm91dGluZXMgYXJlIH="
}

Output

{	
    "data": someData,	
    "data1": someData1
}

Last updated