CST 428_Module 1
CST 428_Module 1
BLOCKCHAIN TECHNOLOGIES
S8 CSE ELECTIVE
MODULE 1
Lecture 1
Introduction to Cryptography
Introduction to Cryptography
• Cryptosystem: A method of disguising messages so that only certain people can see
through the disguise.
• Cryptography: the art of creating and using a cryptosystem.
• Cryptanalysis: the art of breaking cryptosystems—seeing through the disguise even
when you’re not supposed to be able to.
• Cryptology: the study of both cryptography and cryptanalysis.
• The art and science of concealing the messages to introduce secrecy in information
security is recognized as cryptography.
Tutorial 1
• Write a program in python to implement a Caesar Cipher. Include
comment line explaining the working of each block/function
Core principles of modern-day cryptography.
“STRONGER” ALGORITHMS
⮚DES – No longer considered safe
WEAK ALGORITHMS ⮚Triple-DES
⮚Classical substitution and transposition ciphers ⮚AES (Rijndael)
⮚IDEA
⮚RC5, RC6
⮚Blowfish
⮚Many others
Encryption & Decryption
Key (K)
C = EK (P)
Same
Key (K)
Ciphertext (C) Decrypt (D) Plaintext (P)
P = DK (C)
P = DK (EK (P))
AES- Advanced Encryption Standard
• The Advanced Encryption Standard (AES) was published by NIST
(National Institute of Standards and Technology) in 2001.
• AES is a symmetric block cipher that is intended to replace DES as
the approved standard for a wide range of applications.
• For block cipher the size of cipher text should be same as plane
text.
• Also known as Rijndael algorithm
• AES uses a block size of 128 bits
• converts these individual blocks using keys of 128, 192, and 256
bits
• Once it encrypts these blocks, it joins them together to form the
cipher text based on a substitution-permutation network, known
as SP network
AES- Advanced Encryption Standard
AES- Advanced
Encryption
Standard
Lecture 3
Asymmetric Cryptography
Public-Key Cryptosystems
• Asymmetric algorithms rely on one key for encryption and a different but related
key for decryption. These algorithms have the following important characteristic:
• It is computationally infeasible to determine the decryption key given only
knowledge of the cryptographic algorithm and the encryption key.
The sender and receiver must share the The sender and receiver must each have
algorithm and the key. one of the matched pair of keys (not the
same one).
Applications for Public-Key Cryptosystems
• Encryption/decryption: The sender encrypts a message with the recipient's public
key.
• Digital signature: The sender "signs" a message with its private key. Signing is
achieved by a cryptographic algorithm applied to the message or to a small block of
data that is a function of the message.
• Key exchange: Two sides cooperate to exchange a session key. Several different
approaches are possible, involving the private key(s) of one or both parties.
RSA
■ Developed in 1977 by Ron Rivest, Adi Shamir, and Len Adleman at MIT.
■ Public-key encryption technique used for secure data transmission
especially over the internet
RSA
Question
■ Explain public key cryptosystem. Perform encryption and
decryption using RSA for p=3, q=11, e= 7 and M=5
Lecture 4
Elliptic curve Cryptography
Elliptic curve Cryptography(ECC)
• ECC is a Asymmetric/Public key Cryptosystem
• It generates security between key pairs for public key encryption by using the mathematics of elliptic
curves.
• ECC is an alternative technique to RSA
• The biggest difference between ECC and RSA is the greater cryptographic strength that ECC offers
for equivalent key size.
• An ECC key is more secure than an RSA key of the same size.
Elliptic curve Cryptography(ECC)
• It makes use of Elliptic Curves
• Standard form of Elliptic curves are:
• An elliptic curve for current ECC purposes is a plane curve over a
finite field which is made up of the points satisfying the
equation:
y²=x³ + ax + b
• a, b are constants
• equation is of 3rd degree
Properties of Elliptic curves
■ Message authentication code - uses the message authentication function on the plain
text along with the key to generate fixed length code. This fixed length code will be
appended with the message and send to the receiver for authentication
■ hash function do not use the key for generating the fixed length code
Secure Hash Function in Block Chain
• Each block in the blockchain contains the hash of the previous block header
within its header.
• This ensures that changing a single block in the blockchain without detection is
impossible.
• Modifying one block in the chain requires generating new versions of every
following block as well, increasing the difficulty and helping to preserve the
integrity of the blockchain’s digital ledger
Secure Hash Function in Block Chain
Some of the most common uses of hash function in blockchain include:
• Digital signatures: Hash functions are a vital part of digital signature algorithms,
summarizing the data to a compact value while preserving its integrity. Digital signatures
are used for preserving data integrity and authentication for blockchain transactions and
blocks
• Merkle trees: Merkle tree summarizes a list of transactions contained within a block into
a single value within a block header. They use hash functions to ensure that it is infeasible
to find two Merkle trees with the same root hash. This way, by storing the root hash
within a block header and protecting the integrity of the block header, the integrity of the
transactions contained within the block’s body is protected as well
• Proof of Work consensus: The Proof of Work consensus algorithm defines a valid block
as one whose header has a hash value less than a given threshold.
SHA- 256