PHP Classes

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

Recommend this page to a friend!
  Info   Documentation   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 86 All time: 10,018 This week: 206Up
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
Number 3
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
Picture of Scott Arciszewski
  Performance   Level  
Name: Scott Arciszewski <contact>
Classes: 37 packages by
Country: United States United States
Age: ???
All time rank: 1173170 in United States United States
Week rank: 22 Up3 in United States United States Up
Innovation award
Innovation award
Nominee: 28x

Winner: 1x

Documentation

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 (13)  
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 (13)  /  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 (13)  /  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

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:86
This week:0
All time:10,018
This week:206Up