HarryR / ethsnarks

A toolkit for viable zk-SNARKS on Ethereum, Web, Mobile and Desktop
GNU Lesser General Public License v3.0
240 stars 57 forks source link

Use Miyaguchi-Preneel construct for LongsightL hash function #37

Closed HarryR closed 6 years ago

HarryR commented 6 years ago
def compress_MiyaguchiPreneel(m_0, m_1, C, e, p):
  H_0 = LongsightL(IV, m_0, C, e, p)
  H_1 = LongsightL(H_0, m_1, C, e, p)
  return (H_0 + H_1 + m_0) % p

The following needs to be implemented:

This is a fair chunk of work, but should solve the problem.