Re: how shd i improve upon this algorithm(ne suggestions)
From: John Savard (jsavard_at_excxn.aNOSPAMb.cdn.invalid)
Date: 07/16/04
- Next message: Mok-Kong Shen: "Re: Isomorphism"
- Previous message: Tom St Denis: "Re: PK questions"
- In reply to: Ankur Taly: "how shd i improve upon this algorithm(ne suggestions)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Fri, 16 Jul 2004 15:45:44 GMT
I think I understand what you are talking about here.
Step 1: Encipher the input bytes by means of a simple substitution of
values from 0 to 255.
Step 2: Split the result bytes into two four bit halves.
Step 3: Add four random bits to each half.
This can be improved. Right now, what you are producing is a
homophonic cipher with 16 substitutes for each half of the byte.
One way to vary things more is this:
Instead of replacing each four bits by itself and four random bits,
choose two groups of four bits that add together to, or XOR together
to, the original four bits.
And don't forget an extra substitution step at the end.
One could also put them together in a straddling fashion, to avoid
having pairs of characters that have 256 values for every byte.
Thus:
01011100 11011010
becomes
11011001 00110100
by substitution...
1101 can become 0110 and 1011
1001 can become 1100 and 0101
0011 can become 1011 and 1000
0100 can become 1010 and 1110
and so on...
and what we do is for the first nibble, take the two nibbles and put
them in the preceding in-between byte and the matching byte, but for
the second byte, put them in the matching byte and the following
in-between byte:
01011100 11011010
11011001 00110100
0110.... 10111100 10110101 10001010 ....1110
and then substitute.
This still won't be all that secure, though. But at least, no matter
what the plaintext is, any given byte in the ciphertext can be any of
the 256 possibilities.
John Savard
http://home.ecn.ab.ca/~jsavard/index.html
- Next message: Mok-Kong Shen: "Re: Isomorphism"
- Previous message: Tom St Denis: "Re: PK questions"
- In reply to: Ankur Taly: "how shd i improve upon this algorithm(ne suggestions)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|