As soon as you put the key pair required to encrypt/decrypting messages in settings and those settings are stored in the Gmail server, encryption and decryption might as well be done in Gmail servers. You can put the key pair in offline storage space or in cookies somehow and use that to encrypt/decrypt on page load.
As encryption of emails will probably not be used very widely, Gmail can have an option to disable ads in encrypted messages. Or it can maybe send the relevant keywords from the browser to Google for ad generation.
---------- Post added at 04:27 PM ---------- Previous post was at 04:26 PM ----------
There have been efforts to at least verify signed messages in Gmail; I don't know why it wasn't released and why they didn't proceed to the encryption part.
As encryption of emails will probably not be used very widely, Gmail can have an option to disable ads in encrypted messages. Or it can maybe send the relevant keywords from the browser to Google for ad generation.
---------- Post added at 04:27 PM ---------- Previous post was at 04:26 PM ----------
There have been efforts to at least verify signed messages in Gmail; I don't know why it wasn't released and why they didn't proceed to the encryption part.