PGP Encrypt

Overview

Pretty Good Privacy (PGP) is an encryption program that provides cryptographic privacy and authentication for data communication. PGP is popularly used to digitally sign, encrypt or decrypt email messages or files being transferred over the Internet.

Warning: Snap History

The default security in the JRE limits the key length for encryption keys. For stronger encryption keys, you would need to manually install the Java Cryptographic Extension JARs on your JCC nodes.



Behavior changes

Starting from version 433patches21482, this Snap does not support encryption with an expired key. To ensure continued support for encryption, we highly recommend that you renew your PGP key before it expires or extend the expiration date of your PGP key.

Account

This Snap uses account references created on the Accounts page of SnapLogic Manager called the PGP Public Key Account that stores the public key used for encryption. See Configuring Binary accounts for information on setting up this type of account.

When setting up the account, enter your public PGP key. The credentials setup will automatically encrypt the message.

For signed encryption, this Snap uses account references created on the Accounts page of SnapLogic Manager called the PGP Private Key Account that stores the public and private key used for signed encryption. See Configuring Binary accounts for information on setting up this type of account.

When setting up the PGP Private Key account, enter your public and private PGP keys. The credentials setup will automatically encrypt and sign the message.

Snap views

View Description Examples of upstream and downstream Snaps
Input This Snap has exactly one binary input view. The data that has to be encrypted is passed through this view.

Stream of PGP decrypted data.

Output This Snap has exactly one binary output view. The data encrypted is passed through this view as output.

Stream of PGP encrypted data.

Error

Error handling is a generic way to handle errors without losing data or failing the Snap execution. You can handle the errors that the Snap might encounter when running the pipeline by choosing one of the following options from the When errors occur list under the Views tab. The available options are:

  • Stop Pipeline Execution Stops the current pipeline execution when an error occurs.
  • Discard Error Data and Continue Ignores the error, discards that record, and continues with the remaining records.
  • Route Error Data to Error View Routes the error data to an error view without stopping the Snap execution.

Learn more about Error handling in Pipelines.

Snap settings

Legend:
  • Expression icon (): Allows using pipeline parameters to set field values dynamically (if enabled). SnapLogic Expressions are not supported. If disabled, you can provide a static value.
  • SnapGPT (): Generates SnapLogic Expressions based on natural language using SnapGPT. Learn more.
  • Suggestion icon (): Populates a list of values dynamically based on your Snap configuration. You can select only one attribute at a time using the icon. Type into the field if it supports a comma-separated list of values.
  • Upload : Uploads files. Learn more.
Learn more about the icons in the Snap settings dialog.
Field / Field set Type Description
Label String

Required. Specify a unique name for the Snap. Modify this to be more appropriate, especially if more than one of the same Snaps is in the pipeline.

Default value: PGP Encrypt

Example: PGP Encrypt
Symmetric Key Algorithm String/Expression/ Suggestion

Select or enter the symmetric key algorithm that you want to use to encrypt the input file.

Warning:

This field is case-sensitive, and must be filled exactly as shown in the suggestible drop-down list options.

The algorithms available for this field are as follows:
  • IDEA: International Data Encryption Algorithm.
  • TRIPLE_DES: Triple Data Encryption Standard (TDES or Triple DES)
  • CAST5 CAST5: (128 bit key, as per RFC 2144)
  • BLOWFISH Blowfish: (128 bit key, 16 rounds)
  • DES Data Encryption: Standard
  • AES_128: AES with 128-bit key
  • AES_192: AES with 192-bit key
  • AES_256: AES with 256-bit key
  • TWOFISH: Twofish
  • CAMELLIA_128: Camellia with 128-bit key
  • CAMELLIA_192: Camellia with 192-bit key
  • CAMELLIA_256: Camellia with 192-bit key

Default value: CAST5

Example: AES_256

Encrypted Filename String/Expression For most use cases, this property may be left empty. A temporary file is used during the encryption and deleted by the Snap when it is done. If this property is empty, the Snap automatically generates a temporary filename.
  • In some use cases, this temporary filename, which is included in the encrypted data, is used by a PGP client application. If you enter this property, please make sure the filename be unique among the multiple instances of the same Snap. Otherwise, the Snap may fail with errors in creating or deleting it.
  • If entered, this property should be a filename only, neither an absolute nor an indirect file path. The directory for the temporary file is determined by the the Snap. If the Snap finds a URL separator ("/") in the filename, it throws an error and won't continue.
  • If this property is not empty or evaluated to a non-empty string, the Snap produces an additional entry in the output binary header document with the key “encrypted-filename”. It is suggested that, if File Writer Snap is connected to this Snap’s output view, the “File name” expression property of the File Writer Snap may be “$[‘encrypted-filename’]” so that the name of the written file can be the same as the Encrypted filename.

Example: sample.tmp

Default value: None.

Sign file Checkbox Sign encrypted file. Enabling this check box requires a Private Key Account.

Default status: Deselected

Encryption key ID String/Expression/ Suggestion Specify the key ID (long format) to encrypt the incoming binary document.

Default value: None.

Example: 12B0E3D4DD5678B9

Snap execution Dropdown list
Choose one of the three modes in which the Snap executes. Available options are:
  • Validate & Execute: Performs limited execution of the Snap and generates a data preview during pipeline validation. Subsequently, performs full execution of the Snap (unlimited records) during pipeline runtime.
  • Execute only: Performs full execution of the Snap during pipeline execution without generating preview data.
  • Disabled: Disables the Snap and all Snaps that are downstream from it.

Default value: Execute only

Example: Validate & Execute

Examples