https://github.com/paragonie/blakechain
Hash chains built with BLAKE2b
https://github.com/paragonie/blakechain
Last synced: 6 months ago
JSON representation
Hash chains built with BLAKE2b
- Host: GitHub
- URL: https://github.com/paragonie/blakechain
- Owner: paragonie
- License: mit
- Created: 2017-06-23T21:20:11.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-05-08T17:34:12.000Z (over 1 year ago)
- Last Synced: 2025-07-19T19:25:02.715Z (6 months ago)
- Language: PHP
- Size: 25.4 KB
- Stars: 22
- Watchers: 6
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Blakechain
[](https://github.com/paragonie/blakechain/actions)
[](https://github.com/paragonie/blakechain/actions)
[](https://packagist.org/packages/paragonie/blakechain)
[](https://packagist.org/packages/paragonie/blakechain)
[](https://packagist.org/packages/paragonie/blakechain)
[](https://packagist.org/packages/paragonie/blakechain)
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](https://tonyarcieri.com/on-the-dangers-of-a-blockchain-monoculture).
Blakechain provides the data structure used in [Chronicle](https://github.com/paragonie/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]
);