Is there a method of encryption where you can't work out the key even with the encrypted and decrypted message?
The point of "modern" cryptography is that "the strength" relies solely on the key.
What you are describing is called a known-plaintext attack and state of the art algorithms (like AES) should not be prone to it.