arkworks-rs / crypto-primitives

Interfaces and implementations of cryptographic primitives, along with R1CS constraints for them

Home Page:https://www.arkworks.rs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Refactor Pedersen CRH impl

Pratyush opened this issue · comments

Right now, PedersenCRH impls CRH for any ProjectiveCurve, and outputs a group element. However, for TE curves, we can project this to just the x coordinate. Supporting this generically requires the hacky "InjectiveMap" infrastructure, so we should instead just impl CRH for PedersenCRH<SWCurve> which outputs a group element (maybe compressed?) and impl CRH for PedersenCRH<TECurve> which outputs the x coordinate, thus getting rid of the current hacks.