nachonavarro / balloon-hashing Goto Github PK
View Code? Open in Web Editor NEWBalloon Hashing implemented in Python
Home Page: https://crypto.stanford.edu/balloon
License: MIT License
Balloon Hashing implemented in Python
Home Page: https://crypto.stanford.edu/balloon
License: MIT License
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.