All Collections
Components
Digital Signature
Digital Signature

Know the component and how to use it.

Micaella Mazoni avatar
Written by Micaella Mazoni
Updated over a week ago

IMPORTANT: This documentation has been discontinued. Read the updated Digital Signature documentation on our new documentation portal.

Digital Signature signs and verifies messages based on public and private keys.

Take a look at the configuration parameters of the component:

  • Operation: operation types of the component (Sign Fields, Sign Payload or Verify).

  • Charset: name of the encoding that reads the value.

  • Hash Algorithm: algorithm used to sign/verify the data (eg.: SHA256WithRSA).

  • Hash: base64 or hex base to be verified against the payload.

  • Hash in Hexadecimal: if the option is activated, the value to be verified or signed must be provided in hex format; otherwise, it will be signed or verifies as base64.

  • Public Key Algorithm: public key algorithm type (eg.: RSA) - available for VERIFY operation only.

  • Sign Fields: fields to be signed/verified (must be separated by comma).

  • Payload: defined by a single value or Double Braces - available for the SIGN PAYLOAD and VERIFY operations.

  • Fail On Error: if the option is enabled, the execution of the pipeline with error will be interrupted; otherwise, the pipeline execution proceeds, but the result will show a false value for the “success” property.


To sign, you must configure a PRIVATE_KEY account or send the property of the key via body.

To verify, you must configure a PUBLIC_KEY account or send the property of the key via body.


Digital Signature in Action

Operation SIGN FIELDS

1. In your components palette, select Digital Signature.

2. Open the component configurations.

3. In the “Operation” field, select Sign Fields.

4. Insert the following specifications in the indicated fields:

  • Sign Fields: parameter

  • Hash Algorithm: SHA256WithRSA

5. Keep the options “Hash in Hexadecimal” and “Fail On Error” activated.

6. Click on “Continue”.

7. Deploy the pipeline.

8. The pipeline will receive a payload like this one:

{"parameter": "Test for encryption"}


9. The result of the executed test will appear as shown below:

{ 
  "parameter": "....032281762E01B6C50C1DE825A2FD5A177CCFD5C1DB54E88ADD188A0B80311E672EDE5F8B......"
 }

Operation SIGN PAYLOAD

1. In your components palette, select Digital Signature.

2. Open the component configurations.

3. In the “Operation” field, select Sign Payload.

4. Insert the following specifications in the indicated fields:

  • Payload: [{ \"result\": \"{{ message.$.parameter }}\"}]

  • Hash Algorithm: SHA256WithRSA

5. Keep the options “Hash in Hexadecimal” and “Fail On Error” activated.

6. Click on "Confirm".

7. Deploy the pipeline.

8. The result of the executed test will appear as shown below:

{ 
  "result": "....032281762E01B6C50C1DE825A2FD5A177CCFD5C1DB54E88ADD188A0B80311E672EDE5F8B......" 
} 

Operation VERIFY

1. In your components palette, select Digital Signature.

2. Open the component configurations.

3. In the “Operation” field, select Verify.

4. Insert the following specifications in the indicated fields:

  • Sign Fields: {{ message.$.signed }}

  • Parameter: {{ message.$.rawData }}

  • Hash Algorithm: SHA256WithRSA

  • Public Key Algorithm: RSA

5. Keep the options “Hash in Hexadecimal” and “Fail On Error” activated.

6. Click on "Confirm".

7. Deploy the pipeline.

8. The pipeline will receive a payload like this one:

{
  "rawData": "Test for encryption",
  "signed": "...032281762E01B6C50C1DE825A2FD5A177CCFD5C1DB54E...."
}


9. The result of the executed test will appear as shown below:

{
  "success": true 
}

Did this answer your question?