Skip to content

hash2curve: why expand_message receives multiple messages? #1309

Closed
@armfazh

Description

@armfazh

why expand_message function receives multiple messages and multiple DSTs?
This seems counter-intuitive when invoking the top-level hash to curve function.

fn expand_message(
    msgs: &[&[u8]],
    dsts: &'a [&'a [u8]],
    len_in_bytes: usize
) -> Result<Self::Expander>

If the purpose is to provide a way to call "Update" many times as in a regular hash function, then I don't think is the right approach, since that case is useful when one doesn't not the full message to be hashed. However, this API requires to passing an array of all the parts of the message.

Happy to discuss more about the API design of this function.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions