It must be emphasized that a web browser is not such an application. The protocol is designed for access to a server API from applications running on mobile devices. This page deals with the basic layer of MTProto encryption used for Cloud chats (server-client encryption).
Security Guidelines for Client Software Developers
Mobile Protocol: Service Messages about Messages