ethereum / ethereum/py_ecc

For arbitrary message, is empty signature valid for empty public key?

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

Description

### What is wrong?

To py_ecc, if you sign a message with an empty public key and an empty signature, it verifies True. That seems wrong.

```python
In [10]: from py_ecc.bls import verify

In [11]: verify(b'\x56'*32, b'\xc0'+ b'\x00'*47, b'\xc0'+ b'\x00'*95, 0)
Out[11]: True
```

Arguments to return True
- It is a valid behavior for the pairing function
- It is just a special case of rogue key attack, we don't let validator input public key anyway.

Arguments to return False
- It's a scary gotcha to let an arbitrary message to be verified True, if not handled carefully.
- In other libraries like BLS Chia, this is not allowed.

### How can it be fixed

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.