-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use PRNG on get_indices_from_sponge
#69
base: main
Are you sure you want to change the base?
Conversation
That's a decent improvement. Could you add some links/research about the security analysis of this? I recall you mentioned this technique during one of the calls |
As far as I know, there is no published research on that approach - just like there is no published research on the approach in our current code. The task required by the FS transform here is: "generate What I want to stress is that both a) and b) are realisations of the FS transform (that is, instatiations of the ROM) and I'm not aware of specific research analysis published for any of them, while at the same time both of them seem to be well known in the community - it's just that we are more used to working with a). But, for instance, Giacomo's STIR repo uses b), and he explained some other advantages of this approach in our last meeting (such as being potentially less biased). |
Did you consider Fisher-Yates as I mentioned? Because we need |
Only t columns, not necessarily distinct. So you can just sample and deduplicate. |
A written reference for @autquis about the indices not necessarily being different: Thaler's book, p. 166, first paragraph. |
Hmm just thinking about these benches: the underlying sponge being tested is Poseidon. So it makes sense that there is quite a large improvement in speed. |
e.g. something like this: arkworks-rs/crypto-primitives#136 |
Hey @mmagician, I'll look at that with César 👌 |
generate_indices_from_sponge
get_indices_from_sponge
Sure, in general arkworks-rs/crypto-primitives#136 seems to be much faster than Poseidon. Modifying
|
Thanks for running the benches @Cesar199999! The results are what I feared. In practice, we want to reason about massive circuits, like 2^28. While we don't have benches for these, it seems like the performance would be degraded for these with the approach in this PR. |
@mmagician Let's put merging this on hold, @Cesar199999 and I would still like to make a set of four benchmarks to really understand what's going on here (there are small inconsistencies in what we have benched above). Should be ready very soon :) |
As a comment:
|
@WizardOfMenlo thanks for the help 💯