https://github.com/vu3rdd/go-merkletree
a merkle tree implementation in Go with a fixed hashing scheme
https://github.com/vu3rdd/go-merkletree
cryptography go golang merkle-proof merkle-tree merkletree
Last synced: about 1 month ago
JSON representation
a merkle tree implementation in Go with a fixed hashing scheme
- Host: GitHub
- URL: https://github.com/vu3rdd/go-merkletree
- Owner: vu3rdd
- License: mit
- Created: 2022-12-15T13:05:33.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-12-15T13:51:22.000Z (over 3 years ago)
- Last Synced: 2025-12-26T20:58:02.537Z (6 months ago)
- Topics: cryptography, go, golang, merkle-proof, merkle-tree, merkletree
- Language: Go
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Introduction
Merkle Tree implementation in Go. Written mainly to learn about merkle
trees and not for production use. The hashing scheme is fixed (sha256).
# API
- Create a merkle tree:
```
NewMerkletree([]byte) -> *MerkleTree
```
- Create proof that a chunk exists in the tree. Given a chunk of data,
produces the list of sibling nodes.
```
MerkleTree.Proof([]byte) -> []*MerkleTree
```
- Verify that a chunk exists in the tree, given the proof.
```
MerkleTree.Verify(proof []*MerkleTree, chunk []byte) -> bool
```