Skip to content

feat: implement hash to G2 on BLS12-381 #1473

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

Draft
wants to merge 108 commits into
base: master
Choose a base branch
from
Draft

feat: implement hash to G2 on BLS12-381 #1473

wants to merge 108 commits into from

Conversation

ivokub
Copy link
Collaborator

@ivokub ivokub commented Apr 7, 2025

Description

This PR takes #1447 and #1040 and Consensys/gnark-crypto#674, implementing Map/Hash to G2 over BLS12-381.

It is still work in progress, i'm refactoring to make it compatible with the non-native group algebra we have elsewhere. I'll also generify mapping bytes to non-native elements more efficiently (instead of doing it byte-by-byte).

Type of change

  • New feature (non-breaking change which adds functionality)

How has this been tested?

  • Test A
  • Test B

How has this been benchmarked?

  • Benchmark A, on Macbook pro M1, 32GB RAM
  • Benchmark B, on x86 Intel xxx, 16GB RAM

Checklist:

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I did not modify files generated from templates
  • golangci-lint does not output errors locally
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

weijiguo and others added 30 commits January 27, 2024 16:01
revised G2.addUnified function based on the Brier and Joye algorithm
fixed G2.sgn0 function and associated unit tests for BLS12-381
@ivokub ivokub changed the title feat: implement map to G2 on BLS12-381 feat: implement hash to G2 on BLS12-381 Apr 14, 2025
@ivokub ivokub mentioned this pull request Apr 14, 2025
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants