Answered step by step
Verified Expert Solution
Question
...
1 Approved Answer
Alice and Bod have decided to use a symmetric encryption algorithm. They have some assumptions about their messages: - Messages only contain capital letters (
Alice and Bod have decided to use a symmetric encryption algorithm. They have some assumptions about their messages: Messages only contain capital letters ie A to Z The length of their shared key must be greater than or equal to the length of the plaintext They assign each letter a number as follows: ABCDZ Their algorithm combines the key and the message using modular addition. The numerical values of corresponding message and key letters are added together, modulo For example, if the plain text is HELLO and the key is SECRET then the encrypted message is calculated as following: Since the length of the plaintext is we just need the first letters of the key ieSECRE then for each letter, we should add corresponding letters in both the plaintext and the key modulo Plaintext: H E L L O Key: S E C R E Cipher: Z I N C S a Write a program in Python, CC or JavaScript to take both the plaintext and the key as its input, then print out the cipher. Assume the plaintext is your name, for the keyTHISISANEXAMPLEKEYINCOMPUTERSECURITYEXAM what is the output?
Alice and Bod have decided to use a symmetric encryption algorithm. They have some
assumptions about their messages:
Messages only contain capital letters ie A to Z
The length of their shared key must be greater than or equal to the length of the plaintext
They assign each letter a number as follows: ABCDZ
Their algorithm combines the key and the message using modular addition. The numerical values
of corresponding message and key letters are added together, modulo For example, if the plain
text is HELLO and the key is SECRET then the encrypted message is calculated as following:
Since the length of the plaintext is we just need the first letters of the key ieSECRE then
for each letter, we should add corresponding letters in both the plaintext and the key modulo
Plaintext: H E L L O
Key: S E C R E
Cipher: Z I N C S
a Write a program in Python, CC or JavaScript to take both the plaintext and the key as
its input, then print out the cipher. Assume the plaintext is your name, for the
keyTHISISANEXAMPLEKEYINCOMPUTERSECURITYEXAM what is the
output?
Step by Step Solution
There are 3 Steps involved in it
Step: 1
![blur-text-image](https://dsd5zvtm8ll6.cloudfront.net/includes/images/document_product_info/blur-text-image.webp)
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](https://dsd5zvtm8ll6.cloudfront.net/includes/images/document_product_info/blur-subtext-image.webp)
Step: 3
![blur-text-image](https://dsd5zvtm8ll6.cloudfront.net/includes/images/document_product_info/blur-subtext-image.webp)
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started