Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.programming > #3453
| From | Mok-Kong Shen <mok-kong.shen@t-online.de> |
|---|---|
| Newsgroups | comp.programming |
| Subject | Re: A block encryption processing idea taken from linear algebra |
| Date | 2013-06-18 15:08 +0200 |
| Organization | albasani.net |
| Message-ID | <kppm3k$gff$1@news.albasani.net> (permalink) |
| References | (1 earlier) <n1h0nq2aai5z$.ympp3gs2xcce$.dlg@40tude.net> <kpn4r4$jd1$1@news.albasani.net> <4nv1jdhieo4y.1le3iwvmj42o3.dlg@40tude.net> <kpovhs$j6$1@news.albasani.net> <12pvpi37ez67j.a4pw5e5ioslz$.dlg@40tude.net> |
Am 18.06.2013 13:12, schrieb JJ:
> On Tue, 18 Jun 2013 08:43:10 +0200, Mok-Kong Shen wrote:
>
>> Am 18.06.2013 08:03, schrieb JJ:
>>> On Mon, 17 Jun 2013 16:01:09 +0200, Mok-Kong Shen wrote:
>>>> Am 17.06.2013 12:13, schrieb JJ:
>>>>> On Mon, 17 Jun 2013 09:41:14 +0200, Mok-Kong Shen wrote:
>>>>>> Using this as a hint, we propose to do for block encryption processing
>>>>>> of n blocks, x1, x2, ... xn, the follwoing, where the f's are
>>>>>> invertible non-linear functions, the r's are pseudo-random numbers and
>>>>>> the assignments are performed sequentially (the f's and the r's are
>>>>>> (secret) key-dependent and different for different rounds, if more
>>>>>> then one rounds are used):
>>>>>>
>>>>>> x1 := f1(x1 + x2 ... + xn + r1)
>>>>>> x2 := f2(x1 + x2 ... + xn + r2)
>>>>>> ................
>>>>>> xn := fn(x1 + x2 ... + xn + rn)
>>>>>
>>>>> I'm lost. If n is the number of blocks, then xn is the block number n,
>>>>> right?
>>>>>
>>>>> But this:
>>>>> x1 + x2 ... + xn + r1
>>>>> suggest to add one block with another then add them with a random number.
>>>>>
>>>>> How can a block of data be, I assume, arithmetically be added by another
>>>>> block and added with a number?
>>>>>
>>>>> Also... with that information alone, the encryption doesn't seem to be
>>>>> decryptable.
>>>>
>>>> If the block size is m bits, then the arithmetics is mod 2**m. If the
>>>> f's are invertible, then decryption is evidently without problems,
>>>> just like each step of the iterative solution of a system of linear
>>>> equations could be reversed (though one of course never does that in
>>>> practice).
>>>
>>> Assuming I take out the r1, r2, etc. (the salt) from the equation, the
>>> result would be:
>>>
>>> x1 := f1(x1 + x2 ... + xn)
>>> x2 := f2(x1 + x2 ... + xn)
>>> ................
>>> xn := fn(x1 + x2 ... + xn)
>>>
>>> It would make all block data to be same as the first block. It'll destroy
>>> the data and keep only the first block.
>>>
>>> Something is definitely missing here.
>>
>> Why would it make all blocks the same? Note that the assigments
>> are done "sequentially". (Cf. what is generally known as the
>> Gauss-Seidel (or single-step) method of iterative solutions
>> of systems of linear equations.) For example, for the 2nd assignment
>> the x1 in f2() is already the "new" value determined by the 1st
>> assignment.
>
> OK, step by step, using live data. Assume:
>
> fx(x) = x XOR 0xFF
> x1 = 0x01
> x2 = 0x02
>
> Encryption step 1:
> x1 = fx(x1 + x2)
> = fx(0x01 + 0x02)
> = fx(0x03)
> = 0x03 XOR 0xFF
> = 0xFC
>
> Encryption step 2:
> x2 = fx(x1 + x2)
> = fx(0xFC + 0x02)
> = fx(0xFE)
> = 0xFE XOR 0xFF
> = 0x01
>
> Encryption result:
> x1 = 0xFC
> x2 = 0x01
>
> Decryption step 1:
> x1 = fx(x1 + x2)
> = fx(0xFC + 0x01)
> = fx(0xFD)
> = 0xFD XOR 0xFF
> = 0x02
>
> Decryption step 2:
> x2 = fx(x1 + x2)
> = fx(0x02 + 0x01)
> = fx(0x03)
> = 0x03 XOR 0xFF
> = 0xFC
>
> Decryption result:
> x1 = 0x02
> x2 = 0xFC
>
> So...?
>
Ah, if you have really understood the iterative processing, you
would know that reversing it must be done in such a way that the
"entire" processing is exactly reversed "step by step". That means
on decryption in your example you have to first reverse the 2nd
assignment and then the first assignment. So:
Decryption step 1:
x2 = fx(x1 + x2)
= fx(0xFC + 0x01)
= fx(0xFD)
= 0xFD XOR 0xFF
= 0x02
Decryption step 2:
x1 = fx(x1 + x2)
= fx(0xFC + 0x02)
= fx(0xFE)
= 0xFE XOR 0xFF
= 0x01
Decryption result:
x1 = 0x01
x2 = 0x02
OK?
M. K. Shen
Back to comp.programming | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
A block encryption processing idea taken from linear algebra Mok-Kong Shen <mok-kong.shen@t-online.de> - 2013-06-17 09:41 +0200
Re: A block encryption processing idea taken from linear algebra JJ <duh@nah.meh> - 2013-06-17 17:13 +0700
Re: A block encryption processing idea taken from linear algebra Mok-Kong Shen <mok-kong.shen@t-online.de> - 2013-06-17 16:01 +0200
Re: A block encryption processing idea taken from linear algebra JJ <duh@nah.meh> - 2013-06-18 13:03 +0700
Re: A block encryption processing idea taken from linear algebra Mok-Kong Shen <mok-kong.shen@t-online.de> - 2013-06-18 08:43 +0200
Re: A block encryption processing idea taken from linear algebra JJ <duh@nah.meh> - 2013-06-18 18:12 +0700
Re: A block encryption processing idea taken from linear algebra Mok-Kong Shen <mok-kong.shen@t-online.de> - 2013-06-18 15:08 +0200
Re: A block encryption processing idea taken from linear algebra JJ <duh@nah.meh> - 2013-06-19 15:53 +0700
csiph-web