Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Sam wants to leave a secret message for Kim. They share an office on different s

ID: 3661781 • Letter: S

Question

Sam wants to leave a secret message for Kim. They share an office on different shifts in the data backup and recovery division of the Umbrella Corporation. They will leave a post-it note in the top drawer of a filing cabinet they share if they want to give each other a secret message. Each can check when they arrive on their shift, however Malfoy can snoop on them and read the message that is left for each because the top drawer of the filling cabinet is unlocked.

They decide to use a locking solution on the filing cabinet drawer. However, they only want one key each, and NOT the shared keys for the lock. Kim says why don’t they use two locks, but she cannot figure out how to lock the drawer without a hidden key to her lock and Sam’s lock put somewhere that Malfoy cannot find. If they drawer on the filing cabinet can accommodate two locks, how can this be solved?

Write an ALGORITHM that solves the problem with Kim and Sam only having one key to their respective lock, and there are no keys to the locks hidden from Malfoy. The algorithm should also solve the problem of communicating between Kim and Sam that one of them left a message for the other by virtue of using the locks and the single filing cabinet drawer. Hint: it should be atlest 15 to 20 lines. Thanks

Explanation / Answer

The message can be encrypted using the symmetric key algorithm involving a single key to be shared between kim and sam to encrpyt or decrypt a message .A simple algorithm for encryption will be a subtitution algorithm with the help of the key.For example the common key 4 can be shared and lept secret between sam and kim

now the original message= MEET NOW

now we can use a key=4 which will produce a ciphertext.

ciphertext= (plaintext +key )% 26 ( every alphabet will be substituted by alphabet present 4 alphabets ahead of it)

M->(12+4)%26=>16=>Q

E->(4+4)%26=>8=>I

T->(19+4)%26=>23=>X

N->(13+4)%26=>17=>R

O->(14+4)%26=>18=S

W->(22+4)%26=>0=>A

So the ciphertext becomes: QIIX   RSA

0    1    2    3   4   5   6     7     8    9    10    11    12    13     14   15    16    17     18    19   20   21    22   23   24   25

A    B   C   D   E F   G    H     I     J     K      L      M     N      O     P     Q      R      S     T     U    V      W    X    Y    Z

The common key used here is 4 which is known only to kim and sam. kim and same can use this key to decrypt the message kept in the drawer.

They have to keep the message inside as the ciphertext as =>QIIX   RSA

on receiving it one of them can use the common key=>4 to decrypt and know the message

The formula to convert ciphertext to plaintext is:

plaintext=(ciphertext-key)%26

This will give one of them the original text(plaintext)=>MEET NOW

This encryption converts the message into a secret message that can be encrypted or decrypted using a common key only known to both of these people.It will be difficult for people other than sam and kim to understand the message.This ensures secrecy of data and confidentiality as well. Sam and kim can encrypt as many messages as they want by using this key of change the number of the key and use the same formula .

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote