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

Support for BLS12 based signature verification #20241

Closed
sudesh-supraoracles opened this issue Sep 27, 2021 · 2 comments
Closed

Support for BLS12 based signature verification #20241

sudesh-supraoracles opened this issue Sep 27, 2021 · 2 comments
Labels
stale [bot only] Added to stale content; results in auto-close after a week.

Comments

@sudesh-supraoracles
Copy link

Hi Team!

Since many protocols are putting BLS12 to use for digital signatures.
I want to verify BLS 12 based signature from Solana smart contract.

Hoping for some positive inputs/response on this.

@jon-chuang
Copy link
Contributor

jon-chuang commented Oct 5, 2021

Currently the VM layer is still a little slow, BLS12 pairings would probably blow up to 40ms I reckon. (Ref: solana-labs/rbpf#196). 40ms is too slow for the Solana runtime, as it slows down an entire batch of transactions.

Largely, for cryptography, this is due to the lack of a u64xu64->u128 mul instruction which exists on x86 but not in bpf.

If you could come up with benchmarks for a BLS12 library compiling down to rbpf that supports optimised u32 field arithmetic, and benched the results, that could provide insight.

One could further think of batching BLS12 sigverify via random coefficients.

Else for the time being one might need precompiles, but you’d need to prove your need in the specific use case.

@ryoqun
Copy link
Member

ryoqun commented Oct 6, 2021

u64xu64->u128 mul instruction which exists on x86 but not in bpf.

I wonder this could be improved upon with #20323 ? (CC: @Lichtso)

@github-actions github-actions bot added the stale [bot only] Added to stale content; results in auto-close after a week. label Dec 28, 2022
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jan 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale [bot only] Added to stale content; results in auto-close after a week.
Projects
None yet
Development

No branches or pull requests

3 participants