I have a pen pal that I discuss with. In our latest discussion it was proposed to write a short message that is ciphered and have the other one find what it is, given some clues.

I would like to ask if its possible to have the same ciphertext that when decrypted with key "his_name" gives a result and if decrypted with key "my_name" gives a different result, but, obviously, I suppose that both results must be constricted to the same number of letters.

I am not versed into computer ciphers or AES or RSA or other mathematical difficulties, so I'd like to ask if there is a possibility to have something that does not involve having to own a piece of software to do hundreds of computations in order to find the cipher.

I was thinking that I can have the same ciphertext that, when used with two different ciphers, offers two distinct messages. If this can be possible, is there a way for me to get the 2nd cipher working after getting a ciphertext from using the 1ts cipher? Like, I use simple caesarian shift and get a ciphertext. Then I have this ciphertext to also be decrypted to whatever text I want to have by juggling with some property of the 2nd cipher?

I was also thinking that I can have two different alphabets for the same ciphertext, as this can be a property of the 2nd cipher. But how can I find the alphabet order for the second message to match deciphering from the ciphertext that resulted from the first message (that can have the normal alphabet)?

I have checked the questions linked below:

  1. Create a ciphertext that decrypt to different plaintexts with different keys in RSA

  2. Ciphertext to different plaintext

  3. Is it possible to get different plaintexts from a single ciphertext using different keys?

From what I understood:

  • there is such a notion that if I have (text A) and (key A) and the resulting (ciphertext A) and I also have (text B) and (key B) and the resulting (ciphertext B), I can do some operation with [(ciphertext A) and (ciphertext B)] to get (ciphertext C) that, when used with (key A) it'll give me (text A) and when used with (key B) it'll give me (text B)
  • there is something like a deterministic symmetric encryption that I may use to get a hash for the cipher and then use two different ciphers on the hash, but I may have misunderstood some things here
  • there might be an option that requires to have a bigger 2x ciphertext that can have its 1st half decoded with the first key and remaining padding, and the 2nd half decoded with the second key and remaining padding


Key 1 : Adam
Message 1: you are very good you discovered this aaaa
Alphabet 1: ABCDE.....XYZ

Key 2 : Dave
Message 2: this is a secret message harder to find aaa
Alphabet 2: GREPTL......YHX

-> results only 1 ciphertext
Ciphertext: gdeowxiwetzmckdslfproewlqasdcmbrtrw

The "a" at the end of messages is just to have padding up to 35 characters.

For the above example, the other user will only know the resulting ciphertext, the cipher method and the alphabets that were used. So they only have to guess the key to decipher.

Is there such a thing possibile, and relatively trivial to find - for short messages?

  • $\begingroup$ You mean deniable encryption? $\endgroup$
    – Maarten Bodewes
    Commented Aug 15, 2021 at 15:38
  • $\begingroup$ @MaartenBodewes , yes, exactly! But with one caveat, it must involve pen-and-paper and can be resolved by hand and not using computer generated code or software. $\endgroup$ Commented Sep 9, 2021 at 9:31
  • $\begingroup$ Unfortunately I don't know the answer, but I thought I would chime in because knowing the terms is often half the battle. $\endgroup$
    – Maarten Bodewes
    Commented Sep 9, 2021 at 10:12

2 Answers 2


I've been thinking about this for a while and I can only think of one possible solution.

If you want to share two different messages with the same cypher text then you might be able to use a "one-time pad" with multiple decryption possibilities, or rather multiple one-time pads for the same text.

So if I were to have the following cypher text GTEROSDFEE

Each one-time pad takes individual letters in the cypher text and assigns an other letter; Thus, with the same cypher text, with one one-time pad I would get HELLOTHERE (pad: G->H, T->E, E->L, R->L, O->O etc.)

And with an other one-time pad I would get GOODBYEYOU (pad: G->G, T->O, E->O, R->D, O->B etc.)

This can be practical for short messages that do not use too many characters, as to decrypt you must know the unique decryption for each individual column of characters of text.


Ways to do this (for fun) depend on your requirements. If the passwords must be human readable then it makes things more difficult. I assume plaintexts match in size.

If passwords need not be human readable then it is easily done with XOR. C1=Plaintext1 is XORed with a key. C2=Plaintext2 XOR C1. C2 is the final ciphertext. The two unreadable passwords are P1=Plaintext2 XOR key, and P2=C1.

If the passwords need to be readable/chosen then other ways of doing it would be encrypting so that the ciphertext was two separate authenticated encryptions. Upon decryption you'd return the correct plaintext accordingly (the other would fail). But it's probably overkill for a fun game with your friend.


Your Answer

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

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