Git Product home page Git Product logo

balloon-hashing's People

Contributors

daxpedda avatar dependabot[bot] avatar elliotwutingfeng avatar nachonavarro avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

balloon-hashing's Issues

Mistake in the implementation?

On page 7 of the paper, you can see that cnt starts at 0, it is still 0 when it is passed to the first hash function in the expand stage. It is then incremented according to s_cost. When cnt is used during the mix stage, its value is greater than its initial value.

In this implementation, cnt is initialised to 1, a reference is then passed to the expand function. In Python, integers are immutable so when it is incremented a copy is made and that copy is incremented, instead of incrementing the original. When cnt is passed to the first hash function in the expand stage, its value is 1. It is then incremented according to s_cost, but the accumulated value is thrown away at the end of the expand function, and when cnt is passed to mix, it is still its initial value.

As cnt is used in the security proof this divergence in the implementation should be considered a severe error. I suggest you stop breaking the balloon function up into sub functions, as how Python passes primitives to functions is confusing and is leading to mistakes.

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.