AlphaWallet / AlphaWallet/alpha-wallet-android

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

Aperta
#2,689 5 commenti 0 reazioni 1 assegnatario Rivendicata da @JamesSmartCell Vedi su GitHub
Bug High Priority
Lingua principale
Java
Stelle
646
Fork
579
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.