Skip to Content
Foundations of Blockchain
book

Foundations of Blockchain

by Koshik Raj
January 2019
Beginner to intermediate
372 pages
11h 17m
English
Packt Publishing
Content preview from Foundations of Blockchain

Creating an identity

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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Blockchain Basics

Blockchain Basics

Daniel Drescher
What Is Blockchain?

What Is Blockchain?

Sir John Hargrave, Evan Karnoupakis
Mastering Blockchain

Mastering Blockchain

Lorne Lantz, Daniel Cawrey

Publisher Resources

ISBN: 9781789139396Supplemental Content