Documente Academic
Documente Profesional
Documente Cultură
Due Friday, October 25 at 8:30 am You are welcome to collaborate with your classmates on the assignments. However, you must write up your solution yourself. Be sure to acknowledge your collaborators for each problem that you submit. Be sure to acknowledge any other resources you used for each problem, such as a book, paper or other resources. The assignment is due at the start of class on October 25. You can submit a hard-copy in class or electronically submit a PDF to cuLearn. Your submission should be typeset or written very neatly. The assignment has 4 problems and 40 possible marks.
RC4
RC4 Key-schedule algorithm (input: key) --------------------------------------------------for i from 0 to 255 do S[i] := i end for j := 0 for i from 0 to 255 do j := (j + S[i] + key[i % key.length]) % 256 swap values of S[i] and S[j] end for ---------------------------------------------------
RC4 Key-stream generator (input: S[0],...,S[255]) --------------------------------------------------i := 0 j := 0 while NeedMoreBytes do i := (i + 1) % 256 j := (j + S[i]) % 256 swap values of S[i] and S[j] K := S[(S[i] + S[j]) % 256] output K end while ---------------------------------------------------