Star on
RELEASE v1.0.1 โ€ข AI AGENT MCP TOOLING โ€ข ZERO DEPENDENCIES โ€ข PURE WEB CRYPTO API

Zero-Dependency Web Cryptography & AI Agent Tooling Suite

High-performance AES-256-GCM encryption, RSA-4096 hybrid public keys, post-quantum KEM, and native Model Context Protocol (MCP) server for autonomous AI coding agents.

๐Ÿค–

AI Agent MCP Server

Built-in stdio Model Context Protocol (MCP) server equipping AI coding agents with zero-config cryptographic vaults.

๐Ÿ”’

AES-256-GCM Encryption

Authenticated symmetric encryption with unique 128-bit salt and 96-bit IV per payload for max integrity and secrecy.

๐Ÿ”‘

RSA-4096 Hybrid Mode

Asymmetric public-key encryption combining RSA-OAEP key wrapping with high-speed AES-256-GCM payload encryption.

๐Ÿง 

PuterVision Triad Standard

Seamlessly integrates with state-memory-mcp (workflow DAG) and vision-memory-mcp (visual cache).

๐Ÿ“ก

WebRTC E2EE Streams

Real-time video/audio media frame encryption using WebRTC Insertable Streams and transform streams.

โšก

Zero Dependencies

100% native Web Crypto API (`globalThis.crypto.subtle`) execution across browsers and Node.js 18+.

Interactive Browser Workbench

Live Web Cryptography Tools

Ready for zero-dependency AES-256-GCM execution
Generate a key pair to begin asymmetric testing
256 Bits Cryptographic Entropy
Ready for HMAC authentication

Live inspection of your current browser runtime environment (`globalThis.crypto.subtle` capabilities and native Web Crypto features):

Model Context Protocol (MCP)

Native AI Agent Tooling & Multi-IDE Integration

WebCrypt includes a built-in, zero-dependency Model Context Protocol (MCP) stdio server that equips AI coding agents (Antigravity, Claude, Cursor, Copilot, Windsurf, Cline) with cryptographic vaults, digital signatures, and key management tools.

โšก Quick Auto-Setup (Zero Manual Configuration)

Run inside any project to automatically scaffold IDE MCP configurations, agent skills, and rules:

# Install globally and initialize your project npm install -g webcrypt webcrypt init # Verify environment and configuration health webcrypt doctor

Why AI Agents Need WebCrypt MCP

๐Ÿ” Confidential Local Vault Encrypts API keys, secrets, and task memory before disk writes to prevent prompt log leaks.
๐Ÿ›ก๏ธ Tamper-Proof Signing Computes cryptographic ECDSA/HMAC signatures on build artifacts and test evidence packs.
๐Ÿค Inter-Agent Key Exchange Generates ephemeral JWK keypairs (RSA-4096 / ECDH) for private subagent communication.
๐Ÿง  PuterVision Triad Standard Seamless security layer for state-memory-mcp (workflow DAG) and vision-memory-mcp (visual cache).

Registered MCP Tools for AI Agents

Tool Name Action / Mode Description
`encrypt_payload` symmetric | asymmetric | data Encrypts strings, JSON objects, or files with AES-256-GCM or RSA-4096.
`decrypt_payload` symmetric | asymmetric | data Decrypts ciphertext produced by WebCrypt back to plaintext or structured JSON.
`manage_keys` generate (rsa, ecdh, hmac, password) Generates JWK keypairs (RSA-4096, ECDH P-256/P-384) or high-entropy passwords.
`crypto_hash` SHA-256 | SHA-512 | SHA-3 Computes cryptographic hash digests in hex or base64.
`sign_verify` sign | verify (ECDSA, HMAC) Signs and verifies messages, release hashes, and evidence packs.
`pqc_kem_sign` Kyber KEM | Dilithium | Hybrid Post-quantum key encapsulation and lattice signatures.
๐Ÿ“– Read Complete Multi-IDE Setup Guide
Code Quickstart & Examples

Comprehensive Suite Examples

1. Symmetric AES-256-GCM Text & Data

import { WebCrypt } from "webcrypt"; const crypt = new WebCrypt(); // Encrypt text with password (OWASP 600k PBKDF2 + AES-256-GCM) const encryptedB64 = await crypt.encryptText( "Confidential data payload", "StrongUserPassword123!" ); // Decrypt text back to plaintext const decryptedText = await crypt.decryptText( encryptedB64, "StrongUserPassword123!" ); console.log(decryptedText); // "Confidential data payload"

2. Asymmetric RSA-4096 Hybrid Public Key Encryption

import { WebCryptAsym } from "webcrypt/webcrypt-asym"; const asym = new WebCryptAsym(); const keys = await asym.generateKeyPair(); // Encrypt text with public key const encrypted = await asym.encryptText("Top Secret Document", keys.publicKey); // Decrypt text with private key const decrypted = await asym.decryptText(encrypted, keys.privateKey);

3. Deterministic HMAC Authentication (SHA-256 / SHA-3)

// Generate HMAC key from password const key = await crypt.generateHmacKey("my-secret-password", "SHA-256"); // Compute signature tag const tag = await crypt.computeHmac("Message to sign", key); // Verify signature const isValid = await crypt.verifyHmac("Message to sign", tag, key);
Complete API Reference

Exported Modules & Signatures

Module Method Description
`WebCrypt` `encryptText(text, password)` AES-256-GCM text encryption returning Base64 salt+iv+ciphertext.
`WebCrypt` `decryptText(b64, password)` Decrypts Base64 string back to plain text.
`WebCrypt` `encryptFile(file, password, options)` Streaming file encryption returning encrypted Blob (parallelChunks support).
`WebCrypt` `createEncryptTransform(password)` WebRTC Insertable Streams E2EE media frame encryption transform.
`WebCrypt` `generateHmacKeySHA3(pass, hash, salt, iter)` Derives iterative SHA-3 HMAC key.
`WebCryptAsym` `generateKeyPair(modulusLength)` Generates 4096-bit RSA-OAEP key pair.
`WebCryptAsym` `encryptWithECDH(text, senderPrivateKey, recipientPublicKey)` One-step ECDH public-key encryption.
`WebCryptAsym` `signText(text, privateKey)` Digital signature creation using ECDSA P-256 or P-384.
`WebCryptAsym` `encryptJWE(payload, publicKey)` RFC 7516 5-part JWE Compact Serialization.
`WebCryptAsym` `deriveChildKeyHierarchical(parentKey, salt)` Hierarchical key derivation from parent key.
`WebCryptPQC` `kyberEncapsulate() / dilithiumSign()` NIST Post-Quantum Cryptography key exchange & signatures.
`TimingSafeHelper` `constantTimeCompareBuffers(a, b)` Constant-time buffer comparison preventing timing oracles.
Security & Legal Policy

Limitation of Liability & License

WebCrypt is maintained by PuterVision and released under the MIT License.

DISCLAIMER OF WARRANTY & LIMITATION OF LIABILITY WEBCRYPT IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT. IN NO EVENT SHALL PUTERVISION LLC, ITS AFFILIATES, OR CONTRIBUTORS BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.