First Look at Encryption and Decryption with pfPgpEncryptor
First Look at Encryption and Decryption with pfPgpEncryptor
This tutorial gives you a tour of the pfPgpEncryptor application and how it works.
First up is an example where you encrypt a string and then verify the encryption by successfully decrypting it.
Make sure pfPgpEncryptor is started and you are at the application's main form. This is the form that displays when the application first starts.
See Overview for a description of the fields and buttons on the main form.
In the Encrypt portion of the main form:
- Click string to identify this as a string encryption.
- Make sure using Key File is selected.
- Click the Path Lookup Button and select the user1.asc file in the Keys folder.
- Keys folder with test key files should be in your Documents folder under PFApps\pfPgpEncryptor folder.
- Select CAST5 from the Cypher drop-down.
- Select SHA1 from the Hash drop down.
- Select ZIP from the Compression drop-down.
- Type the following text in the String to encrypt field:
- This is the text string to be encrypted.
- Click the Source Button to show an enlarged text box containing the string you just input.
- Add a new line to the string to be encrypted by moving cursor to end of line and pressing Enter key.
- Type the following on the second line:
This is the second line of text to be encrypted - Click the OK button.
- Leave Integrity Check unchecked.
- Make sure Ascii Armored is checked.
- Click the Encrypt button.
- Encrypted text will appear in the Encrypted Output text box.
- A message that says the encryption succeeded, gives the time taken to encrypt and displays the number of output bytes generated will be shown in the Encryption Status Message Area at the bottom of the Encryption Definition Form.
- Click the Output Button to display the encrypted text in an enlarged text box.
- Click OK to return to the main form.
In the Decrypt portion of the main form:
- Click the Copy Key From Above button.
- The following fields will be filled in on the Decryption Definition Form:
- Decrypt String
- Using Key File
- Path to Key File
- String to Decrypt
- Type following for the Private Key Password:
- password
- If you get an error message saying the password is incorrect, try typing
12345678
for the password. - Click the Decrypt button.
- The decrypted text appears in the Decrypted string field.
- Click the Output Button to display the original unencrypted text in an enlarged text box.
- Click OK to return to the main form.
In the Encrypt portion of the main form, you will now save the encryption definition to a file:
- At the bottom of the Encryption Definition Form, click the Save button.
- Enter test1_encrypt.xml for the filename.
- Click Save.
- Message saying the encryption definition was saved to a file will appear in the Encryption Status Message Area.
- Click the New button at the bottom of the Encryption Definition Form.
- The encryption definition information will be erased and the drop-down selection boxes reset to their defaults.
- Click the Load button at the bottom of the Encryption Definition Form.
- Select the test1_encrypts.xml file from the File Open Dialog that pops up and click Open.
- The encryption definition information has been reloaded to the Encryption Definition Form.
- A message saying the encryption definition was retrieved from a file will be displayed in the Encryption Status Message Area.
- You can now rerun the encryption.
In the Decrypt portion of the main form, you will now save the decryption definition to a file:
- At the bottom of the Decryption Definition Form, click the Save button.
- Enter test1_decrypt.xml for the filename.
- Click Save.
- Message saying the decryption definition was saved to a file will appear in the Decryption Status Message Area.
- Click the New button at the bottom of the Decryption Definition Form.
- The decryption definition information will be erased and the drop-down selection boxes reset to their defaults.
- Click the Load button at the bottom of the Decryption Definition Form.
- Select the test1_decrypt.xml file from the File Open Dialog that pops up and click Open.
- The decryption definition information has been reloaded to the Decryption Definition Form.
- A message saying the decryption definition was retrieved from a file will be displayed in the Decryption Status Message Area.
- You can now rerun the decryption.