From ProgClub
Jump to: navigation, search

Pccipher is the ProgClub encryption software. That's the software that allows you to encrypt and decrypt data in PHP and Javascript. It's compatible with 32-bit and 64-bit implementations of PHP, and should work in any Javascript capable web-browser. Pccipher is listed on computer security expert Bruce Schneier's web-site. For other projects see Projects.


Project status

Released! But there's still stuff TODO.


Members who have contributed to this project. Newest on top.

All contributors have agreed to the terms of the Contributor License Agreement. This excludes any upstream contributors who tend to have different administrative frameworks.

Upstream contributors for the phpjs library used by pccipher/js.

Upstream contributors for the jQuery library used by pccipher/js.

Upstream contributors for the QUnit library used by pccipher/js.

Upstream contributors for the SimpleTest library used by pccipher/php.


Copyright 2011, Contributors. Dual licensed under the MIT or GPL licenses.

Pccipher uses the phpjs library which is dual licensed under the MIT or GPL licenses.

Pccipher uses the jQuery library which is dual licensed under the MIT or GPL licenses.

Pccipher uses the QUnit library which is dual licensed under the MIT or GPL licenses.

Pccipher uses the SimpleTest library which is licensed under the LGPL.


You can download the latest version of pccipher from the following URL:


You can look in the download directory for specific releases.

Source code

The repository can be browsed online:


The code for pccipher is publicly available from svn:


Or privately available for read-write access:



Blowfish related information

phpjs related information

jQuery related information

QUnit related information

SimpleTest related information

Javascript encryption related information

Before using the pccipher javascript encryption library, it would behove you to read this article: Javascript Cryptography Considered Harmful. As it points out, security through encryption in Javascript is pretty much impossible. That said, there are some benefits to using a Javascript encryption scheme, such as protecting user data even if the user saves a copy of the page as a HTML file on their hard-drive, and there is *some* value in using the Javascript encryption library as an obfuscator that will stop the less determined intruder. There was some more discussion about this on the ProgClub list that you might be interested in checking out or participating in.



Things to do, in rough order of priority:


Stuff that's done. Latest stuff on top.


Javascript tests

You can run the Javascript tests for the latest stable release at:


And the latest development snapshot (i.e. trunk) at:


PHP tests

Note: the PHP testing links have been removed, because they place the server under load, and at the moment ProgClub is being slashdotted by http://programming.reddit.com/ and we can't have everyone clicking on them!

Update: We're not being slashdotted anymore, but I think I'll leave the links out anyway. If you're clever you'll be able to find them for yourself. Better to run the tests on your own system.

OK, OK. Here are the tests:


Notes for implementers

If you are interested in incorporating the ProgClub pccipher into your project, here's what you need to know:

Javascript implementation

An example Javascript implementation:

 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
   <script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
   <script type="text/javascript" src="http://www.progclub.org/pccipher/js/lib/phpjs/phpjs.js"></script>
   <script type="text/javascript" src="http://www.progclub.org/pccipher/js/src/pccipher.js"></script>

   <script type="text/javascript">

   var key = "my key (*your* key should be longer and more random)";
   var text = "my text";
   var data = pccipher_encrypt( text, key );
   text = pccipher_decrypt( data, key );

   alert( text );

   <h1>Pccipher example</h1>

PHP implementation

You probably want to setup an svn:externals to:


Then you can use the PHP library with something like this:


 error_reporting( E_ALL );
 ini_set( 'display_errors', 'On' );

 require_once( dirname( __FILE__ ) . '/path/to/pccipher/php/src/pccipher_auto.php' );

 $key = "my key (which isn't half as randomly awesome as *your* key will be)";
 $text = "my text";
 $data = pccipher_encrypt( $text, $key );
 $text = pccipher_decrypt( $data, $key );

 echo "<p>" . $text . "</p>";

Personal tools
Mailing lists