I am looking for a cipher which would allow something like this: E(E(M, a), b) = E(M, ab), where a and b are encryption keys, and ab is a combination of the keys that is impractical to separate into a and b.
So far, the only cipher I could find that would work like this is Pohlig-Hellman Exponentiation Cipher. But as I understand, it has the following drawbacks:
- It is slow - though, this is not really a concern for me
- I can't find any actual implementations of the cipher. It shouldn't be too difficult to implement from scratch, but still...
Is there another cipher that can accomplish the same thing?