Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a program in C that implements a bit stream cipher decoder. An elementary level bitstream cipher is an encryption algorithm that encrypts 1 byte
Write a program in C that implements a bit stream cipher decoder. An elementary level bitstream
cipher is an encryption algorithm that encrypts byte of plain text at a time. This cipher uses a
given bit bit pattern as the key. The size of the encrypted message that we want to be able to
send has a maximum length of characters. The bit pattern must be duplicated to an bit
value for this to work. eg if we have the bit pattern then the bit key would be
Here is an example of encryption:
If we have the ASCII value for the letter then that equates to the hex value which
represents the binary value If we bitwise XOR the value with a key, say
then the resulting encrypted value becomes x
Here is an example of decryption:
If we XOR the encrypted value with the key, we get our ASCII back. XOR
becomes or
The bit stream encryption cipher that your program must decode does a little more than this.
After encrypting the value, the program adds an alternating bit rotation twist to the algorithm.
The alternating bit rotation algorithm is such that once you have the encrypted value, it must be
rotated one bit to the left for example, Ob would become b or
The encrypted value for the character of the message would be rotated one bit to the right,
character rotated left, rotated right, and so on As a further example, if is rotated to
the right one position, that would mean b would become b or x
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started