-
Notifications
You must be signed in to change notification settings - Fork 10
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
PCD uses Marlin with Poseidon with hardcoded parameters that do not guarantee to be secure #1
Comments
So, the current implementation in this repo should be considered benchmark-purpose, though it is due to the upstream. |
Some factoring result of p-1 for the MNT4/6-298/753. Factors > 100 are denoted by R. It shows that choosing \alpha=17 is okay for these curves. MNT4/6-298 475922286169261325753349249653048451545124878552823515553267735739164647307408490559963137 475922286169261325753349249653048451545124879242694725395555128576210262817955800483758081 MNT4/6-753: 41898490967918953402344214791240637128170709919953949071783502921025352812571106773058893763790338921418070971888458477323173057491593855069696241854796396165721416325350064441470418137846398469611935719059908164220784476160001 41898490967918953402344214791240637128170709919953949071783502921025352812571106773058893763790338921418070971888253786114353726529584385201591605722013126468931404347949840543007986327743462853720628051692141265303114721689601 |
So, ideally, the next step to boost the security is:
|
By the way, the current choice of \alpha = 17 by @ValarDragon is smart. It has few constraints for Though |
The number of partial rounds has been increased to 31, and the round constants are now generated via a PRNG with a hardcoded seed. This is still not good enough. Efforts to move this to a more formal treatment will continue. |
I think maybe if one makes the seed dependent on the field in some way (maybe by being a hash of the modulus?), and uses instead of a PRNG a XOF derived from a random-oracle-like thing, it should suffice for security. |
Yes. Citing a related issue in |
This is a note that the current PCD uses the
constraints
branch of Marlin, which uses a hardcoded Poseidon parameters, regardless of the curves and fields of the proof systems. This has two problems:(1) \alpha may not work for all the fields. Recall that Poseidon uses a nonlinear function y = x^\alpha. There is a requirement that \alpha does not divide the order of the field. This immediately means that the current parameters are "insecure" under a number of the curves and fields due to collisions.
(2) Hardcoded parameters are never a good practice. Ideally, we can replace it by running the ChaChaRng over a small seed, to generate all the parameters needed for Poseidon.
This, however, requires a general-purpose and nice Poseidon sponge implemented in arkworks.
The text was updated successfully, but these errors were encountered: