Question: Please write your code in R and submit your script and results for each of the following. Create an integer vector S with values from

Please write your code in R and submit your script and results for each of the following.

  1. Create an integer vector S with values from 1-5. Swap elements 1 and 4. [Hint: use the swap() function in package seqinr.
  2. Create a binary stream of bits for the string "Parabola".
  3. Create an initialized S vector for RC4.
  4. Create an initialized K vector for RC Assume that key is the UTF8 code of "Complete".
  5. Using the RC4 algorithm randomize S with 256 iterations.
  6. Using the RC4 algorithm generate a key stream of 128 bits starting with the output vector S in question 4. Assume that the key is "Complete".
  7. Implement RC4 for generating key streams. You function should contain two parameters: a seed and a key length.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!