An open API service indexing awesome lists of open source software.

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

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
```