Giter VIP home page Giter VIP logo

tzhash's Introduction

Demo

asciicast

In project root:

$ make
...
$ ./demo.sh

Homomorphic hashing in golang

Package tz contains pure-Go (with some Assembly) implementation of hashing function described by Tillich and Zémor.

There are existing implementations already, however they are written in C.

Package gf127 contains arithmetic in GF(2^127) with x^127+x^63+1 as reduction polynomial.

Description

TZ Hash can be used instead of Merkle-tree for data-validation, because homomorphic hashes are concatenable: hash sum of data can be calculated based on hashes of chunks.

The example of how it works can be seen in tests and demo.

Benchmarks

go vs AVX vs AVX2 version

BenchmarkSum/AVX_digest-8             308       3889484 ns/op          25.71 MB/s         5 allocs/op
BenchmarkSum/AVXInline_digest-8       457       2455437 ns/op          40.73 MB/s         5 allocs/op
BenchmarkSum/AVX2_digest-8            399       3031102 ns/op          32.99 MB/s         3 allocs/op
BenchmarkSum/AVX2Inline_digest-8      602       2077719 ns/op          48.13 MB/s         3 allocs/op
BenchmarkSum/PureGo_digest-8           68       17795480 ns/op          5.62 MB/s         5 allocs/op

Makefile

  Usage:

    make <target>

  Targets:

    all       Just `make` will build all possible binaries
    clean     Print version
    dep       Pull go dependencies
    help      Show this help prompt
    test      Run Unit Test with go test
    version   Print version

Contributing

Feel free to contribute to this project after reading the contributing guidelines.

Before starting to work on a certain topic, create a new issue first, describing the feature/topic you are going to implement.

License

This project is licensed under the Apache 2.0 License - see the LICENSE file for details

References

tzhash's People

Contributors

fyrchik avatar im-kulikov avatar realloc avatar

Stargazers

Snegurochka avatar  avatar Anton Nikiforov avatar  avatar Anatoly Bogatyrev avatar  avatar Andrey Lesnykh avatar  avatar Vladimir Avdeev avatar Dmitri Usov avatar Vlad K. avatar  avatar  avatar Aleksey Chetaev avatar  avatar Vladimir avatar  avatar

Forkers

fyrchik realloc

tzhash's Issues

Make tzsum look like other *sum tools

Our tzsum tool requires some updates and improvements to mathc other *sum tools.
What should be done:

  • Switch to common arguments style (and do it like other frostfs-* tools)
  • Merge homo tool functionality
  • Show version properly
  • Support common *sum tools arguments

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.