Hi everyone, I need some helps in my security class.
hey did u get it figured out yet

?
this is the project:
Write a program that calculates the CRC-16 of a given file and appends it to the end of the same file. Your program must also be able to verify the correctness of a given file that already has CRC appended at the end. Use the CRC polynomial x^16 + x^10 + x^8 + x^7 + x^3 + 1.
C language is the only programming language that I know (and I'm not really gud at it) this project is too hard for me, and I dont know where to start
This is the sample:
The input file (hex): AB1245
The input file (bin):
1010 1011 0001 0010 0100 0101
The polynomial that was used (binary bit string): 1 1111 1011
We will append eight zeros at the end of the binary input.
The binary string answer at each XOR step of CRC calculation:
1010 1011 0001 0010 0100 0101 0000 0000
0101 0110 1001 0010 0100 0101 0000 0000
0010 1000 0101 0010 0100 0101 0000 0000
0001 0111 0011 0010 0100 0101 0000 0000
0000 1000 1000 0010 0100 0101 0000 0000
0000 0111 0101 1010 0100 0101 0000 0000
0000 0000 1011 0110 0100 0101 0000 0000
0000 0000 0100 1011 1100 0101 0000 0000
0000 0000 0011 0101 0000 0101 0000 0000
0000 0000 0000 1010 0110 0101 0000 0000
0000 0000 0000 0101 1011 1101 0000 0000
0000 0000 0000 0010 0101 0001 0000 0000
0000 0000 0000 0001 1010 0111 0000 0000
0000 0000 0000 0000 0101 1100 0000 0000
0000 0000 0000 0000 0010 0010 1100 0000
0000 0000 0000 0000 0001 1101 1010 0000
0000 0000 0000 0000 0000 0010 0001 0000
0000 0000 0000 0000 0000 0001 1110 0110
0000 0000 0000 0000 0000 0000 0001 1101
Thus, the CRC is 0001 1101 (bin) = 1D (hex)
CRC has been appended to the end of the input file.
Reading input file again: AB12451D
Closing input file.
Thanks