Lecture 13
Lecture 13
PUBLIC KEY
CRYPTOGRAPHY
Prof. Saurabh Kulkarni
Department of Artificial Intelligence & Data Science
RC5 ALGORITHM
• RC5 is a symmetric key block encryption algorithm
designed by Ron Rivest in 1994
• Simple, fast, and consumes less memory
• RC5 is a block cipher and addresses two word blocks at a
time
• Depending on input plain text block size, number of rounds
and key size, various instances of RC5 can be defined and
each instance is denoted as RC5-w/r/b where w=word size
in bits, r=number of rounds and b=key size in bytes
RC5 ALGORITHM
RC5 ALGORITHM
• Since at a time, RC5 uses 2 word blocks, the plain text block size can be
32, 64 or 128 bits
• Initialization of constants P and Q
• RC5 makes use of 2 magic constants P and Q whose value is defined by
the word size w
RC5 ALGORITHM
CONVERTING SECRET KEY K
FROM BYTES TO WORDS
• Secret key K of size b bytes is used to initialize array L
consisting of c words where c = b/u, u = w/8 and w =
word size used for that particular instance of RC5
• For example, if we choose w=32 bits and Key k is of size
96 bytes then, u=32/8=4, c=b/u=96/4=24
• L is pre initialized to 0 value before adding secret key K to
it
INITIALIZING SUB-KEY S
• Sub-key S of size t=2(r+1) is initialized using magic
constants P and Q
SUB-KEY MIXING
• RC5 encryption algorithm uses Sub key S
• L is merely, a temporary array formed on the basis of
user entered secret key
• Mix in user’s secret key with S and L
ENCRYPTION
• We divide the input plain text block into two registers A
and B each of size w bits
• After undergoing the encryption process the result of A
and B together forms the cipher text block
ENCRYPTION
PRINCIPLES OF PUBLIC- KEY
CRYPTOSYSTEMS
• 2 problems associated with symmetric encryption
1. Key distribution under symmetric encryption
2. Digital signature
PRINCIPLES OF PUBLIC- KEY
CRYPTOSYSTEMS
PRINCIPLES OF PUBLIC- KEY
CRYPTOSYSTEMS
TERMINOLOGIES
• Plaintext: This is the readable message or data that is fed into the
algorithm as input
• Encryption algorithm: The encryption algorithm performs
various transformations on the plaintext
• Public and private keys: This is a pair of keys that have been
selected so that if one is used for encryption, the other is used for
decryption
• Ciphertext: This is the encrypted message produced as output
• Decryption algorithm: This algorithm accepts the ciphertext and
the matching key and produces the original plaintext
ESSENTIAL STEPS
• Each user generates a pair of keys to be used for the encryption
and decryption of messages
• Each user places one of the two keys in a public register or other
accessible file. This is the public key. The companion key is kept
private
• If Bob wishes to send a confidential message to Alice, Bob encrypts
the message using Alice’s public key
• When Alice receives the message, she decrypts it using her private
key. No other recipient can decrypt the message because only Alice
knows Alice’s private key
COMPARISON OF SYMMETRIC
AND PUBLIC KEY
ENCRYPTION
PUBLIC-KEY CRYPTOSYSTEM:
CONFIDENTIALITY
PUBLIC-KEY CRYPTOSYSTEM:
AUTHENTICATION
PUBLIC-KEY CRYPTOSYSTEM:
AUTHENTICATION
• Digital signature
• Role of authenticator