Skip to content


Subversion checkout URL

You can clone with
Download ZIP
PKI key ring for your browser forms
JavaScript PHP Shell
Failed to load latest commit information.
libs Wed Jun 13 07:20:09 MDT 2012 - Added new X-Token header value if exis…
screenshots Fri Jun 1 08:36:57 MDT 2012 - Added screenshot
tests Thu May 17 14:21:01 MDT 2012 - Comment on fixing sync issues with key… Thu May 17 13:36:50 MDT 2012 - Moved include examples around to ensur…
LICENSE Tue Apr 2 08:19:41 MDT 2013 - Updated readme to include screenshot
example.html Fri Jun 1 08:36:57 MDT 2012 - Added screenshot

jQuery plugin to impliment RSA public key encryption

Utilizes the pidCrypt libraries for client public key encryption while the associated PHP class uses OpenSSL to generate the necessary private/public key pairs used by this plug-in

Fork me @



  • Multiple key support
  • AES-256-CBC encryption of all keyring data
  • Modal window dialog for selection of appropriate keyring entry when multiple keys exist
  • HTML5 localStorage support
  • HTML5 sessionStorage support
  • Cookie support
  • Debugging output


Here is an screenshot of an impelmentation bound to a form with multiple public keys forcing a modal window pop-up along with debugging output at the bottom showing the encrypted public keys stored within the HTML5 storage options.



  • appID: Optional CSRF token
  • storage: HTML5 localStorage, sessionStorage and cookies supported
  • callback: Optional function used once server recieves encrypted data
  • preCallback: Optional function to perform prior to form submission
  • errCallback: Optional function to perform on errors


Here are a few usage examples to get you started

Default usage using HTML5 localStorage


Default Using HTML5 sessionStorage


Default using cookies (requires the jQuery cookie plug-in)


Example of using the callback method to process server response

$('#form').pidCrypt({callback:function(){ console.log(this); }});

Example of using the preCallback method to load a function prior to form submission

$('#form').pidCrypt({preCallback:function(){ console.log(this); }});

Example of using the errCallback method to load a function on error

$('#form').pidCrypt({preCallback:function(){ console.log(this); }});

Example of enabling a custom CSRF token (sets the X-Alt-Referer header value)

$('#form').pidCrypt({appID:'<?php echo $_SESSION['csrf-token']; ?>'});

Author: Jason Gerfen License: GPL (see LICENSE)

Something went wrong with that request. Please try again.