Computer Networks · Cryptography and RSA
Cryptography Model: Sender, Encryption Algorithm, Intruders, Receiver and Decryption
Overview
Cryptography converts readable plain text into unreadable cipher text before transmission so that only the intended receiver can recover the original message.
The model explains the roles of the sender, encryption algorithm, communication channel with intruders, receiver, and decryption algorithm, and shows why the encryption must be strong enough to defeat anyone who sees the cipher text.
Key concepts
- Cryptography: the process of converting readable plain text into unreadable cipher text before transmission, so that only the intended receiver can recover the original message.
- Encryption algorithm (encryption procedure): the module/process at the sender side that converts plain text into cipher text.
- Decryption algorithm: the process at the receiver side that converts cipher text back into plain text.
- Intruders: people (or entities) who try to read a message that does not belong to them, in order to gain information for various reasons.
- Passive attackers and active attackers: the two types of intruders (attackers).
- Five parts of the model: sender, encryption algorithm, communication channel (with intruders), receiver, decryption algorithm.
- Naming convention: standard textbook naming uses Alice/Bob; the same roles can be illustrated with Indian names such as Ram (sender) and Bob (receiver).
How it works
- A sender (e.g., Ram) has a message to send; the readable message is the plain text.
- Ram passes the plain text to the encryption algorithm.
- The encryption algorithm converts the plain text into cipher text.
- The cipher text is what is transmitted over the communication channel.
- While travelling on the channel, the cipher text may be seen by intruders — people trying to read a message that does not belong to them, to gain information.
They are of two types: passive attackers and active attackers. - The encryption algorithm must be so strong that even if intruders can see the cipher text, they must not be able to obtain the plain text from it.
- At the receiver end, the received cipher text is passed to the decryption algorithm, which converts it back into plain text.
- The receiver (e.g., Bob) gets the plain text he needs and uses it.
Formulas
- Encryption:
- Decryption:
Comparison
| Direction | Process | Side |
|---|---|---|
| Plain text → cipher text | Encryption algorithm | Sender |
| Cipher text → plain text | Decryption algorithm | Receiver |
Revision summary
- Only the cipher text travels on the communication channel; the plain text is never transmitted.
- Encryption: plain text → cipher text; decryption: cipher text → plain text — do not reverse these.
- Intruders may see the cipher text, but a strong encryption algorithm ensures they cannot recover the plain text.
- Intruders are classified as passive attackers and active attackers (details covered later).
- The model has exactly five parts: sender, encryption algorithm, communication channel (with intruders), receiver, decryption algorithm.
Previous-year exam insights
- The components of the general cryptographic model are: sender, plaintext, encryption algorithm, secret key (shared/private key), ciphertext transmitted over the channel, decryption algorithm, receiver, and the intruder/attacker; the key is separate from the algorithm, and security depends on the key, not on keeping the algorithm secret (Kerckhoffs's principle).
- A passive attacker only observes/eavesdrops on the traffic (release of message contents, traffic analysis) and does not modify it; an active attacker modifies, injects, deletes, replays or masquerades messages (modification, replay, denial of service).
- Symmetric (secret-key) cryptography uses one shared key for both encryption and decryption; asymmetric (public-key) cryptography uses a public key to encrypt and a matching private key to decrypt, and it also provides digital signatures/authentication, which symmetric encryption alone cannot.
- In RSA, n = pq, phi(n) = (p-1)(q-1), the public exponent e is chosen with gcd(e, phi(n)) = 1, and the private exponent d satisfies ed ≡ 1 mod phi(n);
encryption is mod n and decryption is mod n, with M < n. - RSA security rests on the difficulty of factoring the large modulus n into its primes p and q; the primes must be large and kept secret, and the same message must not be sent to many receivers with the same small exponent without padding.
- Classical ciphers: the Caesar cipher is a shift (substitution) cipher with only 25 useful keys and is broken by brute force; Vigenere is polyalphabetic; a transposition cipher permutes the positions of letters without changing them.
Monoalphabetic substitution is broken by frequency analysis; transposition preserves letter frequencies, so it is attacked by anagramming/pattern analysis instead.
Cryptography Model Flow
Drawing the diagram…
Shows the five-part model: sender encrypts plain text to cipher text, which travels the channel watched by intruders, then is decrypted for the receiver.