Not really knowing too much about how modern encryption algorithms work, I had always assumed if an attacker has a copy of some encrypted data and also a copy of that same data decrypted, he could figure out the encryption key used to encrypt it, is this not correct ?
With most common encryption methods, an adversary would need more than one example. Or a large example. But on the other hand, one-time pads, otherwise virtually unbreakable, are totally blown by one such example.
I was wondering about this because when you submit a post to a site such as this one using https, is the same encryption key used as the one that was used for loading the page ? Or is a new key negotiated ? I also wondered is a new key negotiated as we view different pages on the site or is the same key used for all pages on the same server ?
It depends if site is using cipher with forward secrecy: http://en.wikipedia.org/wiki/Forward_secrecy. As described in article, new public key is usually generated for new session. You can check SSL here for specific site.