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

bls12_381 left shift bug in wasm (bellman) #1200

Open
dark64 opened this issue Aug 10, 2022 · 0 comments
Open

bls12_381 left shift bug in wasm (bellman) #1200

dark64 opened this issue Aug 10, 2022 · 0 comments
Labels
Blocked Issues which cannot be fixed until some external blocker is resolved Type: Bug

Comments

@dark64
Copy link
Member

dark64 commented Aug 10, 2022

Description

panicked at 'attempt to shift left with overflow', 
/home/darko/.cargo/registry/src/github.com-1ecc6299db9ec823/bellman_ce-0.3.5/src/domain.rs:64:26

The issue seems to be in the following line:

let max_degree = (1 << E::Fr::S) - 1;

where S for bls12_381 is 32. This happens when running setup in wasm, which is a 32-bit environment.

Possible solutions

  • Fork bellman and resolve the issue
  • Or remove support for bls12_381 (when using bellman) in zokrates-js
@dark64 dark64 added Type: Bug Blocked Issues which cannot be fixed until some external blocker is resolved labels Aug 10, 2022
@dark64 dark64 changed the title bls12_381 not working properly in wasm (bellman) bls12_381 left shift bug in wasm (bellman) Aug 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Blocked Issues which cannot be fixed until some external blocker is resolved Type: Bug
Projects
None yet
Development

No branches or pull requests

1 participant