Best array population & access optimization

Mark Brownell gizmotron at earthlink.net
Fri Jun 20 20:44:00 EDT 2003


On Friday, June 20, 2003, at 04:04  PM, Dar Scott wrote:

> Revolution has a base converter function baseConvert().  It takes a 
> numeral (string of bits or digits or whatever) in a base an puts it 
> into a 32-bit value.  It then takes that 32-bit value and converts 
> that to a numeral in the second base.  You can get a negative number 
> as a result if the msb of the 32-bit value is 1 so there is some 
> indication that the 32-bit value is signed, but I don't think that is 
> consistent.
>
> Which reminds me.  Are you supposed to have all those signed numbers 
> in Blowfish?

unsigned long parray[] From C & C++
0x243f6a88L, 0x85a308d3L, 0x13198a2eL, 0x03707344L, 0xa4093822L, 
0x299f31d0L,
0x082efa98L, 0xec4e6c89L, 0x452821e6L, 0x38d01377L, 0xbe5466cfL, 
0x34e90c6cL,
0xc0ac29b7L, 0xc97c50ddL, 0x3f84d5b5L, 0xb5470917L, 0x9216d5d9L, 
0x8979fb1bL,

P_array From VB 5 version
H243F6A88, H85A308D3, H13198A2E, H3707344, HA4093822, H299F31D0, 
H82EFA98, HEC4E6C89,
H452821E6, H38D01377, HBE5466CF, H34E90C6C, HC0AC29B7, HC97C50DD, 
H3F84D5B5, HB5470917,
H9216D5D9, H8979FB1B

So signed numbers exist in the arrays of some versions in use. I want 
to look into the differences that I'm finding in deferent 
implementations of these arrays. When I run baseConvert() on this VB 
array I get a few different signed numbers than I use in my 
implementation.

Back to the drawing board :-(   btw -  I love baseConvert() in Rev.

>
>> The guy that thought this S-box, bit-shift stuff up has got to be a 
>> full-blown max-zoomed dweeb.
>
> Well, fortunately there are no bit-shifts in Blowfish, just figuring 
> out how to think 4 chars and 32-bit numbers.
>
> Dar Scott

I should have said bit wrangling. Shifting binary numbers would just 
about put an end to this, or my brain for sure.

Mark
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 721 bytes
Desc: not available
URL: <http://lists.runrev.com/pipermail/use-livecode/attachments/20030620/64c50c32/attachment.bin>


More information about the use-livecode mailing list