2017 © Pedro Peláez
 

library chacha20

Pure PHP implementation of the ChaCha20 encryption algorithm.

image

leigh/chacha20

Pure PHP implementation of the ChaCha20 encryption algorithm.

  • Thursday, March 10, 2016
  • by lt
  • Repository
  • 3 Watchers
  • 12 Stars
  • 44 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 4 Versions
  • 13 % Grown

The README.md

ChaCha20 in PHP

This library contains a pure PHP implementation of the ChaCha20 encryption algorithm., (*1)

The library has been written to be high performance (relative to PHP), not pretty. It obviously doesn't perform anywhere close to a native implementation., (*2)

Usage:

Remember that a nonce must not be used more than once for a particular key, (*3)

$chacha20 = new ChaCha20\Cipher;
$encCtx = $chacha20->init($key, $nonce);
$decCtx = $chacha20->init($key, $nonce);

$cipherText = $chacha20->encrypt($encCtx, $message);
$plainText = $chacha20->decrypt($decCtx, $cipherText);

The Context object maintains the current state of the algorithm, so that it can be used in a streaming scenario. Therefore an application performing simultaneous encryption and decryption will need to main two contexts., (*4)

The decrypt method is an alias of the encrypt method, and exists only to indicate intent., (*5)

Seek operations can be performed on the keystream by calling the setCounter method, where the count is in 64-byte blocks., (*6)

The Versions

10/03 2016

dev-master

9999999-dev https://github.com/lt/PHP-ChaCha20

Pure PHP implementation of the ChaCha20 encryption algorithm.

  Sources   Download

MIT

The Requires

  • php-64bit >=7.0

 

The Development Requires

security encryption cipher stream

14/01 2016

0.2.0

0.2.0.0 https://github.com/lt/PHP-ChaCha20

Pure PHP implementation of the ChaCha20 encryption algorithm.

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

security encryption cipher stream

21/12 2015

0.1.1

0.1.1.0 https://github.com/lt/PHP-ChaCha20

Pure PHP implementation of the ChaCha20 encryption algorithm.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

security encryption cipher stream

14/12 2015

0.1.0

0.1.0.0 https://github.com/lt/PHP-ChaCha20

Pure PHP implementations of the ChaCha20 encryption algorithm.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

security encryption cipher chacha