0% found this document useful (0 votes)
18 views33 pages

Unit 1

The document provides an overview of the role of cryptography in blockchain technology, highlighting its importance for securing transactions and data integrity. It discusses different types of cryptography, including symmetric and asymmetric methods, as well as hashing techniques used in blockchain. Additionally, it covers the concept of cryptocurrency, its benefits, and the distinctions between centralized, decentralized, and distributed systems.

Uploaded by

anushkarokade21
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views33 pages

Unit 1

The document provides an overview of the role of cryptography in blockchain technology, highlighting its importance for securing transactions and data integrity. It discusses different types of cryptography, including symmetric and asymmetric methods, as well as hashing techniques used in blockchain. Additionally, it covers the concept of cryptocurrency, its benefits, and the distinctions between centralized, decentralized, and distributed systems.

Uploaded by

anushkarokade21
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 33

UNIT I

Role of Cryptography
in Blockchain
Introduction to Cryptography

 Blockchain Technology is based on three


main pillars;
 Distributed ledger,
 Peer-to-peer network,
 Cryptographic security.
 The successful and safe working of a
distributed ledger system and the point-to-
point network is impossible without a robust
security technique.
Introduction to Cryptography

 Cryptography is a method of securing data


from unauthorized access.
 Cryptography is used to secure transactions
taking place between two nodes in a blockchain
network.
 Blockchain uses two types of security
approaches - Cryptography and Hashing.
 Cryptography is used to encrypt messages in a
P2P network.
 Hashing is used to secure the block information
and the link blocks in a blockchain.
Types of Cryptography
 Cryptography are further divided into
two parts:

 Symmetric-key cryptography.

 Asymmetric-key cryptography.
Symmetric-key
cryptography

 It is also described as secret key


cryptography.
 Both parties have the same key to keep the
secret.
 It is suitable for bulk encryption.
 It requires less processing power and faster
Asymmetric-key cryptography
(Public Key Cryptography)

 Encryption method uses different keys for encryption


and decryption.
 Encryption method uses public key and private key
methods.
 Public key method helps completely unknown parties
share information like email ID.
 Private key helps to decrypt the messages and also
helps in verifying the digital signature.

Hash Cryptography Function in the
Blockchain

 Cryptographic hashing refers to coding the


information or data on blockchain into an
unreadable, unhackable text.
 This is done using a special kind of hashing
algorithm known as SHA-256 (Secure Hash
Algorithm).
 It creates a 32-byte long hash value.
 The hash is always of a fixed length no matter
what the length of the input value.
 But it is impossible to have the same hash
values for different inputs.
Hash Cryptography Function in the
Blockchain

 If Input data is “dataflair” the hash value


will be
 “07e42324292ec3bfc150958da854dd8d0
357b021dc5e4cfd75e65eed43bfe382”
 But if we change our input to “DataFlair”
with two letters made capital, the hash
will be:
 “64a5c3aade499eabcc677bd5445c84636
ea64fbf0c7c01a49e469ff05da179ef”
Wallets and Digital Signatures

 A blockchain wallet is a software


(e.g. Electrum, Bitcoin core) or even a special
hardware device (e.g. Trezor, Ledger) that is
used to keep transaction information and
personal information (private and public key)
of the user.
 Important ,wallets do not contain actual
currency in it (e.g. Bitcoin, Ethereum).
 Wallets are just a secure place to keep one’s
keys (especially private keys) and maintain a
transaction balance.
Wallets and Digital Signatures

 That is, a wallet is only a communication tool and


the blockchain stores the real
information/data/currency in blocks.
 Digital signature is like proof that given to the
receiver and the entire network that nodes are a
legitimate node in the blockchain network.
 When a node initiate a transaction with another
node, node (Sender) have to create a unique
digital signature by combining node transaction
data and node private key using a special
algorithm.
 This will guarantee the authenticity of sender
node and the integrity of the information.
Cryptographic Algorithm
 Symmetric Cryptography :
 Symmetric Ciphers are two types :
 Stream Ciphers and Block Ciphers.
 RC4 and A5 are commonly used stream
ciphers.
 Data Encryption Standard (DES) and
Advanced Encryption Standard (AES)
are common examples of block ciphers.
Cryptographic Algorithm
 Stream ciphers :
 A stream cipher is a algorithm of encrypting text
(to produce ciphertext) in which a cryptographic
key and algorithm are applied to each
binary digit in a data stream, one bit at a time.
 Two types of stream ciphers: synchronous and
asynchronous.
 Synchronous stream ciphers are ones where key
stream is dependent only on the key.
 Asynchronous stream ciphers have a key stream
that is also dependent on the encrypted data.
Cryptographic Algorithm
 In stream ciphers, encryption and decryption are
basically the same function I.e. XOR operation.
Cryptographic Algorithm
 Block ciphers :
 Encryption algorithms that break up a text to be
encrypted (plain text) into blocks of fixed length
and apply encryption block by block.
 Block ciphers are usually built using a design
strategy known as Fiestel cipher.
 Fiestel ciphers are based on the Fiestel network,
which is a structure developed by Horst Fiestel.
 Structure is based on the idea of combining
multiple rounds of repeated operations to achieve
desirable cryptographic properties knows as
confusion and diffusion.
Cryptographic Algorithm
 DES is a prime example of Fiestel based ciphers
Cryptographic Algorithm
 Simplified operation of a block cipher
 Modes of operation for block ciphers are
Electronic Code Book (ECB), Cipher block
chaining (CBC), Output Feedback Mode
(OFB), or Counter mode (CTR).
 Block encryption mode
 Plaintext is divided into blocks of fixed length
depending on the type of cipher used and
then the encryption function is applied on
each block.
 Keystream generation modes
 The encryption function generates a
Cryptographic Algorithm
 Message authentication modes
 A message authentication code is computed
as a result of an encryption function.
 MAC is basically a cryptographic checksum
that provides an integrity service.
 Cryptographic hashes
 Hash functions are basically used to
compress a message to a fixed length
digest.
 Mode in which, block ciphers are used as a
compression function to produce a hash of
Cryptographic Algorithm
 Electronic code book
 This is a basic mode of operation in which
the encrypted data is produced as a result
of applying the encryption algorithm one by
one separately to each block of plain text.
Cryptographic Algorithm
 Cipher block chaining
 Each block of plain text is XORed with the
previous encrypted block.
 The CBC mode uses initialization vector IV
to encrypt the first block.
 It is recommended that IV be randomly
chosen.
Cryptographic Algorithm
 Counter mode :
 CTR mode effectively uses a block cipher as
a stream cipher.
 In this case, a unique nonce is supplied that
is concatenated with the counter value in
order to produce a key stream.
Cryptographic Algorithm
 Symmetric cryptography
 Data Encryption Standard (DES)
 Advanced Encryption Standard (AES)
 Asymmetric cryptography:
 RSA, DSA, and El-Gammal.
Cryptocurrency
 Cryptocurrency, sometimes called crypto-currency or
crypto, is any form of currency that exists digitally or
virtually and uses cryptography to secure
transactions.
 Cryptocurrencies don't have a central issuing or
regulating authority, instead using a decentralized
system to record transactions and issue new units.
 Transfer cryptocurrency funds, the transactions are
recorded in a public ledger.
 Cryptocurrency is stored in digital wallets.
 The first cryptocurrency was Bitcoin, which was
founded in 2009 and remains the best.
Cryptocurrency
 Cryptocurrencies run on a distributed public
ledger called blockchain, a record of all
transactions updated and held by currency
holders.
 Units of cryptocurrency are created through
a process called mining, which involves
using computer power to solve complicated
mathematical problems that generate
coins.
 Users can also buy the currencies from
brokers, then store and spend them using
cryptographic wallets.
Cryptocurrency
 Ethereum:
 Developed in 2015, Ethereum is a blockchain platform
with its own cryptocurrency, called Ether (ETH) or
Ethereum. It is the most popular cryptocurrency after
Bitcoin.
 Litecoin:
 This currency is most similar to bitcoin but has moved
more quickly to develop new innovations, including
faster payments and processes to allow more
transactions.
 Ripple:
 Ripple is a distributed ledger system that was
founded in 2012. Ripple can be used to track different
kinds of transactions, not just cryptocurrency.
Cryptocurrency
 Benefits :
 Funds transfer between two parties will be easy without
the need of third party like credit/debit cards or banks.
 It is a cheaper alternative compared to other online
transactions.
 Funds transfer are completed with minimal processing
fees.
 A cryptocurrency transaction is generally a quick and
straightforward process.
 Example, Bitcoins can be transferred from one digital
wallet to another, using only a smartphone or
computer.
Cryptocurrency
 Benefits :
 Every cryptocurrency transaction is recorded in
a public list called the blockchain, which is the
technology that enables its existence.
 Blockchain aims to cut out intermediaries, such
as banks and online marketplaces, which
means there are no payment processing fees.
 Cryptocurrency payments are becoming more
widely used, amongst large organizations, and
in sectors including fashion and
pharmaceuticals.
Centralized vs Decentralized vs Distrib
uted Systems
Centralized vs Decentralized vs Distrib
uted Systems
Centralized Decentralized Distributed Sy
stems
 Simple  Less likely to  Fault-tolerant
Deployment. fail than  Transparent
 Can be centralized and secure
developed system.  Promotes
quickly  Better resource
 Affordable to performance sharing.
maintain.  Allows for a  Extremely
 Practical when more diverse scalable.
data needs to and more
be controlled flexible
centrally. system.
Centralized vs Decentralized vs Distrib
uted Systems
Centralized Decentralized Distributed Sy
stems
 Prone to  Security &  More difficult
failure. Privacy risks to deploy.
 Higher to users.  Higher
security &  Higher maintenance
privacy risks maintenance cost.
to users. cost.
 Longer access  Inconsistent
times to data performance
for users who when not
are far from properly
the server. optimized.
Elliptic Curve Cryptography

 Elliptic Curve Cryptography (ECC) is a key-based


technique for encrypting data.
 ECC focuses on pairs of public and private keys for
decryption and encryption of web traffic.
 ECC is frequently discussed in the context of the
Rivest–Shamir–Adleman (RSA) cryptographic
algorithm.
 ECC, an alternative technique to RSA, is a powerful
cryptography approach.
 It generates security between key pairs for public
key encryption by using the mathematics of elliptic
curves.
Elliptic Curve
Cryptography
Elliptic Curve
Cryptography
 ECC bases its approach to public key
cryptographic systems on how elliptic curves
are structured algebraically over finite fields.
 Therefore, ECC creates keys that are more
difficult, mathematically, to crack.
 For this reason, ECC is considered to be the
next generation implementation of public key
cryptography and more secure than RSA.
 ECC is increasingly in wider use as websites
strive for greater online security in customer
data and greater mobile optimization
Elliptic Curve
Cryptography
 An elliptic curve is a plane curve over a
finite field which is made up of the points
satisfying the equation:
y²=x³ + ax + b.

You might also like