paragonie/blakechain

Hash chain using BLAKE2b

Maintainers

Package info

github.com/paragonie/blakechain

pkg:composer/paragonie/blakechain

Statistics

Installs: 2 867

Dependents: 3

Suggesters: 0

Stars: 24

Open Issues: 0

v1.1.2 2024-05-08 17:34 UTC

This package is auto-updated.

Last update: 2026-02-08 21:24:53 UTC


README

Build Status Static Analysis Latest Stable Version Latest Unstable Version License Downloads

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]
);