Re: Looking for a practical checksum algorithm
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


sci.crypt archive

Re: Looking for a practical checksum algorithm

From: daniel bleichenbacher <daniel_bleichenbacher@yahoo.com>
Date: Mon Oct 10 2005 - 15:31:18 CEST

kent@cpttm.org.mo wrote:
> Hi,
>
> We are a training course provider. For each course we have a list of
> questions for those potential participants to assess themselves against
> the pre-requisites of the course. The issue there is how to let them
> check how many questions they have got right. We don't want to provide
> the answers to the questions otherwise they may just look at the
> answers.
> So, I am thinking of providing a simple checksum function to them on
> paper so that they can hand calculate the result, then compare it to a
> list of results that looks like:
>
> 84, 735, 56, 937 => four questions correct
> 77, 785, 2, 465 => three questions correct
> ...
>
> The criteria are:
> 1. The checksum must be easy enough to be hand-calculated. We
> will provide an online verification tool but we can't force
> the people to check it online.
> 2. Checksum collisions should be minimized (there are at most 8
> questions).
> 3. It doesn't have to a one-way function. The people are not
> rocket scientists. They are just ordinary people.
> 4. The result may tell how many questions are correctly answered or
> tell true (>=50% correct) or false (<50% correct). Either way is
> OK.
>
> Any idea? Thanks in advance!

A simple scheme might be this:
Choose a modulus, say N = 91.
Give each answer a say 5 digit value, which is a multiple of N plus
the score of the answer (e.g. 372*91 + 0 for a wrong answer or
235*91+1 for a correct answer).

To compute the result each participant computes the sum of the values
of his answers. Then multiplies the result by 11. Then reduces that
result
by 11*N (=1001). I.e a 6 digit number abcxyz reduced by 1001 simply
is
xyz-abc. Divide the result by 11 to get the score. If the last division
fails then this should indicate an computation error.

Of course, this assumes that the students don't reduce the values of
each
answers by 91 to check which ones are correct.
Received on Sat Oct 15 04:39:02 2005