ethereum / ethereum/py_ecc

Constant time hashing to the curve

Open
#73 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Python
Stars
231
Forks
88
PR merge metrics
No merged PRs in 30d

Description

### What is wrong?

For `bls12-381` we want to map messages to points on the curve. The current implementation uses an expensive "hash and check" method via `hash_to_g2`. It is desirable to have a more performant method of mapping a given message to the curve.

### How can it be fixed

Luckily, there was recent work on a constant time hashing method w/ implementation here:

https://github.com/kwantam/bls12-381_hash

There are some BLS standardization efforts under way that will likely involve making this method the canonical "hash to the curve". If this method makes its way into the standard, then we will definitely want to include it.

The linked repo has a C implementation and a pure Python implementation. We can add both, in the appropriate places, to get the functionality we want.

Contributor guide

Open the contributing guide

Research direction

Start by reading the current bls12-381 hash_to_g2 implementation and compare it with the C and pure Python implementations in kwantam/bls12-381_hash. Identify the appropriate locations for both implementations and review the relevant BLS standardization context. Done means providing a more performant constant-time message-to-curve method for bls12-381.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, python
Domain
cryptography
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.