简体   繁体   中英

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#?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM