I'm looking for a cryptographic algorithm that satisfies the following rules:
E(key1, E(key2, Message)) = E(key2, E(key1, Message))
And obviously the same for decryption as well.
This is probably a long shot as I doubt such an algorithm exists but thought it's worth asking.
Thanks
RSA with the same modulus will do this. Raising to the power a then the power b is the same as raising to power b then a.
But you wouldn't normally use RSA to encrypt your message, you'd use it to encrypt a key - RSA and most asymmetric cryptogrpahy is very time consuming.
Maybe you're after a symmetric algorithm with that property?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With