Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Homework: Decrypt an encrypted tex file Link to encrypted tex file: https://drive.google.com/open?id=1gZCujDYmEL-FZ5o_xBUS-Ng5979HSsZ7 This homework is a practical cyber-security problem where you will attempt to break

Homework: Decrypt an encrypted tex file

image text in transcribed

Link to encrypted tex file: https://drive.google.com/open?id=1gZCujDYmEL-FZ5o_xBUS-Ng5979HSsZ7

This homework is a practical cyber-security problem where you will attempt to break the code that has been implemented using a pseudo-random number generator. The LaTeX source of your homework has been encrypted using the following C program and can be found here (https://drive.google.com/open?id-1gZCuiDYmEL-FZ5?x8US-Ng5979HSSZ7 ) Note that based on Kerckhoff's Principle, the encryption algorithm is public The homework was generated using the following code The ISO/IEC 9899:1990 edition of the C standard */ #define RAND MAX 32767 static unsigned long int next = 1; int rand (void) // RAND MAX assumed to be 32767 next next 1103515245 12345 return (unsigned int)(next/65536) ? 32768; void srand (unsigned int seed) next seed: #include #include /Return a byte at a time of the rand) keystream char randchar static int keyi static int i = 0; if (1-0) key= rand(); return ((char y) it+i int main(int argc, const char argv) static char randstate [64] srand (time (NULL) EILE input, output: input= fopen ? "Homework?b.tex", "r"); output fopen/ "Homework 1b-tex-enc", "w") ; int c, rc: while cfgetc (input)) EOF) rc=ranachar ) ; printf {"c-fd (%c) fputc crc, output and rc d ", c, c,rc); fclose (input) fclose (output) Hint: The original file was in LaTeX This homework is a practical cyber-security problem where you will attempt to break the code that has been implemented using a pseudo-random number generator. The LaTeX source of your homework has been encrypted using the following C program and can be found here (https://drive.google.com/open?id-1gZCuiDYmEL-FZ5?x8US-Ng5979HSSZ7 ) Note that based on Kerckhoff's Principle, the encryption algorithm is public The homework was generated using the following code The ISO/IEC 9899:1990 edition of the C standard */ #define RAND MAX 32767 static unsigned long int next = 1; int rand (void) // RAND MAX assumed to be 32767 next next 1103515245 12345 return (unsigned int)(next/65536) ? 32768; void srand (unsigned int seed) next seed: #include #include /Return a byte at a time of the rand) keystream char randchar static int keyi static int i = 0; if (1-0) key= rand(); return ((char y) it+i int main(int argc, const char argv) static char randstate [64] srand (time (NULL) EILE input, output: input= fopen ? "Homework?b.tex", "r"); output fopen/ "Homework 1b-tex-enc", "w") ; int c, rc: while cfgetc (input)) EOF) rc=ranachar ) ; printf {"c-fd (%c) fputc crc, output and rc d ", c, c,rc); fclose (input) fclose (output) Hint: The original file was in LaTeX

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

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

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions