-
Notifications
You must be signed in to change notification settings - Fork 13
Labels
track:zerokitZerokit track (Applied ZK/Explorations)Zerokit track (Applied ZK/Explorations)
Description
Problem
We would like to have a self-contained poseidon module that works natively with arkworks traits, so that round parameters and constants are generated directly from the field characteristic and not hard-coded as now are. This will further enable current and future zerokit modules that use it to access the same Poseidon implementation.
In order to achieve such goal, we can progressively refactor the poseidon implementation currently present in the rln module.
The main required steps should be:
- Implement
GrainLFSRin order to generate constants from hard-coded round parameters (i.e., the tuples(t, RF, RP)) and field characteristic; - Pass arkworks
PrimeFieldtrait to Poseidon, so that the latter can be instantiated using different curves; - Generate in-code round parameters, i.e. port generate_params_poseidon.sage
- Implement algorithm 1-2-3 from reference implementation to check security of randomly generated MDS matrices. Before implementing these algorithms, we hard-code the number of randomly generated unsecure matrices that should be skipped during generation (value taken from reference implementation);
- Move the
poseidonimplementation to a separate module, e.g. underutils. This step can be done at any moment.
Acceptance Criteria
- Implement all the above steps.
Metadata
Metadata
Assignees
Labels
track:zerokitZerokit track (Applied ZK/Explorations)Zerokit track (Applied ZK/Explorations)
Type
Projects
Status
Later/Icebox