On 12/19/05, Richard Levitte - VMS Whacker <[EMAIL PROTECTED]> wrote: > unsigned char foo[8]; > > (no, it isn't fool proof, but close enough after 1 second of thought).
I think C guarantees that a char is a byte, but exactly how wide that is is processor-dependent. IIRC, some of the machines it was developed on had less than 8 bits per byte, but I could be wrong. Surely a smaller byte is antiquated, but a wider char is certainly conceivable. Things don't really get messy until you start converting types or communicating them to another machine. At that point, you really want to know if your int is 32 bits or 64, big or little endian, etc. OTOH, if C was truly as portable as is claimed, GNU autoconf wouldn't exist. Scripts are fairly portable; I can run bash scripts in cygwin, I can run perl scripts using activeperl. None have required modification so far, though some use libraries ("modules") that aren't available on the target. I realized halfway through this that I was thinking of applications that use crypto, and not crypto algorithms per se. But pretty much we sound like we're in agreement on most things. -- http://www.lightconsulting.com/~travis/ -><- P=NP if (P=0 or N=1) "My love for mathematics is like 1/x as x approaches 0." GPG fingerprint: 50A1 15C5 A9DE 23B9 ED98 C93E 38E9 204A 94C2 641B --------------------------------------------------------------------- The Cryptography Mailing List Unsubscribe by sending "unsubscribe cryptography" to [EMAIL PROTECTED]