Date: Thu, 23 Jan 1997 11:31:20 -0700 (MST) From: Terry Lambert <terry@lambert.org> To: msmith@atrad.adelaide.edu.au (Michael Smith) Cc: hackers@FreeBSD.ORG Subject: Re: CRC-16 algorithms? Message-ID: <199701231831.LAA24098@phaeton.artisoft.com> In-Reply-To: <199701231259.XAA21523@genesis.atrad.adelaide.edu.au> from "Michael Smith" at Jan 23, 97 11:29:27 pm
next in thread | previous in thread | raw e-mail | index | archive | help
> (Yes, this is FreeBSD-related 8) > > I'm looking for any implementations of various CRC-16 polynomials; I'm > trying to compute a checksum for a parameter save area for a > peripheral, which is documented as "CRC-16", but no details of the > polynomial are given. 8( > > If you're into cracking these sorts of things, here's the parameter space : > > 00000000 00 39 3c 3e 01 02 03 00 80 00 00 00 00 00 00 00 |.9<>............| > 00000010 08 00 0e 20 3d 4b 00 00 00 00 00 00 00 02 01 00 |... =K..........| > 00000020 01 03 00 de ad 01 00 00 00 00 00 00 00 00 00 01 |....-...........| > 00000030 00 00 00 00 00 00 00 00 00 00 00 00 01 26 3c aa |.............&<.| > > The bytes at 0x3d and 0x3e are the CRC-16 of the bytes from 0-0x3c > inclusive. Any help here will help make the DOS configuration utility > for this device unnecessary, which would be nice 8) Brute-force it; there are only 65536 * 2 * 4^2 possibilities, and of these, there are only 32768 "likely" values (non-reflected, polynomial value ends in 1, W XOR value is all 0's). Here is a pointer to code for generalized CRC algorithms: http://www.strangecreations.com/strange/library/misc/crc.txt It also contains code for table generation for building a table-driven implementation once you find the correct polynomial. Regards, Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199701231831.LAA24098>