From mboxrd@z Thu Jan 1 00:00:00 1970 To: 9fans@cse.psu.edu Date: Wed, 16 Jan 2008 09:43:04 +0000 From: "Douglas A. Gwyn" Message-ID: <478D1CF9.47DE6163@null.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit References: <20080112190615.5E7541E8C3A@holo.morphisms.net> Subject: Re: [9fans] snap checksum Topicbox-Message-UUID: 2ef1e320-ead3-11e9-9d60-3106f5b1d025 > sumr computes the same function as > plan 9's sum -r, which is also the same function as > seventh edition's sum. i have always assumed the -r > stood for "research" as in research unix, although > the plan 9 manual describes it as "system v's sum -r" and > other manuals describe it as the "historical bsd algorithm." > it does seem to have appeared first in v7. The "-r" option was added to the System V "sum", which by default actually does a true modulo 2^16 sum of the bytes, to obtain the Research version. However, I think the "r" may have been meant as a mnemonic for "rotating" rather than "Research"; the "-r" algorithm rotates the accumulator as the bytes are added to it. Of course neither of these is as reliable as a polynomial- based (feedback shift register) checksum for actual checksumming applications.