I have a vague memory of watching a video of a guy "unraveling the secret story / lore" from the game Doki Doki Literature Club. And I remember that he took a file, converted it to .txt and had certain information, converted the same file to .jpg and had other totally different information. Information that can only be seen if you convert the file to .txt and other information that can only be seen if you convert the file to .jpg.

How do I hide different messages in the same file that can only be deciphered by converting it to other file extensions? If that is not possible then it must be something that my brain messed up in my memories, but I am pretty sure it was like that.

And I don’t have any more details, so I can’t research it properly. This would open up new possibilities for more immersive mystery or horror games. By the way, I know the basics of steganography but I have never seen anything like it, hiding multiple types of information in the same file.

  • 2
    $\begingroup$ Video games do not need to picture encryption in a realistic way. That does not work in reality, with standard file types. It seems to hint to a concept called deniable encryption, where you can decrypt a ciphertext to something else than the real message - when someone is forcing you to do so. $\endgroup$
    – tylo
    Mar 26, 2021 at 8:51
  • $\begingroup$ Good to know! As a game developer, knowing this gives me a lot of storyline and experience for the player. $\endgroup$
    – MessiasOF
    May 14, 2021 at 21:18

1 Answer 1


One simple steganographic technique is to just use the comment structure of a mark-up language to embed plaintext messages. For example, the html code

<img src="lolcat.jpg">

inserted in a web page and opened in a browser will render as an image (presumably of an amusing cat), but if opened in a text editor the comment line can be read (and the cat picture can not be examined).

In particular the jpg format allows COM segments which are preceded by the bytes 0xFF 0xFE and a length field which then allow insertion of ASCII text.

Note that this is pretty trivial to detect and provides only steganographic protection (vice cryptographic).


Your Answer

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

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