arkworks-rs / crypto-primitives

Interfaces and implementations of cryptographic primitives, along with R1CS constraints for them
https://www.arkworks.rs
Apache License 2.0
175 stars 86 forks source link

Refactoring `MDS` component #88

Open zhenfeizhang opened 2 years ago

zhenfeizhang commented 2 years ago

Summary

refactoring MDS component in Poseidon so it can be used by Rescue

Proposal

Concretely:

pub(crate) struct MDS{
  ... 
}

impl Default for MDS {
  // use the rescue method
}

impl MDS {
 fn sample<R: Rng>(rng: &mut R)->Self{
   // use poseidon method
   // also need to decide if we want to do those three checks
 }
}

For Admin Use