CodeChain-io / CodeChain-io/foundry

Add new error types for signatures and public keys

Abierto
#200 4 comentarios 0 reacciones 0 asignados Ver en GitHub
bls refactoring
Lenguaje dominante
Rust
Estrellas
36
Forks
11
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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?

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Comienza leyendo el manejo de RLP DecoderError y las rutas de decodificación para firmas y claves públicas. Revisa el ejemplo SchnorrSignature y los requisitos de validez de los puntos de la curva elíptica. Se considera completado cuando los nuevos tipos de error y el comportamiento de decodificación para puntos no válidos estén definidos de forma coherente.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
rust
Área
blockchain, cryptography
Tipo de issue
Nueva funcionalidad
Dificultad
5/5
Tiempo estimado
Más de una semana
Estado de actividad
Estancado
Claridad
Necesita aclaración
Aptitud para principiantes
30/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.