Try โ€‚โ€‰HackMD

Multiset hashing based on elliptic curves

References:

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More โ†’

(screenshot from SP1 V4 turbo note)

Discussion

An extension degree

k=7 gets a security level of:

This is fine for their targetted security level of 100 bits.

However arithmetic over

Fp7 is cumbersome to implement out-circuit. So choosing
k=6
or
8
is preferable to use Karatsuba and Toom-Cook routines. A
k=6
extension gets:

A

k=8 extension gets:

Fp8 can be simply represented as
Fp[z]/z8โˆ’11
and the prime-order following curve can be instantiated:
(E/Fp8):Y2=X3โˆ’3X+32z5

This curve has the prime order:
r=0x98c29b8b2f1b6f4c0a66714470a403628e1deb2a36f88d57337f85c4e42c99.

Note that since the coefficient

A cannot be
0
, we choose
A=โˆ’3
to benefit from an optimization when using Jacobian coordinates EFD.
Out-circuit the octic extension can be implemented as follows
Fp2=Fp[x]/x2โˆ’11
,
Fp4=Fp2[y]/y2โˆ’x
and
Fp8=Fp4[z]/z2โˆ’y
using Karatsuba-over-Karatsuba-over-Karatsuba for the arithmetic.

Koala-bear case

A similar effort can be conducted with Koala-Bear prime for Linea use-case. Given

p=231โˆ’224+1 of 31 bits, we find the elliptic curve:

(E/Fp8):Y2=X3โˆ’3X+17z5
with prime order:
r=0xf06e44682c2aa440f5f26a5ae1748fec171df66abbdb81ad07f36ed81b9049

and

Fp[z]/z8โˆ’3, or equivalently
Fp2=Fp[x]/x2โˆ’3
,
Fp4=Fp2[y]/y2โˆ’x
and
Fp8=Fp4[z]/z2โˆ’y
.

The security analysis is similar:

If we end up not caring about the performance out-circuit and we only focus on the in-circuit cost, we can choose a

7-th extension and implement the arithmetic in circuit over
Fp7
using the randomized Schwartz-Zippel trick (Feltroid post). We find the following parameters:

  • Fp7=Fp[z]/z7+z+4
    ,
  • (E/Fp7):Y2=X3+9X+15z5
    and
  • prime order
    r=0x1e4a5d47579fd9acc910bb689b459f0a9ba4adbefb76f53ab9c25b3.

The security analysis is similar: