[英]How are blockchain keypair private keys hidden from miners, and how are they generated in the first place?
I don't know how blockchain keypairs are programmatically generated, and equally important - how they are able to verify their keypair using a private key to a remote server - while keeping their private key entirely private. 我不知道如何以编程方式生成区块链密钥对,并且同样重要-它们如何能够使用远程服务器的私钥来验证其密钥对-同时保持其私钥完全私有。
How are blockchain keypairs generated, and private keys kept hidden by the remote server that is able to authenticate your account with some type of signing? 如何生成区块链密钥对,并通过能够通过某种签名对您的帐户进行身份验证的远程服务器隐藏私钥?
Is a public key a random hash and a private key the hash that parented the public key? 公钥是随机散列,私钥是作为公钥父项的散列吗? If not, how?
如果没有,怎么办? And how do they stay hidden the target network?
以及它们如何隐藏在目标网络中?
I am using encryption references in my IDE but am unsure how to utilize them effectively with a blockchain network. 我在IDE中使用加密引用,但不确定如何在区块链网络中有效利用它们。
Private Declare Sub MD5Init Lib "cryptdll" (Context As MD5_CTX)
Private Declare Sub MD5Update Lib "cryptdll" (Context As MD5_CTX, ByVal strInput As String, ByVal lLen As Long)
Private Declare Sub MD5Final Lib "cryptdll" (Context As MD5_CTX)
Private Function CalcMD5(sEncryptString As String) As String
Dim strBuffer As String
Dim myContext As MD5_CTX
Dim result As String
Dim lp As Long
Dim MD5 As String
strBuffer = sEncryptString
MD5Init myContext
MD5Update myContext, strBuffer, Len(strBuffer)
MD5Final myContext
result = StrConv(myContext.digest, vbUnicode)
For lp = 1 To Len(result)
CalcMD5 = CalcMD5 & Right("00" & Hex(Asc(Mid(result, lp, 1))), 2)
Next
End Function
Yes, that's VB Classic. 是的,那是VB Classic。 I am old, cut me a break.
我老了,让我休息一下。
I expected to understand keypairs, but I actually had no idea how they worked this entire time. 我本来希望了解密钥对,但实际上我不知道它们在整个过程中如何工作。
In Bitcoin, private keys are (or should) be randomly generated by your wallet software, which is ideally offline using a high source of entropy. 在比特币中,私钥是(或应该)由您的钱包软件随机生成的,理想情况下,由于使用大量的熵,它可以脱机。
The cryptography used in Bitcoin is Elliptic Curve, specifically the secp256k1 curve. 比特币中使用的加密是椭圆曲线,特别是secp256k1曲线。 It is a form of asymmetric/public key cryptography , where private keys are any valid value in a very huge set (incomprehensibly huge like 10^70), and the public keys can be deterministically calculated by multiplying the private key with the curve's generator point using Elliptic Curve Point Multiplication .
它是非对称/公钥加密的一种形式,其中私钥是非常大的集合中的任何有效值(难以理解的大,如10 ^ 70),并且可以通过将私钥乘以曲线的生成点来确定性地计算公钥。用椭圆曲线点乘法 。
The private keys are used to sign transactions (the private key never leaves the wallet software and is not shared with anyone including nodes). 私钥用于签署交易(私钥从不离开钱包软件,并且不与任何人(包括节点)共享)。 This signature algorithm is called the Elliptic Curve Digital Signature Algorithm (ECDSA) .
该签名算法被称为椭圆曲线数字签名算法(ECDSA) 。 The signature of the data can be verified using the data itself and the public key.
可以使用数据本身和公共密钥来验证数据的签名。 If the signature verification algorithm succeeds, it can be deduced that the private key corresponding to the public key was in fact used to sign the data, proving the owner of the private key produced the signature.
如果签名验证算法成功,则可以推断出实际上与公钥相对应的私钥已用于签名数据,证明私钥的所有者产生了签名。 This is important in Bitcoin because it authorizes the owner of the coins to spend them.
这在比特币中很重要,因为它授权硬币的所有者使用它们。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.