Skip to content

a merkle tree implementation in Go with a fixed hashing scheme

License

Notifications You must be signed in to change notification settings

vu3rdd/go-merkletree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

a merkle tree implementation in Go with a fixed hashing scheme

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages