Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* cksum(1) on DEC OSF/1
@ 1995-06-14  4:00 Neil Schellenberger
  1995-06-14  4:00 ` Mark Charette
  0 siblings, 1 reply; 4+ messages in thread
From: Neil Schellenberger @ 1995-06-14  4:00 UTC (permalink / raw)



Does anybody know what algorithm is used by /bin/cksum to compute CRCs?
I've tried it out on both 2.1 and 3.0 machines both of which give the same
results.  These results differ from both a) the NetBSD cksum and b) what I
would expect based on the Posix 1003.2 algorithm.  Can anyone shed some
light?  Am I just doing something wrong?

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."



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: cksum(1) on DEC OSF/1
  1995-06-14  4:00 cksum(1) on DEC OSF/1 Neil Schellenberger
@ 1995-06-14  4:00 ` Mark Charette
  1995-06-14  4:00   ` Neil Schellenberger
  0 siblings, 1 reply; 4+ messages in thread
From: Mark Charette @ 1995-06-14  4:00 UTC (permalink / raw)


Neil Schellenberger (schellen@kafka.mpr.ca) wrote:

: Does anybody know what algorithm is used by /bin/cksum to compute CRCs?
: I've tried it out on both 2.1 and 3.0 machines both of which give the same
: results.  These results differ from both a) the NetBSD cksum and b) what I
: would expect based on the Posix 1003.2 algorithm.  Can anyone shed some
: light?  Am I just doing something wrong?

Did you try man cksum ? It gives the polynomial used (along with other 
interesting info) on OSF/1 3.0 and 3.2.
--------------------------------------------------------------------------------
Mark Charette                       "Don't crush that dwarf; hand me the pliers"
MIKA Systems, Inc.                   - Firesign Theater
17197 N. Laurel Park Dr Suite 115
Livonia, MI 48152                    charette@mika.com



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: cksum(1) on DEC OSF/1
  1995-06-14  4:00 ` Mark Charette
@ 1995-06-14  4:00   ` Neil Schellenberger
  1995-06-18  4:00     ` Sam Weiner
  0 siblings, 1 reply; 4+ messages in thread
From: Neil Schellenberger @ 1995-06-14  4:00 UTC (permalink / raw)



>>>>> "MC" == Mark Charette <charette@ultoe.det.dec.com> 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."



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: cksum(1) on DEC OSF/1
  1995-06-14  4:00   ` Neil Schellenberger
@ 1995-06-18  4:00     ` Sam Weiner
  0 siblings, 0 replies; 4+ messages in thread
From: Sam Weiner @ 1995-06-18  4:00 UTC (permalink / raw)


In article <SCHELLEN.95Jun14114116@kafka.mpr.ca> schellen@kafka.mpr.ca (Neil Schellenberger) writes:
:
:>>>>> "MC" == Mark Charette <charette@ultoe.det.dec.com> 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.
:
[sad story deleted -smw]
At the bottom of the man cksum page is a reference to sum.  The man page
for sum talks about providing both BSD and SVID2 style checksums.  Perhaps
thia would help (not knowing NetBSD's algorithm?)  As you said, love
those standards.

	Sam



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1995-06-18  4:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1995-06-14  4:00 cksum(1) on DEC OSF/1 Neil Schellenberger
1995-06-14  4:00 ` Mark Charette
1995-06-14  4:00   ` Neil Schellenberger
1995-06-18  4:00     ` Sam Weiner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox