PackageTrack

Go modules · #2450

github.com/cbergoon/merkletree

v0.5.0cbergoon/merkletree

Release timeline

16 releases since 2017
2019202120232025

Releases

  1. v0.5.1-0.20260814143555-560f0c849eea14 Aug 2026pre-release

    Nothing published for this version

  2. v0.5.1-0.20260814060754-702c0a0e6c2514 Aug 2026pre-release

    Nothing published for this version

  3. v0.5.014 Aug 2026
    Release notes

    Proof generation and verification, mainly.

    Locating content was a linear scan, making a single proof O(n) and a full set
    O(n squared). WithLeafIndex, GetMerklePathByIndex and the AppendMerklePath forms
    take that to a map probe, a direct index, and zero allocations respectively.

    VerifyProof checks a proof against a root without the tree, which is what a light
    client actually needs and what the package could not previously do.

    WithParallelism spreads content hashing across goroutines, off by default because
    it calls Content.CalculateHash concurrently.

    VerifyTree and the binary decoder allocate substantially less.

    The RFC 6962 construction is now checked against the Certificate Transparency
    reference vectors, and the default construction against other implementations of
    the same folklore. Both live in nested modules, so merkletree still has no
    dependencies.

    All additive; no existing API changed.

    Open source →
  4. v0.4.014 Aug 2026
    Release notes

    Adds serialization and an opt-in RFC 6962 construction, and fixes four
    correctness bugs. The default construction is unchanged: roots, proofs and
    indexes are byte for byte identical to v0.3.0.

    New:

    • Marshal/Unmarshal for binary, JSON and gob, closing #13. A tree is encoded
      as the seed it rebuilds from, and the recorded root makes decoding
      self-checking
    • NewTreeWithOptions, with WithHasher, WithSortedSiblings and WithRFC6962
    • WithRFC6962 prefixes leaf and interior hashes and splits odd node counts
      rather than duplicating them, closing the second preimage weakness and
      CVE-2012-2459 for trees that opt in
    • Sorted() and RFC6962() accessors
    • ErrNoContent, ErrNilContent and ErrContentNotFound sentinels

    Fixed:

    • VerifyTree recomputed from content but never checked the hashes recorded on
      the nodes, so an edited interior hash went unnoticed
    • a nil entry in the content slice panicked instead of returning an error
    • Node.sort was dead

    Behaviour changes, same signatures:

    • GetMerklePath returns ErrContentNotFound for content that is not in the
      tree, where it previously returned nil, nil, nil
    • VerifyTree is stricter, and now rejects a tree whose stored node hashes have
      been edited
    Open source →
  5. v0.3.013 Aug 2026
    Release notes

    Modernized tooling and fixed four bugs. No API changes, and roots, proofs
    and indexes are byte-identical to v0.2.0.

    • go 1.21 is now the minimum (was 1.12)
    • GitHub Actions replaces Travis
    • VerifyContent now compares against the tree's merkle root
    • sortAppend no longer writes into its callers' spare capacity
    • RebuildTree no longer promotes the odd-count padding leaf to real content
    • GetMerklePath tells left from right by node identity, not by hash
    Open source →
  6. v0.2.1-0.20230201134527-59b506280c4d1 Feb 2023pre-release

    Nothing published for this version

  7. v0.2.021 Aug 2019
    Release notes

    adds functionality to specify hash method used to calculate tree. tes…

    Open source →
  8. v0.1.021 Aug 2019

    Nothing published for this version

  9. v0.0.0-20230201134527-59b506280c4d1 Feb 2023pre-release

    Nothing published for this version

  10. v0.0.0-20190821184033-b76d0d18fef721 Aug 2019pre-release

    Nothing published for this version

  11. v0.0.0-20190307191648-015148bca4007 Mar 2019pre-release

    Nothing published for this version

  12. v0.0.0-20181226014223-2111568b555826 Dec 2018pre-release

    Nothing published for this version

  13. v0.0.0-20180912145856-05d5987faac412 Sept 2018pre-release

    Nothing published for this version

  14. v0.0.0-20180712123212-348a355d86ed12 Jul 2018pre-release

    Nothing published for this version

  15. v0.0.0-20180228022759-0e68ec9a138d28 Feb 2018pre-release

    Nothing published for this version

  16. v0.0.0-20170620034019-217f84c78dda20 Jun 2017pre-release

    Nothing published for this version