AlphaWallet / AlphaWallet/alpha-wallet-android

Should show an error, instead of silently importing a invalid private key and then fail when signing

Abierto
#2,689 5 comentarios 0 reacciones 1 asignado Reclamado por @JamesSmartCell Ver en GitHub
Bug High Priority
Lenguaje dominante
Java
Estrellas
646
Forks
579
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

Private keys for the secp256k1 curve must be smaller than the order n, which is `fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141` and must not be `0…0` so these keys are invalid:

```
fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141
fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364142
0000000000000000000000000000000000000000000000000000000000000000
```

While this is valid:

```
fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364140
```

Should show an error, instead of silently importing the invalid private key and then fail when signing

Context: https://canary.discord.com/channels/548357107267928064/991499612617719848/991562068975161426

(on iOS, it crashes, which isn't good either https://github.com/AlphaWallet/alpha-wallet-ios/issues/4921)

Test cases used for iOS: https://github.com/AlphaWallet/alpha-wallet-ios/pull/4926/files#diff-ba15c35c2c0ace5c3cb860323254268977e248980976a3480334bd4078d751d2

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.