CodeChain-io / CodeChain-io/foundry
Add new error types for signatures and public keys
- 主要言語
- Rust
- スター
- 36
- フォーク
- 11
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
Currently, all signatures and public keys are just wrapper structs of bytes.
For better performance and consistency, they should be wrappers of some types representing points in elliptic curves.
Verifying that a signature instance refers to a valid point in an elliptic curve should be done at the moment of decoding, not at the moment of signature verification.
For example, Schnorr signature defined as `pub struct SchnorrSignature([u8; 64]);` should be changed to `pub struct SchnorrSignature(G1)`.
I believe we need a different way to handle decoding errors. i.e. decoding of signatures and public keys should fail if the RLP representation is correct, but the decoded bytes do not refer to a valid point in the elliptic curve.
Currently, RLP DecoderError does not support such invalidity.
Do you have any nice idea to handle this error?
コントリビューションガイド
調査の方向性
まず、RLP DecoderError の処理と、署名および公開鍵のデコード経路を読んでください。SchnorrSignature の例と、楕円曲線上の点の有効性に関する要件を確認してください。無効な点に対する新しいエラー型とデコード動作が一貫して定義されていれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- rust
- 領域
- blockchain, cryptography
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 30/100