Open burdges opened 1 year ago
I've slightly wrong here, the IRTF draft cannot be described using XofReader
because they hash the output length. We might still simplify the code along similar lines, using our own XoF-like trait, but not really sure. I'll close this for now.
I think XofReader
works anyways, but then under the hood you're taking the same field as input in two places, only a minor wart in the higher level interface.
It's mostly done in https://github.com/w3f/arkworks-algebra/tree/xof_reader but we should still clean up the map_to_curve mess ala https://github.com/arkworks-rs/algebra/issues/629
Is
construct_dst_prime
fromExpanderXof
anywhere in the spec? If not, then maybe we should remove it? Anyways..I'd think
ExpanderXof
should become a freepub fn
likeWe could seemingly
impl<H: Digest+Clone> XofReader for ExpanderXmd<H>
too. I thinkKeyInit
cannot work here, so we'd provide some free fn likeIt's possible the rust crypto project would upstream this somehow even.
At this point, XoFs have become our common currency, so our
HashToField
trait also becomes a free fn likeAs field hashers are specified for each curve, individual curves might specify them via
Assuming #629 this looks like:
where