PHP Classes
elePHPant
Icontem

PHP Blake Chain: Create and verify chained blocks of hashed data

Recommend this page to a friend!
  Info   View files Documentation   View files View files (13)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2019-08-11 (1 month ago) RSS 2.0 feedNot yet rated by the usersTotal: 62 This week: 4All time: 9,513 This week: 75Up
Version License PHP version Categories
blakechain 1.0.0MIT/X Consortium ...5PHP 5, Cryptography
Description Author

This package can be used to create and verify chained blocks of hashed data.

It uses the BLAKE2b approach to create a chain of blocks of data so the hash of a block of data contains the block data itself and a hash of the previous block in the chain.

The package can also verify the integrity of the chain but checking the hashes of all blocks that are linked in the chain.

Innovation Award
PHP Programming Innovation award nominee
August 2019
Nominee
Vote
Block chains have been made popular in the latest years as a means to send payments using virtual currencies such as Bitcoin.

This package implements a similar concept in PHP using blocks of chained data and hashes of the data to allow the verification of the authenticity of the chained block data.

Manuel Lemos
  Performance   Level  
Name: Scott Arciszewski <contact>
Classes: 22 packages by
Country: United States United States
Age: ???
All time rank: 1483202 in United States United States
Week rank: 17 Up2 in United States United States Up
Innovation award
Innovation award
Nominee: 18x

Winner: 1x

 

Details

Blakechain

Build Status Latest Stable Version Latest Unstable Version License

Blakechain is a simple hash-chain data structure based on the BLAKE2b hash function.

Includes:

  • The Blakechain implementation, which chains together Node objects
  • A runtime Verifier class that validates the self-consistency of an entire chain (or a subset of an entire chain)

Blakechain is not a blockchain. You probably don't need a blockchain.

Blakechain provides the data structure used in Chronicle.

How Blakechain Works

The hash of each message is a keyed BLAKE2b hash, where the key of this message is the hash of the previous message.

Recursively:

$hash[$n] = sodium_crypto_generichash(
    $data[$n],
    $hash[$n - 1]
);
  Files folder image Files  
File Role Description
Files folder imagesrc (3 files)
Files folder imagetests (3 files)
Accessible without login Plain text file .travis.yml Data Auxiliary data
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file phpunit-autoload.php Aux. Auxiliary script
Accessible without login Plain text file phpunit.xml.dist Data Auxiliary data
Accessible without login Plain text file psalm.xml Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  src  
File Role Description
  Accessible without login Plain text file Blakechain.php Class Class source
  Accessible without login Plain text file Node.php Class Class source
  Accessible without login Plain text file Verifier.php Class Class source

  Files folder image Files  /  tests  
File Role Description
  Accessible without login Plain text file BlakechainTest.php Class Class source
  Accessible without login Plain text file NodeTest.php Class Class source
  Accessible without login Plain text file VerifierTest.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:62
This week:4
All time:9,513
This week:75Up