January 2019
Beginner to intermediate
372 pages
11h 17m
English
As we have covered digital signatures and the public-private key in the previous chapter, we are already aware of the properties and security of digital signatures. To recap, they provide a way for a node that possesses the private key to sign a message to prove their identity. This can then be verified by anyone who has access to the distributed public key.
An identity is created by generating a public-private key pair. This is similar to creating an account in the blockchain network. The following code shows how a public-private key pair is generated by the ecdsa Python package using an elliptic curve:
import binascii from ecdsa import SigningKey, VerifyingKey, SECP256k1, keys class Wallet: def __init__(self): self.private_key ...