AlphaWallet / AlphaWallet/alpha-wallet-android

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

Ouverte
#2,689 5 commentaires 0 réactions 1 personne assignée Réclamée par @JamesSmartCell Voir sur GitHub
Bug High Priority
Langage dominant
Java
Étoiles
646
Forks
579
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

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

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.