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 of hash_to_curve using blst_map_to_g1/g2 #48

Open
dev0x1 opened this issue Nov 3, 2022 · 1 comment
Open

Support of hash_to_curve using blst_map_to_g1/g2 #48

dev0x1 opened this issue Nov 3, 2022 · 1 comment

Comments

@dev0x1
Copy link

dev0x1 commented Nov 3, 2022

Hello,
blst exposes blst_map_to_g1 and blst_map_to_g2. These APIs are useful in the case when a user of this library wants to do hash-to-curve using different XMD and XOF based hashing of the messages. It would be nice if wrapper of these APIs are added in blstrs.

Below is the link for an implementation where I have copied hash-to-curve generic traits from zkcrypto/bls12_381 and implemented the wrappers under a feature flag. I have used zkcrypto/bls12_381's test cases too(test vectors are from hash_to_curve spec draft 10) and the tests pass.

Implementation: master...dev0x1:blstrs:gaurav/h2c

To test,

cargo test --features h2c_generic_hash --features alloc

Thanks,

@NashAiomos
Copy link

This is great

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

No branches or pull requests

2 participants