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

Use proper hash to curve algorithm for BLS signatures #38

Closed
jannikluhn opened this issue Sep 16, 2021 · 2 comments
Closed

Use proper hash to curve algorithm for BLS signatures #38

jannikluhn opened this issue Sep 16, 2021 · 2 comments

Comments

@jannikluhn
Copy link
Contributor

jannikluhn commented Sep 16, 2021

To create BLS signatures in G2, we need to first map the message to a point in G2. At the moment, we do this by hashing the message to a string, interpreting it as an integer, and multiplying it by the base point. This is not the proper way to do it.

  • The cloudflare library has an issue for this: Hashing to G2 cloudflare/bn256#17
  • If EIP-2537 is activated, we should probably switch to the BLS12-381 curve and we can use whatever the Eth2 clients use.
  • If we have to implement it ourselves, we have two options:
    • Implement a proper algorithm, e.g., described here: https://datatracker.ietf.org/doc/draft-irtf-cfrg-hash-to-curve/
    • Implement "hash and check" which supposedly is insecure, but should be acceptable for our use case (because the attacker cannot choose the message that's signed) -- see here for a description, but in the context of BLS12-381.
@jannikluhn
Copy link
Contributor Author

we should figure out if we actually need it or if the current implementation is good enough

@jannikluhn
Copy link
Contributor Author

not needed anymore since we're likely not going to use the decryptors

Rolling Shutter automation moved this from To do to Done Mar 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

1 participant