'How can I check if the private key of Ethereum is valid in C#?
I searched about Wallet.fromPrrivateKey in ethereumjs-wallet, and privateKeyVerify in secp256k1. But I'm using Unity & Nethereum, so I can't use that. Is there any way to validate the private key in C#?
Solution 1:[1]
The private key is just a random 256-bit integer number.
You just need to check it is > 0 and < max private key value that can be found here.
Private keys do not have checksums or anything like that.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Mikko Ohtamaa |
