đź”’ TLS clients fully work with WASIX now.

118 points savemylif

Announcement for WebAssembly

Libraries such as reqwest , hyper, rustls, etc. are fully supported in WASIX now.

What is WASIX ?

WebAssembly System Interface Extended or WASIX is the superset of WASI. It aims to speed up the ecosystem around the WASI so that the Wasm’ification of code bases around the world can really start today!

TLS for WASIX

TLS support for wasix was made possible by compiling ring for both wasm32-wasmer-wasi/wasix and wasm32-wasi targets.

What this means for WASIX/WASI ecosystem ?

You'll now be able to reach TLS based endpoints such as HTTPS, MQTT, IRC etc. in webassembly. This opens up new and more exciting possibilities for Webassembly on the server such as:

  1. Secure Access to APIs: Many modern APIs require a client to communicate over HTTPS. With TLS support, WASIX applications can securely access these APIs directly.
  2. Secure Database Connections: WASIX applications can use TLS to connect securely to databases that support encrypted connections. This ensures that sensitive data is protected during transit.
  3. Secure Third-Party Integrations: If your WASIX applications need to interact with third-party services (like payment gateways, OAuth providers, etc.), TLS client support allows these interactions to occur securely.
  4. Ingress and Egress Data Security: Implementing TLS clients ensures that both incoming and outgoing data from the application is secure, a significant benefit in complex systems where both ingress and egress points need to be equally secure.
  5. CDN and Edge Computing: TLS client support can ensure secure communication with Content Delivery Networks (CDNs) and edge computing resources, protecting data integrity and confidentiality while improving content delivery speed.
  6. Confidential Computing: With TLS client support, applications can securely retrieve and use confidential data, cryptographic keys, or certificates from remote secure servers or key management systems.
  7. IoT Applications: In IoT applications, devices often need to communicate with a central server. TLS client support can be used to ensure these communications are secure.

You can try wasix-reqwest-proxy example to try it now.

Crypto for WASIX

The successful compilation of ring for WASIX will be a game-changer for the WebAssembly ecosystem. The ability to support cryptographic operations natively in WebAssembly applications has opens up multiple use cases, especially in the realm of secure communications and data protection.

Advantages of Crypto Support in WASIX/WASI:

  1. End-to-End Encryption: With native crypto support, WASIX applications can implement end-to-end encryption, ensuring that data remains confidential and tamper-proof from the source to the destination.

  2. Digital Signatures: WASIX applications can now generate and verify digital signatures, providing a mechanism to ensure data integrity and authenticity.

  3. Secure Key Management: Applications can generate, store, and manage cryptographic keys securely within the WebAssembly environment, reducing the risk of key exposure or compromise.

  4. Random Number Generation: Cryptographically secure random number generation is crucial for many cryptographic operations, such as key generation and nonce creation. WASIX's crypto support ensures that applications can generate random numbers that are unpredictable and suitable for cryptographic use.

  5. Hashing and Data Integrity: WASIX applications can compute cryptographic hashes of data, ensuring its integrity. This is especially useful for verifying the integrity of downloaded files or validating data before processing.

  6. Zero-Knowledge Proofs: WASIX applications can implement zero-knowledge proofs, allowing one party to prove to another that a statement is true without revealing any specific information about the statement itself.

This opens up further possibilities, as protocols such as SRTP, SFTP, SSH would also be supported.

TLDR; TLS and Crypto (ring) support is available in WebAssembly System Interface Extended (WASIX) Now. You can connect to external databases, access APIs securely and almost build any application with a considerably smaller binary.

Edit: Added the Crypto section for WASIX. And corrected the mention of SFTP and SSH; they don't belong in TLS section.