TweetNaCl

Use TweetNaCl to encrypt or decrypt data.

Overview

This node uses the TweetNaCl library to perform cryptographic operations, specifically to verify a detached signature of a message using a public key. It is useful in scenarios where you need to confirm the authenticity and integrity of a message by checking its signature without altering the original message. For example, it can be used in secure communications, digital document verification, or any system requiring message authentication.

Use Case Examples

  1. Verifying a signed message received from a third party to ensure it has not been tampered with.
  2. Authenticating data integrity in a blockchain or secure messaging application.

Properties

Name Meaning
Message The message string that needs to be verified against the signature.
Signature The hexadecimal string of the detached signature to verify the message with.
Public Key The hexadecimal string of the public key used to verify the signature.

Output

JSON

  • isVerified - Boolean indicating whether the signature is valid for the given message and public key.

Dependencies

  • tweetnacl library for cryptographic operations

Troubleshooting

  • If the signature verification fails, ensure that the message, signature, and public key are correctly formatted and correspond to each other.
  • Common error: 'Failed to execute TweetNaCl.' may occur if input data is invalid or improperly encoded. Verify inputs are in the correct format (message as string, signature and public key as hex strings).
  • Enable 'Continue On Fail' option to handle errors gracefully and continue processing other items.

Discussion