• Home
  • Blog
  • Anyone could help with computer theory assignement (Encryption and decryption involved)

Anyone could help with computer theory assignement (Encryption and decryption involved)

0 comments

PLEASE DO NOT BID UNLESS YOU ARE EXPERIENCED WITH IT.

Here are the guidelines on what should be done(Also check attachments):

So basically you need to create a super large text file that needs to be the size of 1024 bytes x 100, so 102,400 characters. The client program will read in each increments of 1024 bytes (characters) 100 times.

We’re gonna start off with the following:

– M = buffer (1024 characters)

– ciphertext C = Enc(k, M) //this Enc function is provided in the crypto.cpp file so we can copy and paste it from there, but the parameters k and M need to be added in, and the k (key) can be made a golbal variable

Then this is what we have to code:

1. When the first buffer (one string of 1024 characters) is read, it is encrypted into ciphertext Ci. So the first buffer is C1.

2. The client always encrypts a message here using (1) a ciphertext and (2) a MAC (message authentication code) for extra security. This MAC function takes Ci and makes Si. So MAC(C1) = S1.

3. So now the second buffer (the next string of 1024 characters) will be read and encrypted into ciphertext C2, so MAC(C2) = S2.

4. Next, we need to aggregate (concatenate) all the S that have been produced up until now via hash function, so H(S1 || S2) = S1,2. This hash function can be found here on page 41: https://www.co.tt/files/libTomCryptDoc.pdf.

5. Now the third buffer (the third string of 1024 characters) will be read and be encrypted into ciphertext C3, so MAC(C3) = S3.

6. Then, H(S1,2 || S3) = S1, S3. We repeat this loop until we get to S1,100 (bc we’re gonna do read 100 strings total). So for example, it’ll be

K = abcd…(some key as global variable)

for(i=0; i<100; i++) {

K = H(k)

Ci = (K, mi)

}

7. We’re gonna do this process in both client code and server code and check to see if S1,100 in client is equal to S1,100 in server (to verify if the actual message that’s being recieved is the correct message). If it’s correct, then we’re gonna decrypt it with the provided decryption function he provides.

The earlier you finish it, the better.

PLEASE DO NOT BID UNLESS YOU ARE EXPERIENCED WITH IT.

About the Author

Follow me


{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}