cryptography
Perform cryptanalysis to recover the plain text in a Caesar cipher system if the cipher text is “UPN HQJLQHHULQJ FROOHJH”. Use Bruteforce and frequency analysis and compare the complexity of the same.
Perform cryptanalysis to recover the plain text in a Caesar cipher system if the cipher text is “UPN HQJLQHHULQJ FROOHJH”. Use Bruteforce and frequency analysis and compare the complexity of the same.
Plaintext: "RMK ENGINEERING COLLEGE" (Caesar key = 3).
Caesar cipher: \(C = (P + k) \bmod 26\), so decryption is \(P = (C - k) \bmod 26\).
1. Brute-force attack
Try every key \(k = 1, 2, \dots, 25\) and look for meaningful English. For the first word UPN:
Applying each key to the whole message, only \(k = 3\) gives readable text:
(\(k = 1\) gives "TOM GPIKPGGTKPI EQNNGIG", which is meaningless after the first word.)
2. Frequency analysis
Count letters in the ciphertext: H = 5, Q = 3, J = 3, U = 2, L = 2, O = 2, others 1. The most common letter in English is E, so assume H → E. The shift is \(H - E = 7 - 4 = 3\). Decrypting with \(k = 3\) gives RMK ENGINEERING COLLEGE immediately. (The doubled letters OO → LL and the pattern of HQJLQHHULQJ also fit "ENGINEERING".)
3. Comparison of complexity
| Point | Brute force | Frequency analysis |
|---|---|---|
| Work | Up to 25 trial decryptions of \(n\) letters: \(O(25n)\) | One counting pass \(O(n)\) plus 1–3 trial decryptions |
| Needs | Only the ciphertext and a way to recognise plaintext | Enough ciphertext for letter statistics to be reliable |
| Reliability | Always succeeds (key space only 25) | May guess wrong on very short texts; try the next most frequent letters (T, A, O) |
Both are easy because the Caesar key space is tiny, which is why the Caesar cipher is insecure.
Log in or create a free account to answer this question.