Skip to content
This repository was archived by the owner on Oct 28, 2024. It is now read-only.
This repository was archived by the owner on Oct 28, 2024. It is now read-only.

HashToPoint should re-hash at every iteration, instead of incrementing #143

Open
@HarryR

Description

@HarryR

For example, the from_y_always is agnostic to the hashing algorithm which is first used to derive a field element. However, it does this by incrementing the coordinate until a point is valid.

See: https://github.com/HarryR/ethsnarks/blob/master/src/jubjub/point.cpp#L96

This should be changed to:

while True:
  y = H(y)
  x = derive_x(y)
  if x is not None:
    return x, y

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions