package
0.0.0-20241102131135-b546fe3e7180
Repository: https://github.com/olegfomenko/crypto.git
Documentation: pkg.go.dev

# README

Treap-based dynamic Merkle tree

License: MIT

Proof of concept for dynamic Merkle tree. Treap as primary data structure used to achieve logarithmic inserting/removing.

Usage

package main

import (
	"math/rand"
	
	merkle "github.com/olegfomenko/crypto/dynamic-merkle"
)

func main() {
	tree := merkle.New()
	
	// Insert
	tree.Insert([]byte("hash"), rand.Uint64())
	
	// Merkle path
	path := tree.MerklePath([]byte("hash"))
	
	// Merkle Root
	root := tree.MerkleRoot()

	// Remove
	tree.Remove([]byte("hash"))
}

Related docs

Treap description: "https://en.wikipedia.org/wiki/Treap"

Merkle tree description: "https://en.wikipedia.org/wiki/Merkle_tree"

Signing scheme

# Functions

No description provided by the author

# Structs

No description provided by the author
No description provided by the author

# Interfaces

No description provided by the author