CryptoPPP by Horst Nogajski

An implementation of Steve Gibson's Perfect Paper Passwords (PPP) system.

CryptoPPP Library Module For Processwire

Implements Steve Gibson's PPP One-Time-Pad System along with some additional helpers.

Pre-requisites


Requires OpenSSL and bcmaths PHP extension to be installed.

Version 3.1.0 changed from the, now deprecated, mcrypt library over to using OpenSSL internally.

Generating A Single Key


Simply use $key = CryptoPPP::genKeys(); or $key = CryptoPPP::genKeys(1);

Generating Multiple Keys.


If you want 2 keys you would do $keys = CryptoPPP::genKeys(2); to get them in the $keys array or do list($k1, $k2) = CryptoPPP::genKeys(2); to assign them to named variables.

Now that you have at least one key, you can use it as the basis of generating tokens or token streams.

Converting A Key Into A Token (a strings of characters).


The simplest way to convert a key into a token of a given length and using a given output alphabet is to call the CryptoPPP::keyToToken static method. If no length or alphabet is defined a 12 character token using the default alphabet (!#%+23456789:=?@ABCDEFGHJKLMNPRSTUVWXYZabcdefghijkmnopqrstuvwxyz) will be created from the key.

To create tokens with a format such as 'X7gM-jA9v-KtWs' where the length of the 'blocks' and the 'glue' between them are customisable you can use the related helper method CryptoPPP::keyToTokenBlocks().

Generating A Token Sequence (a One-Time-Pad) From A Key + Sequence Number.


If your application can associate an incrementing sequence number with a key, then you can use the PPP system to generate a One-Time-Pad (a stream of tokens.) This is simply done by passing the key, the sequence position, output alphabet and token length to CryptoPPP::getCode(). Once your application finishes using that token from the token stream, simply increment the sequence number ready for the next usage.

Install and use modules at your own risk. Always have a site and database backup before installing new modules.

Twitter updates

  • Today a new version of FormBuilder has been released in the FormBuilder support board (our 50th version) and it has a lot of interesting new features, which we’ll take a closer look at in this post— More
    11 June 2021
  • ProcessWire 3.0.179 adds great new admin theme customization tools that put you in full control over the Uikit admin styles— More
    28 May 2021
  • ProcessWire updates for week of 21 May 2021— More
    22 May 2021

Latest news

  • ProcessWire Weekly #370
    In the 370th issue of ProcessWire Weekly we're going to check out the latest version of the commercial FormBuilder module, introduce a couple of brand new third party modules, and more. Read on!
    Weekly.pw / 12 June 2021
  • ProcessWire FormBuilder v50 updates
    Today a new version of FormBuilder has been released in the FormBuilder support board (our 50th version) and it has a lot of interesting new features, which we'll take a closer look at in this post.
    Blog / 11 June 2021
  • Subscribe to weekly ProcessWire news

“We chose ProcessWire because of its excellent architecture, modular extensibility and the internal API. The CMS offers the necessary flexibility and performance for such a complex website like superbude.de. ProcessWire offers options that are only available for larger systems, such as Drupal, and allows a much slimmer development process.” —xport communication GmbH