Article View: de.comp.misc
Article #616Re: Frage zu Parity-Berechnung
From: Marc SCHAEFER
Date: Fri, 29 May 1998 00:00
Date: Fri, 29 May 1998 00:00
46 lines
1951 bytes
1951 bytes
(C)hris <chris@staubli.ch> wrote:
> (A XOR B) XOR C ist nicht gleich A XOR (B XOR C).
a b c a X b b X c (a X b) X c a X (b X c)
0 0 0 0 0 0 0
0 0 1 0 1 1 1
0 1 0 1 1 1 1
0 1 1 1 0 0 0
1 0 0 1 0 1 1
1 0 1 1 1 0 0
1 1 0 0 1 0 0
1 1 1 0 0 1 1
maybe I am missing something, but it looks commutative (b.) and
associative (a.), thus
a. (a X b) x c == a X (b X c)
b. (a X b) == (b X a)
But not distributive (unlike AND, for example)
(a X b) X c != (a X c) X (b X c)
counter example:
a = 0, b = 0, c = 1
(0 X 0) X 1 != (0 X 1) X (0 X 1)
1 != 0
`AND' is distributive:
(a AND b) AND c == (a AND c) AND (b AND c)
== a AND c AND b AND c
== a AND b AND c == (a AND b) AND c
Another interesting property of XOR:
if
a X b == c
then
a == c X b == (a X b) X b == a X (b X b) == a
This is because: c X b == (a X b) X b == a X (b X b) == a
^ associativity (cf above)
Some ciphers probably also are based on the property that
(text X key) X key == text
RAID systems are interested in p = a X B; a == p X B for example.
Technical Details
Message-ID:
<6klo6d$r1g$1@vulcan.alphanet.ch>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<6kjvlr$bn2$1@elna.ethz.ch> <356ddeae.0@rzunews1.unizh.ch>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10c1fa,a87a3cc26c5974a9 X-Google-Attributes: gid10c1fa,public X-Google-Thread: 10f4ae,a87a3cc26c5974a9 X-Google-Attributes: gid10f4ae,public From: Marc SCHAEFER <schaefer@alphanet.ch> Subject: Re: Frage zu Parity-Berechnung Date: 1998/05/29 Message-ID: <6klo6d$r1g$1@vulcan.alphanet.ch> X-Deja-AN: 357584706 References: <6kjvlr$bn2$1@elna.ethz.ch> <356ddeae.0@rzunews1.unizh.ch> Organization: ALPHANET NF -- Not for profit telecom research Newsgroups: de.comp.misc,ch.comp