Welcome Guest [Log In] [Register]
Viewing Single Post From: Secure ?
loki
Advanced Member
[ *  *  * ]
I have been doing research into differnet mixing algorthyms, I have found two different algorythms and have done moderate testing on them. Tweaked and managled them.

The one presented here was apparently a modified version of the psuedo hadamard transformation from twofish.

I thought it was cool and took a look at it. Apart from poor coding, it looks interesting. I tweaked it for speed and it still follows the same basic idea as the original. It appears to be good to me, but what do I know? was wondering if anyone could find an exploit in the code that will make it insecure to use?

the original code is as follows
Code:
 

unsigned char pht(unsigned char a, unsigned int b)
{
  long t;
  t = a + b;
  t = (2 * a) + (2 * b);
  t = t ^ 0xa9;
  t = t ^ a;
  return t;
}


I have modified it to this.
Code:
 

static unsigned long pht(unsigned long a, unsigned long b) {
  register unsigned long t;
  t   = a ^ b  ;
  t <<= 1      ;
  t  ^= 0x74bul;
  return (t ^ a);
}


I always here about systems failing becuase of a simple algorthym, this looks good to me.

How can I improve opon it, or is it just a silly mixer ?

The only thought I can think of to improve this is, replacing 0x74b with the xor of a nd b.

Any inputs or ideas or suggestions?
c(x) = 3x3 + x2 + x + 2; Find the inverse
Offline Profile Quote Post
Secure ? · Off-topic