QB / QB64 Discussion Forum      Other Subforums, Links and Downloads
 Return to Index  

Response

June 13 2011 at 5:00 PM
  (Login MCalkins)
Moderator


Response to I haven't a clue where to begin

>I know that XOR'ing the plain text byte by byte with a random stream of bytes will produce the ciphertext.

Yes, XOR is ideal. Modulo addition (addition disregarding the carry) could be used instead, and would be reversed by modulo subtraction, I believe.

If the stream is truly random (and used only once), it is a "one time pad", and is unbreakable. In most cases, a pseudorandom stream is used, because truly random numbers are hard to generate. (And if it were truly random, you would somehow have to transmit and/or store the entire key stream, which would be as long as the message. In the case of a pseudorandom stream, you could regenerate the key stream from an initial seed value.)

In the case of this challenge, I wouldn't even call it pseudorandom. There is a very simple pattern to the key stream.

>Then repeating the process with the ciphertext will return the plain text.

Yes.

Recap with second hint:

In the case of this challenge, you know that it's a simple stream cipher. You know that, in this case, the changing of the key is unaffected by the plaintext or ciphertext. You can safely assume that the message is plain ASCII English text. You can safely assume that the key size is 8 bits.

Regards,
Michael


    
This message has been edited by MCalkins on Jun 13, 2011 5:27 PM
This message has been edited by MCalkins on Jun 13, 2011 5:26 PM
This message has been edited by MCalkins on Jun 13, 2011 5:24 PM
This message has been edited by MCalkins on Jun 13, 2011 5:17 PM
This message has been edited by MCalkins on Jun 13, 2011 5:14 PM
This message has been edited by MCalkins on Jun 13, 2011 5:05 PM


 
 Respond to this message   
Responses