Blockchain Technology
Dr. Kaushal Shah
Assistant Professor
Computer Engineering
PDPU
The compilation of the PPTs is from the source:
All the different articles and research papers available on internet and NPTEL
Outline for Today
• Building Blocks of Blockchain Technology
What is Cryptography?
• Plaintext
• Encryption
• Ciphertext
• Decryption
Encryption, Decryption
Encryption, Decryption using Key
Symmetric Key Cryptography
• The encryption and the decryption key are the
same
• Techniques based on a combination of
substitution and permutation
• Stream ciphers: operate on single bit or byte
• Block ciphers: operate on blocks (typically
64/128/256… bits)
• Advantage: simple, fast
• Disadvantage: key exchange, key management
• Examples: DES,RC4, IDEA, Blowfish, AES, etc
Issues
• No. of keys required for N parties?
Issues (contd.)
What is Assured?
• Confidentiality
– is assurance that only owners of a shared secrete
key can decrypt a message that has been
encrypted with the shared secrete key
• Authentication
– is assurance of the identify of the person at the
other end of the line (use challenge and response
protocols
What is Assured? (contd.)
• Integrity
– is assurance that a message has not been changed
during transit and is also called message
authentication (use message fingerprint)
• Non repudiation
– is assurance that the sender cannot deny a file
was sent. This cannot be done with secrete key
alone (need trusted third party or public key
technology)
Public Key Cryptography
Goal
• Suppose Alice has a channel for
communicating with Bob
• Alice and Bob wish to use this channel to
establish a shared secret
• However, Eve is able to learn everything sent
over the channel
• If Alice and Bob have no other channel to use,
can they establish a shared secret that Eve
does not know?
Basic Idea
• A public key is used to encrypt a message that can be
decrypted only by the matching private key
• Bob can use Alice’s public key to encrypt messages.
Only Alice can decrypt the message
• Similarly, Alice can also use Bob’s public key
• Alice and Bob exchange information, each keeping a
secret to themselves
• The secrets that they keep allow them to compute a
shared secret
• Since Eve lacks either of these secrets she is unable to
compute the shared secret
Public Key Algorithms
• Encryption key is different from decryption key
• one cannot be calculated from other
• Encryption key is often called the public key and
decryption key is often called the private key
• Advantages: better key management
• Disadvantages: slower, more complex
• Examples: RSA, Diffie‐Hellman, El Gamal, etc.
Hash Functions in Cryptography
• Takes an arbitrary length string as input
• Produces a fixed‐size output (e.g 256 bits)
– Almost impossible to reverse
– Easy to compute
Properties related to Security
• Collision‐resistant
• Puzzle‐friendly
• Hides the original String
– Almost impossible to get the original string from
the output
Collision Resistance
• It is computationally NOT feasible to find x and
y such that
x != y and H(x)=H(y)
Is Collision Possible?
• For a weak hash function collisions may be
feasible to find
• Examples of hash functions for which
collisions are found feasibly:
MD‐5, SHA‐1
Collision Finding
• Are there any hash functions for which
efficient collision finding algorithms exist?
– For some H
– But for others none known yet (SHA‐256, SHA3
etc)
• No H has been proven collision‐free
• Many H has been proven to have collisions.
Examples: SHA‐1
Application of Hash
• Hash as message digest
• If we know H(x) = H(y),
– it’s safe to assume that x = y.
• To recognize a file that we saw before,
– just remember its hash.
• Useful because the hash is small.
Questions???