Is it mathematically possible to always be able to get the encryption algorithm used to encrypt a certain item (file, number, text, ...etc.) by knowing the decryption algorithm that will be used to decrypt that item, the encryption key (i.e. private key), and (of course) the encrypted item itself? I.e. are all encryption algorithms reversible and have this hypothetical equality hold (going to left decryption, while going to right is encryption), while still being able to get the method to go either way (right or left) if I know the other way: encrypted item + key <=> decrypted item? I am referring to reverse engineering an encryption/decryption algorithm from knowing the other one in both symmetric and asymmetric encryption/decryption algorithms.