0
$\begingroup$

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.

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. I am old, cut me a break.

I expected to understand keypairs, but I actually had no idea how they worked this entire time.

$\endgroup$

closed as too broad by kelalaka, Maarten Bodewes Sep 13 at 10:04

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • $\begingroup$ Welcome to Cryptography. Cross posting is not a good ethic in SO sites. and this question is not fall in our set. $\endgroup$ – kelalaka Sep 12 at 18:55
  • 1
    $\begingroup$ You may want to read up on digital signatures, which is what a "blockchain keypair" is really about. $\endgroup$ – yyyyyyy Sep 12 at 19:19
  • $\begingroup$ Now it has two answers on both sites $\endgroup$ – kelalaka Sep 12 at 21:20
2
$\begingroup$

In blockchain systems, there are no clients and servers, just peer-to-peer nodes. They connect to each other using a TCP/IP connection, but are otherwise equal. Each node does not share its private or public keys with each other. These are kept locally in every node. The node can use their keys for two purposes, both of which are performed locally:

  1. To sign a new transaction in order to make a payment. This signature is computed locally and then broadcast to the network. This does not reveal the private key, only the public key.

  2. To check if a transaction it receives pertains to it. To do this, it checks to see if it matches its public key.

There is no further authentication taking place in the protocol. There are no user accounts, passwords, or any other form of "login".

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.