# Two step encryption

Is there any asymmetric cryptography algorithm which will allow recursive encryption.

c1 = crypt(encryptionKey1, 'Hello world');
decrypt(decryptionKey1, c1) == 'Hello world'

c2 = crypt(encryptionKey2, c1);
decrypt(decryptionKey2, c2) == c1;

decrypt(decryptionKey3, c2) == 'Hello World'


Knowing first and second key pair it is possible to calculate third key. Knowing third key and second key pair it is not possible calculate first key pair.

I've made similar question on security. but it seems that an answer requires more theoretical approach

• Please don't cross-post the same question on two StackExchange sites; that's discouraged. Please pick one to keep, and for the other, click the "flag" button to flag the moderator to ask them to close it. – D.W. Feb 9 '13 at 1:19

The simple scheme where decryptionKey3 = (decryptionKey1, decryptionKey2), and where decryption using such a combined key is simply defined as decrypting the message with each of the component keys in turn, satisfies all your requirements except the last one.