Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Class notes

Basic understanding of blockchain technology

Rating
-
Sold
-
Pages
13
Uploaded on
18-05-2021
Written in
2020/2021

It is a manual created from lectures which describes the basic understanding of Blockchain Technology and a general way of creating smart contracts.

Institution
Course

Content preview

Blockchain Technology and Creating Smart Contracts


Introduction to Blockchain:
Blockchain is a list or chain of records called blocks which are linked and secured by cryptography.
Record is the data which is stored in the form of a block and are secured by cryptography method and are
linked together by a cryptographic link. A block contains data, hash of the data and a previous hash. The
block in the blockchain has a block number or block id, nonce (number used only once), data, hash,
previous hash, time stamp (shows the time at which the block is created) and data. The first block in a
blockchain is called genesis block.
Blockchain is a secure technology used for transactions (transfer of any type of data). The link in the
blockchain is given by the previous hash value. If the hash of a current block and hash of previous data in
the next block are not same, the cryptographic link will break.
Now we will discuss some of the terminologies of the blockchain that are mentioned above.

Nonce:
It means “number used only once”. Size of nonce will be fixed and miners change this nonce by solving a
cryptographic puzzle. In bitcoin, the number of zeros are fixed in hash and these zeros denote difficulty
level. The less the number of zeros, the more is the difficulty level. It is required for miners to change the
nonce in order to get the required number of zeroes in the hash, this is called cryptographic puzzle. Once
the cryptographic puzzle is solved by the miner, then they will be able to deploy a block. If two miners
solve the cryptographic puzzle at the same time, then one with more resources will take the lead.

Hash:
Hash is like a function in which the data is passed and the result is a fixed length hexadecimal value (64
characters) or a function that maps variable length data into fixed length output. The hash is always
unique for a block unless the same person is cloned. The probability of having same hash is 1 in 60
million which is almost negligible. Many hashing methods are used but for blockchain, we use sha256.
Sha256 will be a combination of characters 0-9 and A-F and it is 256 bit. Hash functions are irreversible.
The genesis block will have a zero value for the previous hash as it is the first block.
The requirements for hash algorithms or its characteristics are:
• One way: Since, hash is a mapping technique so it maps the variable length data to fix length
output but the reverse is not true because it is mapping technique and not like encryption.
• Deterministic: The output will be the same if two people have the same data and created at the
same time or when a person is cloned.
• Fast computation: Hash is developed as the data is typed.
• Avalanche effect: A small change in the data will modify the entire hash value.

, Transaction:
Transaction means transfer of data. For example, to deploy an application, to create any smart
contract, or creating and deploying dummy cryptocurrency. Transactions can be financial or non-
financial.
Financial transaction: The financial transaction includes transfer of amount, bitcoins or ethers.
Nonfinancial transaction: The non-financial transactions does not include transfer of money. Its
applications include blockchain based Electronic voting machine (EVM), supply chain etc.

Cryptocurrency:
Cryptocurrency is the medium of exchange, created and stored electronically in the blockchain using
encryption techniques to control the creation of monetary units and verify the transfer of funds.
Bitcoin and ethers are best known examples of cryptocurrency.
Cryptocurrency uses cryptography to generate digital signatures. Digital signature is a combination of
public and private key which combine with smart contract and which when verified, then the
transaction will take place.
Private key is used both for encrypting and decrypting data and shared between sender and receiver of
the encrypted sensitive information. It is also called symmetric as being common for both parties.
From private key one can retrieve account.
Public key is used to encrypt, and for decryption it uses private key. It is not shared between sender
and receiver.
The following figure shows the encryption and decryption of a message by public and private keys.


Sender Receiver
This is a private Encryption Encrypted Encryption This is a private

Key of blockchain Algorithm Message Algorithm key of blockchain



Unencrypted message Receiver’s public key Receiver’s private key Unencrypted message




Decentralized distributed peer to peer:
Blockchain supports decentralized distributed peer to peer network. In decentralized distributed peer to
peer network, every user in itself is a master. Resources can be shared if the nodes agree to it. Multiple
copies of data will be created and each node in peer to peer blockchain will have all the information of
transaction in order to validate the transaction.

Written for

Institution
Course

Document information

Uploaded on
May 18, 2021
Number of pages
13
Written in
2020/2021
Type
Class notes
Professor(s)
Engineering
Contains
All classes

Subjects

$7.99
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
SilverStar007 UET
Follow You need to be logged in order to follow users or courses
Sold
12
Member since
5 year
Number of followers
12
Documents
7
Last sold
2 year ago
Electrical Engineering

Solution manuals of different subjects related to Electrical Engineering. I also provide freelancing services. I write review papers and assignments.

5.0

1 reviews

5
1
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions