Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The decryption algorithm for the affine cipher is defined below D([a,b],C) = a^-1(C - b) mod 26 where a^-1 is the modular multiplicative inverse of

The decryption algorithm for the affine cipher is defined below

D([a,b],C) = a^-1(C - b) mod 26

where a^-1 is the modular multiplicative inverse of a modulo 26. That is, it satisfies the equation aa^-1 = 1 mod 26. Now, implement the encryption function for the affine cipher. Assume that a message is encrypted using the affine cipher and the resulting ciphertext is as follows

'fmxv ceotx oc txy qkndlot!'

You can assume that the key consists of a pair of integers (a, b), both in {1,...,25} with a not divisible by 2 or 13. Also, the function should work on strings, and leave any non-alphabetic characters unchanged. What would be the values of m and key k in the above case? (Hint: you need to do an exhaustive search or brute force attack over all possible keys.)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions