Return to Homepage ...
Domain Name Search
Need Live Assistance? Click Here ...

Site Secured by Thawte
 Home > Support Center > PGP - Pretty Good Protection
Company Information Contact Us Support Documentation Order Hosting Now ... Click Here!

PGP "Pretty Good Protection"
PHP "pretty good protection" is a way to encrypt data sent from a form on your website to your local computer, where the data must be opened with a special key to be readable. This provides for a very good and easy to use system to transmit information that you otherwise would not want to be seen by prying eyes, such as credit card numbers, social security numbers, etc.

Following the basics below, you can quickly create a PGP entcrypted form from your website and have this data securely sent to your personal mail for key-based opening.
Setting Up a PGP Key on your Server

First thing you need to do is to set up your key pair.

    Setting Up a PGP Public Key on our Server
    'uid', 'key userid', and 'keyname' are one in the same.

    If you do not have, you can download it at

    1. Create a PGP Key Pair on your hard drive. 
    2. Copy the public key that was created to a text file.
    3. Upload the public key text file to your home directory on the server.
    4. Add the public key to your keyring on the server.
  • SSH command line: /usr/local/bin/pgpk -a 


Make the public key completely trusted.

  • SSH command line: /usr/local/bin/pgpk -e keyname
  • Answer '4' for completely trusted all the time

    Run a test encryption for the key from the prompt.

  • Create a test text file
  • SSH command line:
    /usr/local/bin/pgpe -r key_ userid -o name_of_output_file -a name_of_text_file
  • Answer 'Y' when asked if trusted

    After you are completed, you need to contact technical support to set the permissions on your public key to be used from the web
Pgpmail Script

Now You Need to Set Up Your Form to Use the ''

The form action line should be

<FORM ACTION = "/cgi-sys/" METHOD = "POST">

The '' will do all the programming work for you. You alter the behavior of '' by using hidden fields in your form.

There are three form fields that you must have in your form for PGPMail to work correctly. This is the 'recipient', 'username', and 'keyname' fields.

Field: recipient

Description: This form field allows you to specify to whom you wish for your form results to be mailed. Most likely you will want to configure this option as a hidden form field with a value equal to that of your e-mail address.


<input type=hidden name="recipient" value="">

Field: username

Description: This form field allows you to specify your username in the system. This allows PGPMail to look for the configuration files to encrypt the mail to be sent to you.


<input type=hidden name="username" value="your_username">

Field: keyname

Description: This form field allows you to specify the name of your public key. This will be the public key that PGPMail uses to encrypt your mail. You must possess the private key in order to decrypt the email that is sent.


<input type=hidden name="keyname" value="public_keyname">

Important Note:
Please make sure that the form entry fields that are required to be encrypted in the final submission are enclosed with the <pgp> sample data </pgp> tags.

. Copyright © 1997, Inc. | All Rights Reserved

Secured by Thawte