Chapter 7: Introduction to Cryptography in the Browser
We couldn't end a book about cryptography in JavaScript writing just about Node.js and not covering the other side of the coin: web browsers.
The ability to build browser-based applications in JavaScript that use cryptography is a relatively recent addition to the Web Platform, but one that is very much welcome as it allows you to create new kinds of applications, including those leveraging end-to-end encryption (E2EE). Yet, it also comes with some additional challenges, some of which are common to all client-side applications, and some that are unique because we're running our code in a web browser and distributing it over the Internet.
In this chapter, we're going to cover the following main topics:
- An overview of cryptography in the browser: the advantages, the challenges and risks, and how it's gotten much easier for developers to use thanks to the various Web Crypto APIs and WebAssembly...