PEARS - Python Encryption AES RSA SHA


PEARS is a standalone file encryption and key exchange application -

I completed development of PEARS v2.0 July 1, 2014.

Bugs, questions, suggestions please contact me by my email listed on the FAQ page.

User Interface

Linux (Ubuntu 12.04)


Mac (OS-X)


Windows (7)

  1. PEARS is a Python script and requires no installation, however Python 2.7 must be installed on your machine. Check your installed Python version by entering python -V at the command prompt. Python can be found at
  2. Download and unzip the PEARS source folder to your home directory -
Creating Your Public - Secret Key Pair
  1. Launch PEARS by double clicking on the file
  2. Enter an identifier for your public-secret key pair and a password. The identifier becomes part of the file name and the password is used to encrypt the secret key.

  3. Select "Create Keys". Time is required to generate these keys. During this process PEARS is generating large (1024 bit) random prime numbers and progress cannot be measured.
  4. A key pair is created in the folder mykeys.
    • The key pair file names are composed of a date-time stamp followed by the ID.
    • The extension .pkey denotes the public portion of the key. The public key can be shared in the open (email, cloud etc.) and is required to encrypt a file.
    • The extension .skey denotes the secret portion of the key. The secret key is AES encrypted with the password entered above. The public key should not be shared and is required to decrypt a file.
    • If the public-secret key password is lost the keys become useless.
    • The user may generate multiple key pairs.

Encrypting a File
  1. Select a public key and "File for Encryption".
    • Select "My Public Key" if you wish to encrypt a file that only you can decrypt.
    • Select "Recipient Public Key" if you wish to encrypt a file that only the Recipient can decrypt

    In this example Bob encrypts a file for Alice using her public key. Alice sent her public key to Bob, in the open, and Bob saved the key to the folder publickeys.

  2. Select "Encrypt File". Encryption will begin and progress will be displayed.
    • AES encryption can be time consuming depending on the file size and CPU.
    • The file used in this example was encrypted on an AMD Athlon 64 X2 Dual Core Processor 4000+. The encryption speed was 1949 bytes/sec.
    • System memory has minimal impact encryption speed unless swap is in use.

  3. Encryption creates two files:
    • The encrypted source file denoted by the extension .aes that is the same size as the source file.
    • The AES key denoted by the extension .aes_key. This key is used to decrypt the encrypted source file and has been encrypted with the Recipient's public key.
    • Both files can be sent in the open, together or separately, to the Recipient.

Decrypting a File
  1. Select "My Public Key" and "File for Decryption".

    • By selecting your public key, PEARS associates that public key with the corresponding secret key.
    • The secret key is used to decrypt the AES Key. The AES key is used to decrypt the file.
    • If the wrong public key is selected, PEARS will prompt you for the correct key.
    • By selecting the file to decrypt, PEARS associates that file with its corresponding AES key.

    In this example Alice received the encrypted file and AES key from Bob

  2. Enter the password used to create your public key and select "Decrypt File". In this example Alice enter the password used to create the public key used by Bob to encrypt the source file.

  3. Decrypted files are placed in the folder decrypted_files.