# Ciphertext to different plaintext

Is there any algorithm for generating the same ciphertext from different plaintexts, depending on the key used? This seems similar to Honey Encryption, but I don't need to have every key give realistic data. I want to specify a set of keys and corresponding plaintext.

For example, "hey" encrypted with key1 and "bye" encrypted with key2 would both become "aaa". Decrypting with key1 and key2 would succeed and return the corresponding plaintext, while decrypting with any other key would fail.

• Are you referring Key clustering or Key collision, where a collision attack finds two different messages m1 and m2, such that hash(m1) = hash(m2) and a key clustering is two different keys that generate the same cipher text from the same plain text? Jun 26 '18 at 0:10

There is one way of doing this using RSA. So if you have n1 = p1 * q1 and also n2 = p2 * q2 and each of them have a key pair pub1, priv1 and pub2, priv2.

Then if you use the Integer group n3 and n3 = n2 * n1 then for every element in the pair (element from Integer group n2; element from Integer group n1) there would be a map to (element from Integer group n3).

This might sound confusing but then something cool happens. Imagine that Bob has a key pair in n1, pub1, priv1 and that Bobby has a key pair in n2, pub2, priv2.

So if you cipher m1 with pub1(using modulo n1) and m2 with pub2(using modulo n2) and then use the map that I said before so that you get an element from n3. (encWithPub1(m1), encWithPub2(m2)) = (cipheredMessages) and cipheredMessages belongs to the Integer Group of n3.

Then if you send this cipheredMessages message to Bob and Bobby. Bob will decipher with priv1 (modulo n1) and get m1. Bobby would decipher with priv2 (modulo n2) and get m2. So by just sending one ciphertext both Bob and Bobby got their respective clear text.

Sorry if this is confusing but i don't know how to write formulas in here...

• Jun 27 '18 at 6:52