Question: Task 1 ( Encryption and Decryption ) Task 1 objective Encrypt and decrypt using an XOR logical operator. Encrypting a message Select a secret one
Task Encryption and Decryption
Task objective
Encrypt and decrypt using an XOR logical operator.
Encrypting a message
Select a secret "one English word" message. Keep it secret.
Create a secret one English word key. For simplicity, use the same length of the word key as the message. For example, if the message is "Hello," select a key size equal to characters, such as "March."
Apply XOR bitwise operation between the message and the key.
Decrypting a message
Use the "encrypted message" and the "secret key" and perform the bitwise XOR operation.
Verify that the decrypted message is the same as the "plain text".
Output to display
The output should be saved in a text file outputtxt For example:
Plain text: HELLO
Key: world
Encrypted text:
Decrypted text: HELLO
The plain text and key are case sensitive The encrypted text should display the result in printable ASCII characters. If you notice that there is a nonprintable character right after which is a space. The XOR of L and l comes out to be in decimal which corresponds to a space in ASCII.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
