Cryptography-Digest Digest #962, Volume #9       Sat, 31 Jul 99 22:13:04 EDT

Contents:
  Re: How to write REALLY PORTABLE code dealing with bits (Was: How Big is a Byte?) 
([EMAIL PROTECTED])
  Re: cryptography tutorials (spike)
  Re: OTP export controlled? ([EMAIL PROTECTED])
  Re: How to write REALLY PORTABLE code dealing with bits (Was: How Big is a Byte?) 
(Peter Seebach)
  Re: OTP export controlled? ([EMAIL PROTECTED])
  Re: How to write REALLY PORTABLE code dealing with bits (Was: How Big is a Byte?) 
("Trevor L. Jackson; III")
  Re: How to write REALLY PORTABLE code dealing with bits (Was: How Big  ("Douglas A. 
Gwyn")
  Re: bits and bytes ("Douglas A. Gwyn")
  Re: How to write REALLY PORTABLE code dealing with bits (Was: How Big is a Byte?) 
("Trevor L. Jackson; III")
  Re: OTP export controlled? ("Douglas A. Gwyn")
  Re: OTP export controlled? ("Douglas A. Gwyn")
  Re: cryptography tutorials ("Douglas A. Gwyn")
  Re: Americans abroad/Encryption rules? (Johnny Bravo)
  Re: How Big is a Byte? (was: New Encryption Product!) ("Trevor L. Jackson; III")
  Re: the defintion of Entropy ("Douglas A. Gwyn")
  Re: How Big is a Byte? (was: New Encryption Product!) ("Trevor L. Jackson; III")
  Re: What the hell is XOR? ([EMAIL PROTECTED])
  Re: Looking for RC4 alternative ([EMAIL PROTECTED])
  Re: With all the talk about random... ("Trevor L. Jackson; III")
  Re: Modified Vigenere cipher ("Douglas A. Gwyn")
  Re: Looking for RC4 alternative ([EMAIL PROTECTED])
  Re: How to write REALLY PORTABLE code dealing with bits (Was: How Big is  ("Douglas 
A. Gwyn")
  Re: Modified Vigenere cipher ("Douglas A. Gwyn")
  Re: Modified Vigenere cipher (JPeschel)
  Re: How Big is a Byte? (was: New Encryption Product!) ("Douglas A. Gwyn")

----------------------------------------------------------------------------

From: [EMAIL PROTECTED]
Crossposted-To: alt.folklore.computers,alt.comp.lang.learn.c-c++,comp.lang.c++
Subject: Re: How to write REALLY PORTABLE code dealing with bits (Was: How Big is a 
Byte?)
Date: Sat, 31 Jul 1999 23:52:26 GMT

In article <[EMAIL PROTECTED]>,
  [EMAIL PROTECTED] (Robert Stonehouse) wrote:

> The word 'byte' is an artificial word, introduced by IBM in 1964
> specifically to denote the 8-bit character used in System/360. IBM's
> definition is the definitive one.

One misconception down one to go.

C's char != byte.

Lesson done.  Back to crypto now right?

Tom
--
PGP key is at:
'http://mypage.goplay.com/tomstdenis/key.pgp'.
Free PRNG C++ lib:
'http://mypage.goplay.com/tomstdenis/prng.html'.


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.

------------------------------

From: spike <[EMAIL PROTECTED]>
Subject: Re: cryptography tutorials
Date: Sat, 31 Jul 1999 16:55:28 -0700
Reply-To: [EMAIL PROTECTED]

JPeschel wrote:

>
> Oh, and don't forget the US Army's Basic Cryptanalysis
> Manual.
>
> Joe
>

Where would one get a copy of this manual ? I`d love to get my hands on
that. Thanks in advance.

Spike


------------------------------

From: [EMAIL PROTECTED]
Crossposted-To: talk.politics.crypto
Subject: Re: OTP export controlled?
Date: Sat, 31 Jul 1999 23:55:37 GMT

In article <[EMAIL PROTECTED]>,
  "Douglas A. Gwyn" <[EMAIL PROTECTED]> wrote:
> /*
> Jerry Park wrote:
> > 'they' can call anything anything 'they' want. Governments often do
> > things like that.
> Even though they make no sense at all.
> For example, here is a quick-and-dirty C program:
> */
> #include <stdio.h>
> int main(int argc, char *argv[]) {
>       int p, k;
>       FILE *kfp = fopen(argv[1],"r");
>       while ((p = getchar()) != EOF && (k = getc(kfp)) != EOF )
>               putchar(k^p);
>       return 0;
> }
> /*
> All it does is simply XOR two files into one.  Whether that
> constitutes a "cryptosystem" depends entirely on how it is applied.
> Have I just violated the US's export regulations by posting this?
> */
>

Well technically you have not supplied a key so it's still useless.  I
wouldn't think crypto-govts can rule on source code like this.

Tom
--
PGP key is at:
'http://mypage.goplay.com/tomstdenis/key.pgp'.
Free PRNG C++ lib:
'http://mypage.goplay.com/tomstdenis/prng.html'.


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.

------------------------------

Crossposted-To: alt.folklore.computers,alt.comp.lang.learn.c-c++,comp.lang.c++
Subject: Re: How to write REALLY PORTABLE code dealing with bits (Was: How Big is a 
Byte?)
From: [EMAIL PROTECTED] (Peter Seebach)
Date: Sun, 01 Aug 1999 00:05:22 GMT

In article <7o027o$u61$[EMAIL PROTECTED]>,  <[EMAIL PROTECTED]> wrote:
>C's char != byte.

True in many cases, but not in C or C++.  In both language specs, 'byte' means
'char'.

-s
-- 
Copyright 1999, All rights reserved.  Peter Seebach / [EMAIL PROTECTED]
C/Unix wizard, Pro-commerce radical, Spam fighter.  Boycott Spamazon!
Will work for interesting hardware.  http://www.plethora.net/~seebs/
Visit my new ISP <URL:http://www.plethora.net/> --- More Net, Less Spam!

------------------------------

From: [EMAIL PROTECTED]
Crossposted-To: talk.politics.crypto
Subject: Re: OTP export controlled?
Date: Sun, 01 Aug 1999 00:02:54 GMT

In article <7nhcd1$ljn$[EMAIL PROTECTED]>,
  "Dale Clapperton" <[EMAIL PROTECTED]> wrote:
> Interesting question...
>
> Would software for implimenting One Time Pad type encryption be export
> controlled?
>
> I mean, if all it's doing is a bit-by-bit XOR with the "pad", how can
they
> call an XOR encryption?

May I ask an important question.  Does anyone care?

Why do people bother with OTPs when there is no science to it.  nothing
to learn.

Quick lesson.  If your ciphertext is pure random garbage then there is
no way to discern it from anyother plaintext.  Provably secure. tada.
simple. no less no more.

More interesting things are keystream generators which are pratical and
could have good security bounds (upper bounds that is).  key stream
generators are also quite quick (I am playing with one at 112Mps in
C).  While there are always methods of 'breaking' keystream generators
if designed well could mean something like '2^83 steps with 2^90
outputs' ...

Tom
--
PGP key is at:
'http://mypage.goplay.com/tomstdenis/key.pgp'.
Free PRNG C++ lib:
'http://mypage.goplay.com/tomstdenis/prng.html'.


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.

------------------------------

Date: Sun, 01 Aug 1999 20:44:09 -0400
From: "Trevor L. Jackson; III" <[EMAIL PROTECTED]>
Crossposted-To: alt.folklore.computers,alt.comp.lang.learn.c-c++,comp.lang.c++
Subject: Re: How to write REALLY PORTABLE code dealing with bits (Was: How Big is a 
Byte?)

[EMAIL PROTECTED] wrote:

> > Oh really.  I'm using 5-bit baudot code on a 12-bit CPU with 6-bit
> > characters.  An 8-bit byte is useless to me.  _*YOUR*_ definition of a
> > byte is not, and never will be definitive.  It is probably based on
> your
> > lack of experience with CPU architectures.
>
> But most (around 90%) of public processors are octet based.  Most
> microcontrollers and desktop computers use that convention.  For
> example if you hooked up a serial port to your processor and a x86 what
> is the length of a character? ...

Look at the spec for the IBM PC serial ports.  They support 5/6/7/8 data
bits, 1/1.5/2 stop bits; 0/1 parity bits.  So that's 24 serial data
formats.  The length of a letter is log(26).

>
>
> > Simply becuase a term is "commonly used" does not mean it has a single
> > interpretation.  Indeed, commonly used terms are often the most easily
> > overloaded.  What does "format" mean?  I know of at least five
> > definitions, and am willing to bet my list is not exhaustive.
>
> I think for the most part we can understand 'byte = octet'.  For the
> few cases it is not you can specify.  I think it would be prudent in
> any document to first specify what your definition of a byte is then
> continue.  Or simply use octet or '8x1 binary matrix' or 'numbers in GF
> (256)' or ...

Of course.  But to force a single definition simply because one is
unfamiliar with other usages is silly.  We know that when someone says
"byte" they probably mean 8 bits.  If they say "character" these days they
could mean 7/ASCII, 8/EBCDIC, 16/unicode, or 32/ISO bits.  They are all in
common usage these days.

But if you mean precisely 8 bits the term is octet not byte.

> > "When I use a word it means exactly what I want it to mean, no more
> and
> > no less."
>
> But 'byte' on a PIC and x86 may mean completely different things.

Sure.  I was quoting Humpty Dumpty from Lewis Carrol to show that language
ain't simple.  Nor is it static.  My grammar instructor would be _shocked_
to see me use "ain't" in public and in "print".  Idioms evolve and mutate.
Byte has done both.


------------------------------

From: "Douglas A. Gwyn" <[EMAIL PROTECTED]>
Crossposted-To: 
alt.folklore.computers,alt.comp.lang.learn.c-c++,comp.lang.c++,microsoft.public.vc.language
Subject: Re: How to write REALLY PORTABLE code dealing with bits (Was: How Big 
Date: Sun, 01 Aug 1999 01:22:08 GMT

John Savard wrote:
> Actually, the word "byte" was invented by IBM, ...

That requires documentation.  We were using "byte" operation
before the S/360.  And certainly the term did *not* apply to
the 1401 etc.

------------------------------

From: "Douglas A. Gwyn" <[EMAIL PROTECTED]>
Subject: Re: bits and bytes
Date: Sun, 01 Aug 1999 01:04:08 GMT

[EMAIL PROTECTED] wrote:
> In C there are no standard bit sizes for any types.  They must only
> hold the required data ranges.  A 'char' must hold at least -127 to
> 128 (or vice versa?), an int must hold at least -32767 to 32768, ...

"char" type must be able to accurately represent EITHER 0..255 OR
-127..127, depending on whether the implementation made it an
unsigned or a signed integer type.  "int" type, which is signed,
must be able to accurately represent -32767..32767.  There are
also other requirements imposed on the types; range is not the
"only" one.

> ...  And please stop the bickering.

Much of what you call "bickering" would be eliminated if less
misinformation were posted.

------------------------------

Date: Sun, 01 Aug 1999 21:08:49 -0400
From: "Trevor L. Jackson; III" <[EMAIL PROTECTED]>
Crossposted-To: alt.folklore.computers,alt.comp.lang.learn.c-c++,comp.lang.c++
Subject: Re: How to write REALLY PORTABLE code dealing with bits (Was: How Big is a 
Byte?)

Oops.  Can't be so English-centric.  The length of a letter depends on the
language.

Trevor L. Jackson; III wrote:

> [EMAIL PROTECTED] wrote:
>
> > > Oh really.  I'm using 5-bit baudot code on a 12-bit CPU with 6-bit
> > > characters.  An 8-bit byte is useless to me.  _*YOUR*_ definition of a
> > > byte is not, and never will be definitive.  It is probably based on
> > your
> > > lack of experience with CPU architectures.
> >
> > But most (around 90%) of public processors are octet based.  Most
> > microcontrollers and desktop computers use that convention.  For
> > example if you hooked up a serial port to your processor and a x86 what
> > is the length of a character? ...
>
> Look at the spec for the IBM PC serial ports.  They support 5/6/7/8 data
> bits, 1/1.5/2 stop bits; 0/1 parity bits.  So that's 24 serial data
> formats.  The length of a letter is log(26).
>
> >
> >
> > > Simply becuase a term is "commonly used" does not mean it has a single
> > > interpretation.  Indeed, commonly used terms are often the most easily
> > > overloaded.  What does "format" mean?  I know of at least five
> > > definitions, and am willing to bet my list is not exhaustive.
> >
> > I think for the most part we can understand 'byte = octet'.  For the
> > few cases it is not you can specify.  I think it would be prudent in
> > any document to first specify what your definition of a byte is then
> > continue.  Or simply use octet or '8x1 binary matrix' or 'numbers in GF
> > (256)' or ...
>
> Of course.  But to force a single definition simply because one is
> unfamiliar with other usages is silly.  We know that when someone says
> "byte" they probably mean 8 bits.  If they say "character" these days they
> could mean 7/ASCII, 8/EBCDIC, 16/unicode, or 32/ISO bits.  They are all in
> common usage these days.
>
> But if you mean precisely 8 bits the term is octet not byte.
>
> > > "When I use a word it means exactly what I want it to mean, no more
> > and
> > > no less."
> >
> > But 'byte' on a PIC and x86 may mean completely different things.
>
> Sure.  I was quoting Humpty Dumpty from Lewis Carrol to show that language
> ain't simple.  Nor is it static.  My grammar instructor would be _shocked_
> to see me use "ain't" in public and in "print".  Idioms evolve and mutate.
> Byte has done both.




------------------------------

From: "Douglas A. Gwyn" <[EMAIL PROTECTED]>
Crossposted-To: talk.politics.crypto
Subject: Re: OTP export controlled?
Date: Sun, 01 Aug 1999 01:08:36 GMT

[EMAIL PROTECTED] wrote:
> Why do people bother with OTPs when there is no science to it.
> nothing to learn.

I don't know what you mean by "no science to it".

The OTP serves as a standard of comparison for cryptosystems,
much as the Shannon limit does for communication channels.
(Both are "ideals" that actual systems can approach, but not reach.)

------------------------------

From: "Douglas A. Gwyn" <[EMAIL PROTECTED]>
Crossposted-To: talk.politics.crypto
Subject: Re: OTP export controlled?
Date: Sun, 01 Aug 1999 01:10:35 GMT

[EMAIL PROTECTED] wrote:
> Well technically you have not supplied a key so it's still useless.

The keys would be provided by the users, as with most computerized
encryption/decryption programs.

------------------------------

From: "Douglas A. Gwyn" <[EMAIL PROTECTED]>
Subject: Re: cryptography tutorials
Date: Sun, 01 Aug 1999 00:51:52 GMT

spike wrote:
> JPeschel wrote:
> > Oh, and don't forget the US Army's Basic Cryptanalysis Manual.
> Where would one get a copy of this manual ?

I think he's referring to FM 34-40-2:
        http://www.umich.edu/~umich/fm-34-40-2/

------------------------------

From: [EMAIL PROTECTED] (Johnny Bravo)
Subject: Re: Americans abroad/Encryption rules?
Date: Sat, 31 Jul 1999 21:04:16 GMT

On 31 Jul 1999 01:48:58 GMT, [EMAIL PROTECTED] (JPeschel)
wrote:

>>If I travel to Germany or the Great Britain, am I, as a US citizen, permitted
>>to use 1000+ key length encryption to send emails to the US?
>
>You should still be able to take strong crypto abroad for personal use. 
>I believe you need to keep notes for five years on how it was used. 
>
>The "personal use" exemption was written a few years ago when ITAR
>still applied, but I believe it is still the rule.
>
>Joe

  Of course you have to comply with the laws of the country you are
bringing the crypto into.  I'm sure there are few countries where
bringing in crypto could get you shot as a spy.

  Johnny Bravo


------------------------------

Date: Sun, 01 Aug 1999 20:56:09 -0400
From: "Trevor L. Jackson; III" <[EMAIL PROTECTED]>
Crossposted-To: alt.folklore.computers
Subject: Re: How Big is a Byte? (was: New Encryption Product!)

Douglas A. Gwyn wrote:

> [EMAIL PROTECTED] wrote:
> >> [BK's] answer to the question of what he'd change if he had to do
> > it all over again that that he would leave the E in the function
> > creat().
>
> That was Ken Thompson, not Brian Kernighan.

I don't recall it being a joint interview.  Now I'll have to go
spelunking and find it.


------------------------------

From: "Douglas A. Gwyn" <[EMAIL PROTECTED]>
Subject: Re: the defintion of Entropy
Date: Sun, 01 Aug 1999 00:56:10 GMT

[EMAIL PROTECTED] wrote:
> If the period of the output is infinit then it's truly random and the
> entropy in bits is inifite as well.  Simple as that.

Nope.  Consider 0101101110111101111101111110...
This has "infinite period" but is very far from random.

------------------------------

Date: Sun, 01 Aug 1999 20:55:12 -0400
From: "Trevor L. Jackson; III" <[EMAIL PROTECTED]>
Crossposted-To: alt.folklore.computers
Subject: Re: How Big is a Byte? (was: New Encryption Product!)

Douglas A. Gwyn wrote:

> Patrick Juola wrote:
> > I can certainly recognize that the zero-based indexing conflicts with
> > standard mathematical practice and is difficult to present to students.
>
> Standard mathematical practice is to index over a discrete set.
> Summations indicate the relevant range for the indices, which
> often start at 0, depending on the application.  And it's
> quite common in relativity work to index 0,1,2,3 with 0 being
> the time coordinate (thus the spatial subspace has indices
> 1,2,3; here is an example of both conventions being used
> simultaneously).
>
> The real lack in C array indexing is a way to specify arbitrary
> upper/lower bounds, stride, etc. and let the compiler do the
> work to index storage efficiently.  (One can do this with macros
> but why should we have to?)  There is a new kind of array in C9x
> that better supports this stuff.

Why do you find arbitrary lower bounds unacceptable?  It's simply an offset
to the index, or in C an offset to the base of the array.  Rather than have
the compiler add the base offset to every index expression why not simply
subtract the offset value from the arrary address?

Example:

element_t _table[ nelement ], *table = _table + offset;

This construction requires both lower as well as upper bounds checking, but
it appears to accomplish the purpose.



------------------------------

From: [EMAIL PROTECTED]
Subject: Re: What the hell is XOR?
Date: Sun, 01 Aug 1999 01:06:02 GMT

In article <7nvpt0$b2a$[EMAIL PROTECTED]>,
  [EMAIL PROTECTED] (Xcott Craver) wrote:
>       But then, there are plenty of good hacks, which I wish people
>       would use more.  And it still matters today in this age of
>       fast CPUs and fast disks, because it's also an age of streaming
>       media.  Especially especially since a lot of the people with the
>       knowledge of image/signal processing to do it right are more EE
>       than CS, and less likely to know tricks which could give them
>       big-time speedup.

Hacks normally are assembler projects.  In C you aim for the
memory/speed trade offs.  Also algorithm design and problem approach
are things people should think of more often.  Sometimes all it takes
is a good algorithm to get things going.  Note that a swap could be
done by

swap(a, b) -> tmp = a; a = b; b = tmp

faster then the xor version anyways (unless you cache the operations in
registers).  The later is normally better and less prone to errors as
you have mentioned.  His 'hack' is not faster and causes errors so I
wouldn't say 'hacks' are a good thing.

Is this OT or what?

Tom
--
PGP key is at:
'http://mypage.goplay.com/tomstdenis/key.pgp'.
Free PRNG C++ lib:
'http://mypage.goplay.com/tomstdenis/prng.html'.


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.

------------------------------

From: [EMAIL PROTECTED]
Subject: Re: Looking for RC4 alternative
Date: Sun, 01 Aug 1999 01:11:48 GMT

In article <7o05i8$3u$[EMAIL PROTECTED]>,
  [EMAIL PROTECTED] wrote:
> But i=j is not a fixed condition.  you could argue when i=-j the
> original RC4 is weaker.

I messed up.  Sorry that should be any S[i] + S[j] = 0 would mean that
RC4 is weaker.  You said that if 'i=j' then S[i] - S[j] = 0, this is a
sort of identity which can hold for any i OR any j.  The same goes for

S[i] + S[j] = 0

which can hold for any i OR any j.  The chances of getting i=j is the
same as getting S[i] + S[j] = 0 for all (i, j) pairs.

I think David might be on to something though, and I would stay away
from changing RC4.

Tom
--
PGP key is at:
'http://mypage.goplay.com/tomstdenis/key.pgp'.
Free PRNG C++ lib:
'http://mypage.goplay.com/tomstdenis/prng.html'.


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.

------------------------------

Date: Sun, 01 Aug 1999 20:59:52 -0400
From: "Trevor L. Jackson; III" <[EMAIL PROTECTED]>
Subject: Re: With all the talk about random...



[EMAIL PROTECTED] wrote:

> > Real random numbers are produced by rolling dice or equivalent
> > methods.
>
> Those are not random either.  Consider physics your algorithm...

Where is Knauer when we need him?



------------------------------

From: "Douglas A. Gwyn" <[EMAIL PROTECTED]>
Subject: Re: Modified Vigenere cipher
Date: Sun, 01 Aug 1999 01:15:31 GMT

Colin Barker wrote:
> Douglas A. Gwyn a écrit dans le message <[EMAIL PROTECTED]>...
> >The simplest technique of significant power is to compute the "average
> >column IC" for the ciphertext stacked at various widths; the actual
> What is the "average column IC" for a ciphertext ?

I gave an example in another recent posting, in the Kryptos thread.
The subject is covered in MilCryp.

------------------------------

From: [EMAIL PROTECTED]
Subject: Re: Looking for RC4 alternative
Date: Sun, 01 Aug 1999 00:49:14 GMT

In article <7nvmuv$e6f$[EMAIL PROTECTED]>,
  [EMAIL PROTECTED] (David Wagner) wrote:
> In article <7nt2ss$fc5$[EMAIL PROTECTED]>,
>  <[EMAIL PROTECTED]> wrote:
> > In the line:
> >         t = (S[i] + S[j]) mod 256
> > the 'a+b' operation could be replaced by 'a-b', 'b-a' or
> > 'a XOR b' with presumably the same result.
>
> I'm not sure this is a good idea.  All of your proposed alternatives
> have the property that t=0 when i=j; this is not true of the original
> RC4, and might make some attack slightly easier (I don't know).  More
> analysis would seem to be prudent before making this change.
>

But i=j is not a fixed condition.  you could argue when i=-j the
original RC4 is weaker.

Tom
--
PGP key is at:
'http://mypage.goplay.com/tomstdenis/key.pgp'.
Free PRNG C++ lib:
'http://mypage.goplay.com/tomstdenis/prng.html'.


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.

------------------------------

From: "Douglas A. Gwyn" <[EMAIL PROTECTED]>
Crossposted-To: 
alt.folklore.computers,alt.comp.lang.learn.c-c++,comp.lang.c++,microsoft.public.vc.language
Subject: Re: How to write REALLY PORTABLE code dealing with bits (Was: How Big is 
Date: Sun, 01 Aug 1999 01:24:28 GMT

John Savard wrote:
> ... But while there are attested usages of the term "byte" for
> things other than an octet, it is not at all clear that they
> are necessarily correct.

It's clear to me, because I was there!

------------------------------

From: "Douglas A. Gwyn" <[EMAIL PROTECTED]>
Subject: Re: Modified Vigenere cipher
Date: Sun, 01 Aug 1999 01:14:09 GMT

JPeschel wrote:
> I think Doug meant Friedman's <i>Military Cryptanalysis</i>.

"MilCryp" in this case denoted the later edition by Callimahos
& Friedman, but the name is also used with the earlier Friedman
version.  Anyone who wants to be a real cryptanalyst must study
this work.

> I don't believe it's on the web.

No, but it's available from Aegean Park Press (via Amazon.com
or directly).  I'm pretty sure the sci.crypt FAQ explains this.

------------------------------

From: [EMAIL PROTECTED] (JPeschel)
Subject: Re: Modified Vigenere cipher
Date: 01 Aug 1999 01:46:06 GMT

[EMAIL PROTECTED] writes:

>"MilCryp" in this case denoted the later edition by Callimahos
>& Friedman, but the name is also used with the earlier Friedman
>version. 

Doug, what is the difference between the editions? Do you think
reading the Friedman edition, rather than Callimahos,  is sufficient?

Joe


__________________________________________

Joe Peschel 
D.O.E. SysWorks                                 
http://members.aol.com/jpeschel/index.htm
__________________________________________


------------------------------

From: "Douglas A. Gwyn" <[EMAIL PROTECTED]>
Crossposted-To: alt.folklore.computers
Subject: Re: How Big is a Byte? (was: New Encryption Product!)
Date: Sun, 01 Aug 1999 01:33:24 GMT

"Trevor L. Jackson; III" wrote:
> Douglas A. Gwyn wrote:
> > The real lack in C array indexing is a way to specify arbitrary
> > upper/lower bounds, stride, etc. and let the compiler do the
> > work to index storage efficiently.  (One can do this with macros
> > but why should we have to?)  There is a new kind of array in C9x
> > that better supports this stuff.
> Why do you find arbitrary lower bounds unacceptable?  It's simply
> an offset to the index, or in C an offset to the base of the array.
> Rather than have the compiler add the base offset to every index
> expression why not simply subtract the offset value from the arrary
> address?

(1) I don't find arbitrary lower bounds unacceptable.  I said that
traditional C lacks a way to specify that.

(2) Adding an offset to the base address (actually should be,
subtracting the lower bound) creates undefined behavior when the
result is not a pointer into the declared array nor the location
just past the last element.  "Numerical Recipes in C" made that
horrible mistake, at least in the first edition, in an attempt
to use C arrays as if they were FORTRAN arrays.

------------------------------


** FOR YOUR REFERENCE **

The service address, to which questions about the list itself and requests
to be added to or deleted from it should be directed, is:

    Internet: [EMAIL PROTECTED]

You can send mail to the entire list (and sci.crypt) via:

    Internet: [EMAIL PROTECTED]

End of Cryptography-Digest Digest
******************************

Reply via email to