Skip to content

Crypto#

Use the Crypto node to perform cryptographic operations in workflows.

Credentials

You can find authentication information for this node here.

Actions#

Node parameters#

This node can be used as an AI tool

This node can be used to enhance the capabilities of an AI agent. When used in this way, many parameters can be set automatically, or with information directed by AI - find out more in the AI tool parameters documentation.

Node parameters depend on the action you select.

The Hmac, Sign, Encrypt, and Decrypt actions need Crypto credentials. Each action uses the credential field it needs:

  • Hmac uses the Hmac Secret.
  • Sign uses the Private Key.
  • Encrypt and Decrypt use the Encryption Passphrase for symmetric mode, or the Encryption Public Key and Encryption Private Key for asymmetric mode.

Decrypt parameters#

  • Mode: Select the mode to use. This must match the mode used to encrypt the value. Choose from:
    • Symmetric (Passphrase): Decrypt with a passphrase using an authenticated cipher.
    • Asymmetric (RSA): Decrypt with an RSA private key.
  • Cipher: When you select Symmetric (Passphrase), choose the authenticated cipher to use. This must match the cipher used to encrypt the value. Choose from:
    • AES-256-GCM
    • AES-192-GCM
    • AES-128-GCM
    • ChaCha20-Poly1305
  • Value: Enter the base64 string produced by the Encrypt action.
  • Property Name: Enter the name of the property you want to write the decrypted value to.

Encrypt parameters#

  • Mode: Select the mode to use. Choose from:
    • Symmetric (Passphrase): Encrypt with a passphrase using an authenticated cipher.
    • Asymmetric (RSA): Encrypt with an RSA public key.
  • Cipher: When you select Symmetric (Passphrase), choose the authenticated cipher to use. You must select the same cipher when you decrypt the value. Choose from:
    • AES-256-GCM
    • AES-192-GCM
    • AES-128-GCM
    • ChaCha20-Poly1305
  • Value: Enter the value you want to encrypt.
  • Property Name: Enter the name of the property you want to write the encrypted value to. The node writes the result as a base64 string.

RSA payload size

Asymmetric (RSA) mode can only encrypt small payloads, around 190 bytes with a 2048-bit key. Use symmetric mode for larger data.

Generate parameters#

  • Property Name: Enter the name of the property to write the random string to.
  • Type: Select the encoding type to use to generate the string. Choose from:
    • ASCII
    • BASE64
    • HEX
    • UUID
  • Length: When you select ASCII, BASE64, or HEX, enter the length of the generated string. The default is 32.

Hash parameters#

  • Type: Select the hash type to use. Choose from:
    • MD5
    • SHA256
    • SHA3-256
    • SHA3-384
    • SHA3-512
    • SHA384
    • SHA512
  • Binary File: Turn this parameter on if the data you want to hash is from a binary file.
    • Value: If you turn off Binary File, enter the value you want to hash.
    • Binary Property Name: If you turn on Binary File, enter the name of the binary property that contains the data you want to hash.
  • Property Name: Enter the name of the property you want to write the hash to.
  • Encoding: Select the encoding type to use. Choose from:
    • BASE64
    • HEX

Hmac parameters#

  • Binary File: Turn this parameter on if the data you want to create an Hmac for is from a binary file.
    • Value: If you turn off Binary File, enter the value you want to create an Hmac for.
    • Binary Property Name: If you turn on Binary File, enter the name of the binary property that contains the data you want to create an Hmac for.
  • Type: Select the hash type to use. Choose from:
    • MD5
    • SHA256
    • SHA3-256
    • SHA3-384
    • SHA3-512
    • SHA384
    • SHA512
  • Property Name: Enter the name of the property you want to write the Hmac to.
  • Encoding: Select the encoding type to use. Choose from:
    • BASE64
    • HEX

This action uses the Hmac Secret from your Crypto credentials.

Sign parameters#

  • Value: Enter the value you want to sign.
  • Property Name: Enter the name of the property you want to write the signed value to.
  • Algorithm Name or ID: Choose an algorithm name from the list or specify an ID using an expression.
  • Encoding: Select the encoding type to use. Choose from:
    • BASE64
    • HEX

This action uses the Private Key from your Crypto credentials.

Templates and examples#

Conversational Interviews with AI Agents and n8n Forms

by Jimleuk

View template details
Analyze Crypto Markets with the AI-Powered CoinMarketCap Data Analyst

by Don Jayamaha Jr

View template details
Send a ChatGPT email reply and save responses to Google Sheets

by n8n Team

View template details
Browse Crypto integration templates, or search all templates
This page was