Question: write a python function to implement a checksum algorithm known as Alder-16. The following is a description of this algorithm modified from the Wikipedia entry
write a python function to implement a checksum algorithm known as Alder-16. The following is a description of this algorithm modified from the Wikipedia entry about Adler-32:
In class this week we developed 8-bit and 16-bit checksum algorithms, each of which had problems when considering them to be used for a digital signature in an investigation. For this homework assignment, you will write a python function to implement a checksum algorithm known as Alder-16. The following is a description of this algorithm modified from the Wikipedia entry about Adler-32: An Adler-16 checksum is obtained by calculating two 8-bit checksums A and B and concatenating their bits into a 16-bit integer. A is the sum of all bytes in the stream plus one, and B is the sum of the individual values of A from each step. At the beginning of an Adler-16 run, A is iniialized to 1, B to 0. The sums are done modulo 251 (he largest prime number smaller than 2. The function may be expressed as A 1 D1 +D2+ Dn (mod 251) BD+DD2)(DD2D (mod 251) Adler, 16(D) = 8 x 256 + A You can read about a variation of this algorithm and see an example of how it is computed here: A few notes about the pseudocode above: 1.D1, D2. etc. are the decimal values of the characters in the input string. So, just as we did in the checksum algorithm we did in class, you will have to get the ASCll value of each character and convert it to decimal. 2. B is computed by accumulating the values of A Write a function to compute the Alder-16 checksum for a given string. You can modify the 8-bit checksum algorithm that we developed in class to implement this Alder-16 algorithm. You can find the checksum8.py algorithm on the Sample Code page after class on Tuesday. Your output will look something like this: >>>checksumAdler160' CHECKSUM 21342 checksumAdler16C'DIGITALFORENSICS' 62655 checksumAdler16C'EVIDENCE 36686
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
