Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SWUConfig for bn254 #855

Open
NikZak opened this issue Sep 6, 2024 · 3 comments
Open

SWUConfig for bn254 #855

NikZak opened this issue Sep 6, 2024 · 3 comments

Comments

@NikZak
Copy link

NikZak commented Sep 6, 2024

I wonder if SWUConfig can be implemented for bn254. Only need one param: Zeta (probably can take from Gnark). It is hard to do outside of the repo due to foreign trait on foreign types limitations

@nickz-t3
Copy link

nickz-t3 commented Sep 7, 2024

Oh, I guess I see the issue. It is SW method simplified by Ulas which requires a*b != 0 where are a and b coming from short Weierstrass form of the curve equation. So not applicable to BN254. Then my demand changes. Can we implement the straight SW method as in the standard https://www.ietf.org/archive/id/draft-irtf-cfrg-hash-to-curve-16.html#straightline-svdw

@nickz-t3
Copy link

nickz-t3 commented Sep 7, 2024

I am happy to give it a try if you guys accept contributions. Should not be extremely difficult

@NikZak
Copy link
Author

NikZak commented Sep 8, 2024

@drskalman @ValarDragon @daira @Pratyush @mmagician @weikengchen tagging you as authors/contributors of the pulls 343, 147
I saw that the work of implementing the SW method was started but than was superseded by simplified SWU.
SWU is great but does not cover BN254. Meanwhile BN254 is part of arkworks. So it makes arkworks incomplete compared to say https://github.com/ConsenSys/gnark-crypto/blob/master/ecc/bn254/hash_to_g1.go. And as I mentioned earlier implementing this outside of the repo requires not so beatiful wrappers around bn254 to avoid foreign trait implementation limitations.
So is there a reason why this feature should not be added to the repo?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants