From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,4ee5ec97eefd3551 X-Google-Attributes: gidfee84,public From: schellen@kafka.mpr.ca (Neil Schellenberger) Subject: Re: cksum(1) on DEC OSF/1 Date: 1995/06/14 Message-ID: #1/1 X-Deja-AN: 104453613 distribution: world references: <3rmsjb$cml@eccdb1.pms.ford.com> organization: MPR Teltech Ltd. newsgroups: comp.unix.osf.osf1 >>>>> "MC" == Mark Charette writes: MC> Neil Schellenberger (schellen@kafka.mpr.ca) wrote: MC> : Does anybody know what algorithm is used by /bin/cksum to compute CRCs? MC> : I've tried it out on both 2.1 and 3.0 machines both of which give the same MC> : results. These results differ from both a) the NetBSD cksum and b) what I MC> : would expect based on the Posix 1003.2 algorithm. Can anyone shed some MC> : light? Am I just doing something wrong? MC> MC> Did you try man cksum ? It gives the polynomial used (along with other MC> interesting info) on OSF/1 3.0 and 3.2. Actually that's where I started this sad and rather painful journey. I've implemented the algorithm exactly as it is described. My code generates CRCs which are the same as those generated by NetBSD's cksum(1). (I grabbed the [publicly available] NetBSD cksum(1) source from an FTP site somewhere.) The OSF/1 cksum(1) in /bin steadfastly generates something different. I've resorted to trying variations on the theme in an attempt to devine the algorithm used. I've tried not inverting the result; I've tried starting with all CRC bits set; and I've tried reversing the bytes before computing and reversing the result (pkzip uses this approach). No dice. I guess I'm just experiencing the beauty of standards: there are just so darn many to choose from. Sigh. Anyway, COULD SOME KIND SOURCE LICENSE POSSESSING SOUL PLEASE TELL ME THE ALGORITHM ACTUALLY USED? Please don't violate any applicable copyright laws and/or your license agreement in the process: I don't want to incite the legalcritters! Regards, Neil -- Neil Schellenberger | Voice : (604) 293-5438 MPR Teltech Ltd. | Fax : (604) 293-5787 8999 Nelson Way, Burnaby, BC | E-Mail: schellen@mpr.ca Canada, V5A 4B5 | -or- mprgate.mpr.ca!schellen@uunet.uu.net "Now that's Art! Even if it does jiggle."