Hashing to TwistedEdwards curve? #1292
Replies: 3 comments 5 replies
-
We don't currently have hash to G1 for twisted Edwards curve. But I guess we could make it work based on the existing hash to curve for But we don't currently have the corresponding in-circuit version, there is Hash to G2 proposal in #1040 though. I think the direct approach would be to have hash to curve for G1 similar to what we have in native, but this is quite expensive as works with SHA2. And I'm not sure it would be safe with MiMC etc. The current native hash to G1 imo is based on RFC9380. cc @yelhousni, @Tabaie? |
Beta Was this translation helpful? Give feedback.
-
Ok, let's put it another way.
(optionally, but nice to have) Ability to verify server's NIZKPoK (sigma protocol) that it indeed used his private scalar s to perform s*B Is there a set of existing curves that would allow to do that in&out of circuit? |
Beta Was this translation helpful? Give feedback.
-
Another small question @ivokub if I may, how do I calculate scalar modInverse modulo babyjub order in circuit? It's the crucial part of "deblind" or unmasking step in OPRF Outside circuit I just do curve := tbn254.GetEdwardsCurve()
r, _:= rand.Int(rand.Reader, &curve.Order)
...
invR := r.ModInverse(r, &curve.Order)
deblinded := &tbn254.PointAffine{}
deblinded.ScalarMultiplication(blinded, invR) which works |
Beta Was this translation helpful? Give feedback.
-
Is there any simple way to hash into TwistedEdwards BN254 in & outside the circuit? I only found hashing to G1/G2 but I guess it won't work for TwistedEdwards, at least not out of the box.
Beta Was this translation helpful? Give feedback.
All reactions