1
$\begingroup$

If both communicating sides end up with the same secret 3000-bit key, is it enough to XOR each byte of the messages with each byte of the secret key to make it secure?

Wikipedia says it is, but I wanted to ask if this is still the case nowadays.

That would mean each message can be up to 375 bytes in size, so that each of its bytes can be XOR'd with each of the secret key's bytes, then each byte of the message gets a unique byte to be XOR'd with, no repeating.

Is this scenario secure, or do I have come up with / find some kind of better way to use said 3000-bit key on each side when encrypting/decrypting?

The length of the key doesn't matter here, I'm asking it from a theoretical standpoint.

$\endgroup$

1 Answer 1

1
$\begingroup$

Yes, it is secure but only if your key is generated truly random. This cryptosystem is called One-Time-Pad (OTP), and has perfect security. Perfect security is the term used for the cryptosystems in which the adversaries even with unbounded power and time are not able to learn anything from the encrypted message regardless of the length of the message as long as the random keys are from the same length.

Conside only one bit message m. if the adversary sees that the encrypted message (c) is equal to 1, he/she cannot understand the message has been 0 or 1. because the message could be 0 XORed with 1 as the key, or the message could be 1 XORed with 0 as the key. and he even cannot say that which case is more probable. Reasoning for longer messages is the same as the encryption method works bit-by-bit

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.