Secure Messaging: From Systems To Theory