On Friday, June 20, 2003, at 07:21 PM, Dar Scott wrote:
However, since Blowfish primitives are xor and addition and since most signed numbers are 2-complement it might not matter.
Even so, in Revolution once you bitAnd or bitXor, I would have expected unsigned values. I have only seen signed values come up in some uses of baseCovert().
It took a while and I was curious to see for myself, You were correct about expecting unsigned values. I ran a comparison version with the P-array from the C source code for encrypt and the P-array from the VB source code on decrypt and it worked. They were different in respect to signed numbers only. Only the unsigned numbers in the different source P-boxes were identical.
I changed out the (C sourced S-box-1) for the (VB sourced S-box-1) in both the encrypt and decrypt handlers. It worked. The complimentary signed numbers mattered in the S1-boxes as long as the same version S-box was used for encrypt and decrypt. It showed that S-box-1-VB works with S-box-2-C, S-box-3-C, and S-box-4-C where only the unsigned numbers in the two S-box-1 versions were identical.
Mark