简体   繁体   English

C#中如何查看以太坊私钥是否有效?

[英]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.我在 ethereumjs-wallet 中搜索了 Wallet.fromPrrivateKey,在 secp256k1 中搜索了 privateKeyVerify。 But I'm using Unity & Nethereum, so I can't use that.但我使用的是 Unity 和 Nethereum,所以我不能使用它。 Is there any way to validate the private key in C#?有没有办法验证C#中的私钥?

The private key is just a random 256-bit integer number.私钥只是一个随机的 256 位 integer 数字。

You just need to check it is > 0 and < max private key value that can be found here .您只需要检查它是否> 0和 <可以在此处找到的< max private key value

Private keys do not have checksums or anything like that.私钥没有校验和或类似的东西。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用C#检查文件是有效的XPS文件? - How Can I Check That A File Is A Valid XPS File With C#? C# 如何检查 URL 是否存在/是否有效? - C# How can I check if a URL exists/is valid? 如何在C#中唯一识别RSA私钥 - How can I identify RSA Private key uniquely in C# 如果有私钥,则为C#如何解密? - C# if I have private key How do I decrypt? 如何在C#中将存储在HSM中的私钥转换为SignedXml.SigningKey - How can I convert the private key stored in HSM to SignedXml.SigningKey in C# 如何从 C# 中的 DER 文件中获取私钥? - How can I obtain the private key from a DER file in C#? 如何导入私钥并用它在C#中签名文档? - How can I import private key and use it to sign document in C#? 如何在 C#/Xamarin 中使用带有来自 android 钥匙串的私钥的 X.509 证书? - How can I use an X.509 certificate with private key from the android keychain in C#/Xamarin? 如何在C#中以编程方式启用强大的私钥保护? - How can I enable strong private key protection programmatically in C#? 使用公钥在php中加密后,如何使用私钥在c#中的块中解密数据? - How can I decrypt data in chunks in c# using a private key after encrypting in php using a public key?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM