Tag Info

New answers tagged

0

Well, we start with a small definition of XOR for bit strings larger than zero bits. $x$ and $y$ are bit strings with the lenght $n$ and $x_{k}$ denoting the $k^{th}$ bit (from $0$ to $lenght - 1$). $||$ represents concatenation and $\oplus$ means XOR. So we get: $$ x \oplus y = ((x_{0} \oplus y_{0}) || (x_{1} \oplus y_{1}) || ... || (x_{n-1} \oplus ...


5

Yes, the XOR used in cryptography means the same bitwise XOR operator you're familiar with. And yes, to securely encrypt a message with XOR (alone), you do need a key that is as long as the message. In fact, if you have such a key (and it's completely random, and you never reuse it), then the resulting encryption scheme (known as the one-time pad) is ...


11

Yes, it's the same XOR. It gets used inside most of the algorithms, or just to merge a stream cipher and the plaintext. Everything is just bits, even text. The word "hello" is in ASCII "01101000 01100101 01101100 01101100 01101111". Just normal bits, grouped in 5 bytes. Now you can encrypt this string with a random string of 5 bytes, like an One-time pad. ...


9

No, you can reuse a message as often as you want with the OTP. (But never reuse the key!) What happens if you reuse a key? The attacker can xor the two encrypted messages (ciphertexts) and gets the xor of the two plaintexts. The xor of two messages is highly insecure and can be easily turned into two plaintexts with some know patterns. What happens if you ...


2

No. As the key should be fully random - a premise that invalidates the use of an OTP in practice - that should not matter at all.



Top 50 recent answers are included