Download Cryptography: Principles, Techniques, and Applications and more Slides Digital Communication Systems in PDF only on Docsity!
Encryption and Decryption
Unit - V
Security Goals
Consider the following security risks that could face two
communicating entities in an unprotected environment:
A B
C could view the secret message by eavesdropping on the communication. Loss of privacy / confidentiality
C
(1)^ m
A m B
A might repudiate having sent m to B
Hence, some possible goals for communication:
- Privacy/confidentiality - information not disclosed to unauthorized entities
- Integrity - information not altered deliberately or accidentally
- Authentication - validation of identity of source of information
- Non-repudiation – Sender should not be able to deny sending a message
(4)
What is Cryptography
Cryptography is the study of mathematical techniques related
to aspects of information security such as confidentiality, data
integrity, authentication, and non-repudiation.
Attack classification
(encryption)
(key)
C
P
Ciphertext Alone attack: The attacker has available only the
intercepted cryptogram C.
From C , try to find P or (even better) the key.
Attack classification
Known Plaintext attack: The attacker knows a small amount of
plaintext (Pi) and its ciphertext Equivalent (Ci).
(encryption)
(key)
Ci
Pi
Ci+
Pi+
Attacker tries to find key or to infer Pi+1 (next plaintext)
Forms of Cryptosystems
- Private Key (symmetric) :
- A single key ( K ) is used for both encryption and decryption and must
be kept secret.
- Key distribution problem a secure channel is needed to transmit the
key before secure communication can take place over an unsecure
channel.
(encryption)
( K )
C M (decryption) M
Sender Receiver
( K )
E K (M) = C D K (C) = M
Forms of Cryptosystems
- Public Key (asymmetric):
- The encryption procedure (key) is public while the decryption procedure (key) is private.
- Each participant has a public key and a private key.
- May allow for both encryption of messages and creation of digital signatures.
Combining Public/Private Key Systems
- Public key encryption is more expensive than symmetric key encryption
- For efficiency, combine the two approaches
- Use public key encryption for authentication; once authenticated, transfer a shared secret symmetric key
- Use symmetric key for encrypting subsequent data transmissions
A (2) B
Rivest Shamir Adelman (RSA) Method
Named after the designers: Rivest, Shamir, and Adleman
Public-key cryptosystem and digital signature scheme.
Based on difficulty of factoring large integers
For large primes p & q, n = pq Public key e and private key d calculated
Rivest Shamir Adelman (RSA) Method
Assume A wants to send something confidentially to B:
- A takes M, computes C = Me^ mod n, where (e, n) is B’s public key. Sends C to B
- B takes C, finds M = Cd^ mod n, where (d, n) is B’s private key
A
M e^ mod n C d^ mod^ n
Encryption Key for user B
(B’s Public Key)
Decryption Key for user B
(B’s PrivateKey)
C
( e, n ) ( d, n )
B
M M
+ Confidentiality
RSA Method
Example:
- p = 5, q = 11 and n = 55. (p1)x(q1) = 4 x 10 = 40
- A valid d is 23 since GCD(40, 23) = 1
- Then e = 7 since: 23 x 7 = 161 modulo 40 = 1
in other words
e = 23-1^ (mod 40) = 7
Digital Signatures (Public Key)
sender, A: (EA : public, DA : private)
receiver, B: (EB : public, DB : private)
- A signs the message m using its private key, the result is then encrypted
with B’s public key, and the resulting ciphertext is sent to B:
- C= EB (DA (M))
- B receives ciphertext C decrypts it using its private key, the result is then
encrypted with the senders public key (A’s public key) and the message m
is retrieved.
Hashing
- A one-way hash function h is a public function h (which should be simple and fast to compute) that satisfies three properties:
- A message m of arbitrary length must be able to be converted into a message digest h(m) of fixed length.
- It must be one-way, that is given y = h(m) it must be computationally infeasible to find m.
- It must be collision free, that is it should be computationally infeasible to find m and m2 such that h(m1) = h(m2).
Examples: MD5 , SHA-