On Thu, 03 Apr 2025 07:47:42 +0000, Lawrence D'Oliveiro wrote:
XOR is perfectly fine as an encryption technique, provided that the
sequence being XORed with is sufficiently strongly pseudorandom.
This is known as a “stream” cipher. Basically, any “block” cipher can be
turned into a stream cipher by using it to generate the XOR sequence.
One threat exists with using XOR, even with a good sequence. If you have a
way of already knowing what the plaintext is, you will know which bits to invert in order to forge a different message.
Also, "sufficiently strongly pseudorandom" would normally mean having good statistical properties, resembling those of a genuine random sequence.
That's not the same as cryptosecure. A sequence could be ideal from that
point of view, and yet completely predictable. For example, produce your
stream by the XOR of the binary digits of pi with a linear congruential generator. That eliminates the statistical flaws of the linear
congruential generator, but since everybody knows pi, it's still not
secure.
John Savard
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)