Perlshop 4 - Data Encryption

Contents


Overview

Perlshop data encryption applies to the customer data files generated by Perlshop 4. If data encryption is enabled, these files will be stored on your web server in an encrypted form. These data files can later be decrypted for your use by Perlshop Office or some other software package that is capable of data decryption.

In order to use Perlshop data encryption, your web server will require the Crypt::CBC library module and at least one Perl data encryption module.


Selecting a Perl Cryptography Module

The following Perl cipher modules are supported:

The Crypt::CBC module and one of these encryption modules must be present before you can use Perlshop data encryption.


Configuring Your Data Encryption Settings

Data encryption in Perlshop 4 is defined by two control variables in your ps.cfg file:

The Encryption Mode Definition Table

The %encryption_table structure in your ps.cfg file defines one or more encryption mechanisms for your customer data files. Each entry in this table defines one encryption mode. The $encryption_index variable defines which mode is currently active. This is the mode that will be applied to the customer data files generated for each order.

Each table entry has fields that MUST NOT be changed once that entry has been used to encrypt customer data files:

%encryption_table =
(
	# Encode using Cipher Block Chaining and the Blowfish algorithm.
	'ENC1' =>	
	{
		'cipher' => 'Crypt::Blowfish',
		'key'    => 'A unique passphrase goes here'
	},

	# Encode using Cipher Block Chaining and the Triple DES algorithm.
	'ENC2' =>	
	{
		'cipher' => 'Crypt::DES_EDE3',
		'key'    => 'A unique passphrase goes here'
	},

	# Encode using Cipher Block Chaining and the NULL algorithm.
	'ENC3' =>	
	{
		'cipher' => 'Crypt::NULL',
		'key'    => 'A unique passphrase goes here'
	}
);


Testing Your Data Encryption Configuration

The Perlshop 4 package comes with a utility program called ps_encryption_util.cgi. This program is intended for use while setting up your Perlshop data encryption.

Installing the Encryption Utility Program

  1. Make sure the $encryption_index variable in your ps.cfg file is undefined:
    $encryption_index = '';
  2. Place the ps_encryption_util.cgi file in the same directory as your copy of the perlshop.cgi file.

  3. Give the ps_encryption_util.cgi file the same permissions as your copy of the perlshop.cgi file.

Using the Encryption Utility Program

  1. Execute the ps_encryption_util.cgi program through your web browser.
    Example: http://www.yourdomain.com/cgi-bin/ps_encryption_util.cgi

  2. Examine the program output for errors. Once all of your defined encryption modes are working, continue to the next step.


Enabling Your Data Encryption Configuration

  1. Set the $encryption_index variable in your ps.cfg file to one of to the name of one of your encryption modes.
    Example:
    $encryption_index = 'ENC1';
  2. Place a test order. Examine the customer data files for that order. Confirm that the contents of the data files are encrypted (the contents will be complete gibberish to the eye).

  3. Retrieve the test order using Perlshop Office (or your selected retrieval program) and confirm that the order information is correct.