NaCl (pronounced "salt") stands for Native Client. It was an open-source sandboxing technology developed by Google that allowed native code (specifically C and C++) to be executed securely within a web browser.
Historically, web browsers could only run high-level scripting languages like JavaScript. While efficient for many tasks, JavaScript could not handle heavy computational loads required by applications such as high-end video games, video editing software, or complex scientific simulations. NaCl was created to solve this problem by bringing the performance of native applications to the web.
// Symmetric encryption const key = NaClPlugIn.crypto_secretbox_keygen(); const nonce = NaClPlugIn.randombytes_buf(24);const ciphertext = NaClPlugIn.crypto_secretbox_easy( "Sensitive data", nonce, key ); nacl-web-plug-in
const decrypted = NaClPlugIn.crypto_secretbox_open_easy( ciphertext, nonce, key );
The NaCl plug-in functioned as an integral part of Chrome (and briefly other browsers via an extension). Key technical aspects include:
Google Native Client (NaCl) was a sandboxing technology that allowed web browsers to execute compiled native code (C/C++) directly, safely, and with near-native performance. Its associated web plug-in was the browser component enabling this functionality. While innovative, NaCl was ultimately deprecated in favor of WebAssembly (Wasm) due to security complexity and cross-browser incompatibility. NaCl (pronounced "salt") stands for Native Client
Bioinformatics and physics simulations generate massive datasets. Rendering molecular dynamics or fluid simulations requires the throughput of compiled code. The plug-in delivers this without requiring users to install standalone applications.