Encryption Q: XOR of Data w/Secret Key & Compression

  • Thread starter jeffceth
  • Start date
  • Tags
    Encryption
In summary, the conversation discusses the security of a symmetric encryption scheme and the idea of padding plaintext with a random value to prevent known-plaintext attacks. The conversation also mentions the principle of Kerckhoffs and the importance of not making assumptions about the attacker's knowledge. The conversation concludes with a discussion of possible cryptanalysis against the suggested scheme and the potential vulnerabilities in its design. The person asking the question is seeking clarification on whether their understanding of the situation is correct or if they are overlooking crucial details.
  • #1
jeffceth
40
0
I hope this is the right place to ask this:

So looking at a symmetric encryption scheme, we see that a simple, say, xor of the data with the secret key will be broken in the event of single known-plaintext attack. Obviously, then, it is intuitive to pad out all plaintext with a random value, and of course perform a simple reversable operation to obfuscate the content so portions of the key cannot be retrieved piecemeal in a known-plaintext attack. One could, for example, compress the plaintext in an encrypted archive using a random value for a key, and then append the random value to the archive and xor the whole thing with the secret key. I understand that this is not actually cryptographically secure. I just don't understand why. What form would attacks against such a method or a similar one take?


(level of math I can handle: out of practice, but first year university math I generally remember)

sincerely,
thatwouldbeme
 
Physics news on Phys.org
  • #2
bump. Should I have posted this in a different place?
 
  • #3
Two bad methods don't make one good :) why would that be any more secure?

Your scheme makes too many assumptions, starting with "In the event of a single known-plaintext attack". You can't guarantee those conditions, and you should assume your attacker has all the information you do except the secret key, including the exact method that you use to encrypt it.

Kerckhoffs principle i think its called
 
  • #4
3trQN said:
Two bad methods don't make one good :) why would that be any more secure?

Your scheme makes too many assumptions, starting with "In the event of a single known-plaintext attack". You can't guarantee those conditions, and you should assume your attacker has all the information you do except the secret key, including the exact method that you use to encrypt it.

Kerckhoffs principle i think its called

I'm afraid I was unclear. I am not making any of those assumptions. I was simply pointing out that informationally speaking there is a 1-to-1 and onto relationship between plaintexts and ciphertexts in the first scheme and thus obviously a single known-plaintext case holds enough information to 'break' the key. By contrast, it would initially seem(prior to close examination) that since in the second scheme the 1-to-1 characteristic of the encryption method is destroyed over an arbitrary individual bit one would not be able to retrieve information about the key from a known-plaintext attack. However, in reality many such systems can be cryptanalysed over a series of known-plaintexts. How would this occur in this case?

If it would help send things in the right direction, my current hypothesis is that successful cryptanalysis of this scheme would involve capitalising on the relationshiip between the bits of the archive key and the bits of the archive itself, since obviously when taken individually each 'block' of information is 100% unpredictable(since the archive key is random, while the archive would be different for each key) so any cryptanalysis must capitalise on the relationship between them. Of course, this information would be limited and/or probabilistic, so it would have to be compiled over multiple plaintext attacks. Does this seem correct, or am I making fatal flaws in how I view this situation?

sincerely,
thatwoudlbeme
 

1. What is encryption?

Encryption is the process of converting plain text or data into a coded form using an algorithm, making it unreadable to anyone who does not have the key to decode it.

2. What is XOR encryption?

XOR encryption is a type of encryption that uses the exclusive OR (XOR) operator to combine the data with a secret key. This results in a scrambled output that can only be reversed if the same key is used.

3. How does XOR encryption work?

XOR encryption works by taking each bit of the data and performing an XOR operation with the corresponding bit in the key. This process is repeated for every bit in the data, resulting in a scrambled output that can only be decoded using the same key.

4. What is the purpose of compression in encryption?

The purpose of compression in encryption is to reduce the size of the encrypted data, making it easier to store and transmit. This also helps to improve the security of the data, as it becomes harder to decipher.

5. Is XOR encryption secure?

XOR encryption is considered a relatively weak form of encryption, as it can be easily cracked with a brute force attack. It is recommended to use XOR encryption in combination with other encryption techniques for better security.

Similar threads

  • Computing and Technology
Replies
8
Views
1K
  • Programming and Computer Science
Replies
1
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
5
Views
2K
  • Special and General Relativity
Replies
13
Views
2K
Replies
10
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
7
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
7
Views
3K
Replies
20
Views
6K
  • Other Physics Topics
Replies
5
Views
3K
Back
Top