Re: and now for something completely different.



Grabbing a random block of cipher text usually means that you have N
blocks and you pick one of them at random (f.e. by rolling dice).

Mixing *previous* block of cipher text into the block cipher state has
following effect:
secure block cipher acts as pseudo random permutation that given a key,
bijectively maps numbers between 0,.., 2^{block_size}-1 into 0,..,
2^{block_size}-1. "Pseudo-random" part might be explained as: no matter
what relation between source points you choose, you cannot distinguish
encryptions of these points from the mapping that was chosen uniformly
at random any better than a random guess. By adding previous block of
cipher text to the next block of plain text, you get a new point, which
will be mapped to something that looks very much alike to a mapping
that was chosen uniformly at random.

-Valery.
http://www.harper.no/valery


In the test file there are some 5700 blocks 64 characters in size. Using
information gleaned from the document "A report on block ciphers" by Dr Anuj
Prateek of the national aerospace laboratories in Bangalore, India (yes i
know it is an obscure document by an obscure person). "A good S-box will
have the property that changing one input bit will change about half the
output bits. It will also have the property that each output bit will be
dependant of every input bit." So that is after the first byte, each byte of
ciphertext becomes part of the input byte making each output byte dependant
on the previous output byte, changing 1 input byte in an encoded 345 byte
text document changes 33 output bytes. I think i could fix that so that
changing 1 input byte in an encoded document will change everything after.
The document also essentially says that if the key goes through a certain
amount of permutations the more cryptographically secure it becomes (it
cites 3 permutatins to become secure and 4 to become strong). if it goes
through too many or not enough then it is cryptographically insecure. I took
these ideas and turned them into a stream cipher by placing the key in a
string, permutating it, and then adding the permutation to the string so
that the resulting string is equal in length to the file, in bytes.

in a nutshell


string = string & Ki
do until length of string == length of file
j = i +1
Kj = f(Ki)
string = string & Kj
loop

so each block of K is a 1 round permutation of the one before, the first
block of K is the weakest, and hopefully the last block of K is the
strongest, cryptographically speaking. this can easily be modified so that
each block of K is a 3 or 4 round permutation of the one before.

K == P in length.

so if the test file has 5700 blocks of 64 in it then that means that the
length of the test file is 364800 bytes, and so the key must be 364800
bytes. no key is repeated unless there are too many permutations of K in
which the key sequence will repeat itself. I hopefully have captured this by
having the P-box change after U * 8 -1 rounds where U is the length of the
user input key. the key sequence is never known because it is dynamically
generated.

I hope that addresses at least some of your post Valery, because in truth, i
only understood about half of it because i am not a cryptographer.


.



Relevant Pages

  • Re: Generation of range permutations?
    ... > I've located and simplified a code fragment that seems to do what I ... This code's purpose is to make a permutation on range. ... cipher operating on N bits of plaintext/ciphertext. ... The cipher iterates thru a number (ROUNDS) of rounds. ...
    (sci.crypt)
  • Re: Generation of range permutations?
    ... >> I'm trying to write a program that generates permutations of ranges ... 32-bit block cipher, there's free source code for one derived from ... >> 'permutation' in some incorrect sense, I mean that a permutation of ... > I can remember there is a minimum number of rounds necessary for this ...
    (sci.crypt)
  • Re: my KDF vs dictionary attacks
    ... When the OP wrote, "the salt has 1 requirement, it must encrypt into a 32 character string, no more and no less, this means that the salt has a minimum of 5 digits and a maximum of 20 digits," did you understand what ... DES is a 64-bit block cipher - 8 bytes at a time. ...
    (sci.crypt)
  • Re: mcrypt ncfb mode problem.
    ... I know that this is a block cipher, but when i command the device to ... send encrypted command "show_list", all the device sends is a 9 bytes ... char Key= ... // Second string, output should be ABCDEF ...
    (sci.crypt)
  • Re: Theoretical limits for password length
    ... >>Let's have a perfect block cipher, with blocks of length N. The cipher ... An attacker gets to know K adjacent blocks ... inputs you cannot determine the permutation. ... random enumeration. ...
    (sci.crypt)