toposware / certificate-stark

An example of state-transition AIR program backed by the winterfell library.
Apache License 2.0
3 stars 1 forks source link

Use several Fp elements of hash digest for Schnorr scalar multiplication #11

Closed Nashtare closed 2 years ago

Nashtare commented 2 years ago

The PR #10 introduces the new field-extension based curve Cheetah as underlying curve for our state-transition AIR program. Unlike the previously used curve, each register is storing a u64 value representing an Fp element. Hence, we need to use more than one register of hash output during Schnorr signature verification AIR program to perform the scalar multiplication with the public key.

The above PR only takes the first element of the hash digest to recompute the scalar mult, similarly to the previous curve over a field of size 252 bits. There are ways to deal with this properly, but it may be impacted by the way we want to rearrange the trace / perform the Schnorr aggregation / implement the in-circuit RAPs. This Issue is to keep track of it.

Nashtare commented 2 years ago

As trace rearrangement is being put on hold for now, a commit solving this has been added to #10.