0

My situation:

I want to encrypt an HTML document. My question is, if the following is known, is that going to weaken encryption?

  • It is a text-based document
  • It starts with <DOCTYPE HTML> or a few variants of
  • This is followed by an <HTML> tag, followed by a <HEAD> tag, which contains a number of '

Would this knowledge help a hacker to decrypt without the decrypt key? Would such knowledge make my documents effectively un-encryptable?

My apologies if this is a very simple question. I am a neophyte.

2

What you refer to is a known-plaintext attack where part of the original text is known to the attacker. While simple encryption schemes are known to be vulnerable against such attacks modern ciphers are considered to be safe against this. With these modern ciphers all the known-plaintext allows is to verify if the decrypted result matches the original input, but it is still a brute-force attack over all possible encryption keys needed since all possible keys are equally probable.

In other words: it might be a problem if you run your own encryption. It is not a problem if you properly use established modern encryption.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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