Skip to content

Add optimized Poseidon implementation #10

@mpenciak

Description

@mpenciak

We should implement the optimizations described in the white paper.

These optimizations boil down to two steps:

  • Swap the order of the linear and ARC layers, and pre-calculate the action of the MDS matrix on the round constants.
  • Factorize the MDS matrix into a pre-sparse matrix and a sparse matrix. Their action on the state vector can be calculated in an efficient manner using sparse matrix algorithms.

(see appendix B of the white paper: https://eprint.iacr.org/2019/458.pdf)

This should also include a robust test suite to ensure the optimized hash implementation matches with the naiive "unoptimized" implementation.

See:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions