In blockchain transactions, the private key is used to generate the signature necessary to pay the currency to prove the ownership of the funds. The private key must always be kept confidential, because once leaked to a third party, it is equivalent to the other party directly obtaining all the assets under the protection of the private key. It is different from Keystore. Keystore is an encrypted private key file. If the password strength is strong enough, even if a hacker gets the Keystore, it is difficult to crack.
The private key is not actually stored on the network, but is instead generated by the user and stored in a file or a simple database called a wallet. The private key stored in the user's wallet is completely independent and can be generated and managed by the user's wallet software without blockchain or network connection. The user's wallet address is generated by the private key using elliptic curve encryption to generate a public key, which in turn generates a 42-bit address starting with 0x. The style of the private key is a 64-bit hexadecimal hash string.