- 
                Notifications
    You must be signed in to change notification settings 
- Fork 211
Description
Hi,
I am trying to use this library to implement BBS Signatures and Proofs as well as various extensions. To do this, I need a hash-to-curve with a bit of flexibility in the hashing-part. Specifically, I need to be able to exchange the hash function. Ideally, I would also be able to use incremental hash APIs.
I understand that my own expand_message and this library's blst_map_to_g1 will get me most of the way there. What is missing is the option to construct field elements (fp) from byte strings (by interpretation as big endian and calculation mod p). Essentially the following functionality:
Lines 145 to 151 in 097818a
| limbs_from_be_bytes(elem, bytes, L); | |
| bytes += L; | |
| /* | |
| * L-bytes block % P, output is in Montgomery domain... | |
| */ | |
| redc_mont_384(elems[0], elem, BLS12_381_P, p0); | |
| mul_mont_384(elems[0], elems[0], BLS12_381_RRRR, BLS12_381_P, p0); | 
Would it be possible to add this to the public API? Say as a function void blst_fp_from_be_bytes(blst_fp *out, const byte *in, size_t len)?
Thanks in advance :)