Re:If your cipher were secure, this image wouldn't have repe...
by wolfgang42 on Friday February 28, 2020 @11:15PM
(#22448774)
The Wikipedia article is using modular addition as it's more accessible to the layperson than a binary XOR, but they're functionally equivalent for the purposes of cryptanalysis. XOR is just modulo arithmetic on single bits instead of larger numbers.
Edit for your edit: All of this discussion applies the same for additive OTP as it does for XOR OTP; once you have depths you can start applying the OTP (however it's done) “in reverse” as it were to begin extracting patterns in the data.
Re:If your cipher were secure, this image wouldn't have repe...
by detaro on Friday February 28, 2020 @11:14PM
(#22448767)
Both are one-time pads, there isn't one exact algorithm that's "the one-time pad". And XOR is really the same as addition, just done per-bit instead of per-byte/per-character. But as far as I know, XOR is the most commonly referenced example.
I've always assumed it was just adding the key-value to the data-value, as is described in the Wikipedia article[0].
And those two can't be the same, e.g. with both data and key value 'a' (0x5c), I'd get 0x0 with XOR and 0xb8 with addition.
EDIT: Ah, damnit, second paragraph, it says: "On July 22, 1919, U.S. Patent 1,310,719 was issued to Gilbert Vernam for the XOR operation used for the encryption of a one-time pad."
Everything I've posted in this thread about OTP was under the assumption of an additive cipher. My bad.
[0]: https://en.wikipedia.org/wiki/One-time_pad