-
Notifications
You must be signed in to change notification settings - Fork 180
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
Random data to curve points #307
Comments
Sure, give me a few days to cook something! |
Take a look at 8858084, feedback is welcome! I just need to add checks to ensure enough randomness is given, but the API should stay the same. |
Thanks :) |
I just pushed some error-handling to HEAD, it should be better now. |
Thanks :) Lines 547 to 554 in 0cff31b
Maybe guards in size_t ep_map_rnd_size(void) {
const size_t elm = (FP_PRIME + ep_param_level() + 7) / 8;
#if EP_MAP == BASIC || !defined(STRIP)
return elm;
#elif EP_MAP == SSWUM || !defined(STRIP)
return 2 * elm;
#elif EP_MAP == SWIFT || !defined(STRIP)
return 2 * elm + 1;
#endif
} This would work as long as |
Oh, that with The problem with requiring less bytes is obtaining from the API a lower number of bytes than the chosen function needs due to the different configurations. |
I am trying to implement BBS signatures, for which I need a Hash-to-Curve for BLS12-381.
I basically need something similar to the following function:
relic/src/ep/relic_ep_map.c
Lines 208 to 232 in 3b9a4a8
Except, I need to be able to exchange the DST for
md_xmd
, which is currently hardcoded to "RELIC", and for some modes, replace the entire XOF with SHAKE.My current workaround is to reimplement much of
src/ep/relic_ep_map.c
and include some internal template headers.Would it be possible to provide an interface publicly which takes random data of the correct length (i.e.
r
) instead of deriving it from a message?The text was updated successfully, but these errors were encountered: