Question
Two parties A and B try to communicate with following encryption scheme-both sides agree on same long random bit sequence (you could assume one of your own choices). When A wish for to send B an k-bit message, it takes k bits from long random sequence, XOR each bit of k bit message with them, and send result ("encrypted message"). While B receives the encrypted message, it takes k bits from her own copy of long random sequence, and XOR each bit of the k bit encrypted message to get back original message.
The two parties are concerned with possibility that a middleman which perform the message transfer will take encrypted message sent by A and change it, previous to forwarding the message to B; and B will get the message without knowing that it is modified. So they add the following "protection".
Append CRC to the original message, before encrypting whole message (original message + CRC) using the above method (n-bit XOR). While B gets the encrypted message, it is decrypted, and then CRC is checked.
If CRC is incorrect, B concludes that the communication is modified, and ignores it.