following the white rabbit direct to cables i have this hotdog ..because xor is the base of all hardware encryption
Elsa David of course i know we're talking about optic tronics
If is random and you only know or (but not both) then, no, there is no way to infer anything about the key - this is the (in)famous one-time-pad.
If you know and , then you can recover very easily. Exclusive-or has those properties:
- ,
- , (identity element)
- , (commutativity)
- , (associativity)
So we can do the following:
So
Viewed differently, the exclusive-or operator is invertible:
And since the truth table is symmetric, the exclusive-or operation just happens to be its own inverse, i.e. . So if we take our original equation:
We can represent it as follows:
And we can then undo (invert) the exclusive-or by A:
And as we found above, this is identical to:
As found at the beginning.
However, this is assuming A, B and K are all the same length. If K is smaller than A and B, then it means that K will be used multiple times (repeated over the length of the plaintext, presumably). This repetition can be exploited to successfully recover K from only B provided there is enough repetition and there is enough ciphertext to work with - see Vigenere cipher.
No comments:
Post a Comment