# Re: Encyption of two 256-blocks

On Dec 8, 5:07 pm, Maaartin <grajc...@xxxxxxxxx> wrote:
Thx to everybody - I'll reply to the others after studying a little.

*** TO biject:

I see you commented on the other 2 guys even though I was first.

But also the hardest to understand.

Ok, let's assume for simplicity you use no key.
I wrote, the length of X0, X1, Y0 and Y1 is 32 bytes,
but take only 8 or 4 bits in the example
and let me know what pairs (X0, X1) could lead to Y0 = 0.

Since X0 and X1 combined and then encrypted they could
map to any Y0 Y1 depending on encryption and key but if
Your talking about a Identity transform then its as below

If I understand what you ask is that ignoring encryption
how is X0,X1, combined in a mixed way given as an example
4 bits of X0 and 4 bits of X1. So that going from X0 X1
combined to a Y0 Y1 where the Y0 is exactly all ZERO.
Note the Y0 Y1 would actually be the output of an
encryption after the X0 and X1 combined using the special
binary UNBWTS.

There would exactly 16 pairs of X0 X1 that would map to
the first 4 bits zero. The reason I know there are exactly
16 such pairs of data which allows Y0 to be all zero
and Y1 to be any of 16 values.

Since BWTS and UNBWTS are opposites and I recommended
using UNBWTS you would take the string where first 4 bits
zero and next four bits the y value.
00000xxxx1 using BWTS you would get a string
of the form
1zzzzzzzz0 the first four bits X0 the second X1

As an example the BWTS or UNBWTS does not change the
number of ones or zeroes only the arrangement of then
as a function of the data

if input string
0 0000 0000 1 you get 1 0000 0000 0 after dropping
lead and trailing bit you get for X0 0000 x1 0000
when you do Using BWTS instead of UNBWTS since going
form Y to X.
0 0000 0001 1 becomes X0 0000 X1 0001
0 0000 0010 1 becomes X0 0000 X1 0100
0 0000 0011 1 becomes X0 0000 X1 0011
0 0000 0100 1 becomes X0 0001 X1 0000
0 0000 0101 1 becomes X0 0000 X1 0110
0 0000 0110 1 becomes X0 0000 X1 1001
0 0000 0111 1 becomes X0 0000 X1 1110
0 0000 1000 1 becomes X0 0100 X1 0000
0 0000 1001 1 becomes X0 0001 X1 0010
0 0000 1010 1 becomes X0 0001 X1 1000
0 0000 1011 1 becomes X0 0000 X1 1101
0 0000 1100 1 becomes X0 0010 X1 0001
0 0000 1101 1 becomes X0 0001 X1 0110
0 0000 1110 1 becomes X0 0001 X1 0011
0 0000 1111 1 becomes X0 0000 X1 1111

This is what happens for 4 bits of Y0
are all forced to be ZERO
There are the ordered pairs to make
the 16 possible values of Y1.

this case notice that X0 is 0000 half
the time. If that is a problem where
your X values start at a low value so that
most of you bytes are all zeroes (or ones)
it might be best to XOR with some fixed
random looking string.

The best mixing occurs when both
X0 and X1 have roughly 50 50 ones and
zeroes. Look I am not saying this is best
for your application. But this fact
remains if you have Y0 and its n bits
long as is XO and X1 there are 2**N
pairs of X0 X1 that would lead to the given
Y0 value. One for each possible Y1.

Note this is a type of mixing few have done
don't forget in your application you still have
the encryption pass.

David A. Scott
--
My Crypto code
http://bijective.dogma.net/crypto/scott19u.zip
http://www.jim.com/jamesd/Kong/scott19u.zip old version
My Compression code http://bijective.dogma.net/
**TO EMAIL ME drop the roman "five" **
Disclaimer:I am in no way responsible for any of the statements
made in the above text. For all I know I might be drugged.
As a famous person once said "any cryptograhic
system is only as strong as its weakest link"
.

## Relevant Pages

• Re: Barcode Email
... That is not zero cost unless you are gong to do this for free? ... what if the substitution is randomly generated and the ... > well use a good encryption algorithm instead of substitution. ...
(comp.security.misc)
• Re: Barcode Email
... That is not zero cost unless you are gong to do this for free? ... what if the substitution is randomly generated and the ... > well use a good encryption algorithm instead of substitution. ...
(sci.crypt)
• Re: Strange VM error in deployed exe when naming my method with
... after some investigation I think I found the cause - it is a combo of encryption and the new byte code packing. ... The method JRTSQLParser>>with has a byte code of length 4 and encrypts to a same-sized byte array the last element beeing 0 (zero). ... Unfortunately the bytecode packing assumes zero to be no data and cuts off the trailing zero when storing the crypted bytes. ...
(comp.lang.smalltalk.dolphin)
• UNBWTS vs BWT for pre-encryption pass
... This kind of encryption is what most beginners come up with as ... BWTS and UNBWTS since that would be better but one could use the ... What about doing a binay UNBWTS on text before an encryption pass. ... Its seems as with compression on text or most useful files. ...
(sci.crypt)
• Re: Message Confidentiality and Integrity - Prepend Hash versus Append Hash
... I see bad that either approach has weaknesses. ... then do your Encryption pass it would be much stronger than either ... message as bits for the UNBWTS but bytes would still work. ... My Crypto code ...
(sci.crypt)