Originally Posted by
Junior89
Well i couldn't seem to find a good forum (out there on the web) or anything like that for a little review and courteous criticism of my algorithm here. I'm sure it's stupid and insecure but i would like it if someone with some knowledge in the field could point out some of the biggest mistakes i made. I'm not naive and i do know that it probably isn't more than a dressed up XOR encryption but hey, i'll give it a shot!
Block 1...
Code:
a, b, c, d
a^L, b^L, c^L, d^L
d^L, a^L, b^L, c^L
d^L^R, a^L^R, b^L^R, c^L^R
S(d^L^R), S(a^L^R), S(b^L^R), S(c^L^R)
We can undo the S(), so it's just a problem of finding L^R, which is just a single XOR problem. Cracking XOR of plaintext is a problem solved long ago.
On the other hand, look at block 3...
Code:
a, b, c, d
a^R, b^R, c^R, d^R
S(a^R), S(b^R), S(c^R), S(d^R)
S(a^R)^L, S(b^R)^L, S(c^R)^L, S(d^R)^L
S(d^R)^L, S(a^R)^L, S(b^R)^L, S(c^R)^L
This is better, because L^R can't combine into a single XOR problem. The classic XOR methodology wouldn't work.
To be honest, the biggest problems with this are...
1) The permutation method is far too simple.
2) It doesn't repeat enough times.
I suggest trying to implement a Feistel cipher, what you have is very close to that, which is the basis of a lot of cryptography.