Skip to content

chore: add a safe blst wrapper#2223

Merged
rakita merged 22 commits intobluealloy:mainfrom
kevaundray:kw/blst-wrapper-refactor
Mar 18, 2025
Merged

chore: add a safe blst wrapper#2223
rakita merged 22 commits intobluealloy:mainfrom
kevaundray:kw/blst-wrapper-refactor

Conversation

@kevaundray
Copy link
Contributor

This PR adds a safe blst wrapper and does a few miscellaneous cleanups, so leaving it in draft as it might be better to pull them out into separate PRs if the changes seem reasonable.

- Move is_on_curve check into decode_and_check_g1 method (This should never be skipped)
- Opinionated: make the default extract_g1 method always do a subgroup check, so that it is harder to mess things up
- Move is_on_curve check into decode_and_check_g2 method (This should never be skipped)
- Opinionated: make the default extract_g2 method always do a subgroup check, so that it is harder to mess things up
- refactor to use wrapper blst methods and be explicit about performing no subgroup check
- refactor to use wrapper blst methods and be explicit about performing no subgroup check
- refactor to use safe blst wrapper
- remove true argument to extract_g1_inputs since subgroup checks are on by default
- No longer need to convert to jacobian to affine and then back to affine
- refactor to use safe blst wrapper
- remove true argument to extract_g2_inputs since subgroup checks are on by default
- No longer need to convert to jacobian to affine and then back to affine
- use safe blst wrapper
- use safe blst wrapper
- use safe blst wrapper
@codspeed-hq
Copy link

codspeed-hq bot commented Mar 16, 2025

CodSpeed Performance Report

Merging #2223 will not alter performance

Comparing kevaundray:kw/blst-wrapper-refactor (886f8a5) with main (f473029)

Summary

✅ 8 untouched benchmarks

@kevaundray kevaundray marked this pull request as ready for review March 17, 2025 16:21
Copy link
Member

@rakita rakita left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@rakita rakita merged commit 7cc9939 into bluealloy:main Mar 18, 2025
29 checks passed
@github-actions github-actions bot mentioned this pull request Mar 18, 2025
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

Successfully merging this pull request may close these issues.

2 participants