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.

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 &amp; Right("00" &amp; 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.
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:


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.
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".