Blockchain Module 2
Blockchain Module 2
MODULE-2
SRINIVAS P M
1
Structure of bitcoin
First, let us see that what the main components of a Bitcoin network are. Bitcoin is
composed of the elements
listed here. We will further expand on these elements as we progress through the
chapter.
Digital keys
Addresses
Transactions
Blockchain
Miners
The Bitcoin network
Wallets (client software)
Cryptography
1. Key establishment,
2. Digital signatures,
3. Identification,
4. Encryption,
5. Decryption.
Mathematical functions public key cryptography algorithms
1. Integer Factorization
2. Discrete Logarithm
3. Elliptic Curves
The RSA Algorithm
ECC Diffie–Hellman Key Exchange
Hash functions
SHA-256 has the input message size < 264-bits. Block size is 512-
bits, and it has a word size of 32-bits. The output is a 256-bit digest.
The compression function processes a 512-bit message block and a
256-bit intermediate hash value. There are two main components of
this function: the compression function and a message schedule.
1. Pre-processing:
1. Padding of the message is used to adjust the length of a block to
512-bits if it is smaller than the
required block size of 512-bits.
2. Parsing the message into message blocks, which ensures that the
message and its padding is divided into equal blocks of 512-bits.
3. Setting up the initial hash value, which consists of the eight 32-bit
words obtained by taking the first 32-bits of the fractional parts of the
square roots of the first eight prime numbers. These initial values are
randomly chosen to initialize the process, and they provide a level of
confidence that no backdoor exists in the algorithm.
2. Hash computation:
4. Each message block is then processed in a sequence, and it requires
64 rounds to compute the full hash output. Each round uses slightly
different constants to ensure that no two rounds are the same.
5. The message schedule is prepared.
6. Eight working variables are initialized.
7. The intermediate hash value is calculated.
8. Finally, the message is processed, and the output hash is produced:
One round of a SHA-256 compression function
Merkle trees
Financial markets and trading
Financial markets enable trading of financial securities such as bonds,
equities, derivatives and currencies. There are broadly three types of
markets: money markets, credit markets, and capital markets:
Money markets: These are short-term markets where money is lent to
companies or banks to do interbank lending. Foreign exchange or FX is
another category of money markets where currencies are traded.
Credit markets: These consist mostly of retail banks where they borrow
money from central banks and loan it to companies or households in the
form of mortgages or loans.
Capital markets: These facilitate the buying and selling of financial
instruments, mainly stocks and bonds. Capital markets can be divided into
two types: primary and secondary markets. Stocks are issued directly by
the companies to investors in primary markets, whereas in secondary
markets, investors resell their securities to other investors via stock
exchanges. Various electronic trading systems are used by exchanges
today to facilitate the trading of financial instruments.