1 unstable release
new 0.1.0 | Mar 23, 2025 |
---|
#182 in WebAssembly
195KB
4K
SLoC
๐ RusWaCipher - Rust WebAssembly Encryption Tool
โ ๏ธ IMPORTANT NOTICE: RusWaCipher is currently in early development stage. The API and functionality are subject to change.
A Rust-based tool for encrypting and protecting WebAssembly (WASM) modules, preventing code from being easily analyzed or reverse-engineered.
๐ฏ Project Goals
- ๐ Provide encryption functionality for WASM modules
- ๐ Implement browser-side decryption runtime
- ๐ก๏ธ Protect WebAssembly code intellectual property
- ๐ Support multiple encryption algorithms
๐งฉ Core Components
- ๐ WASM Analyzer: Parse and modify WASM binary structures
- ๐ Encryption Engine: Support for AES-GCM and ChaCha20-Poly1305
- ๐ Decryption Runtime: Browser-side JavaScript decryption library
- ๐ป CLI Tools: Command-line interface for encryption operations
- ๐งฐ Plugin System: Support for custom encryption algorithms
๐ ๏ธ Technology Stack
- ๐ฆ Language: Rust 2021 Edition
- ๐ฆ WASM Parsing:
wasmparser
- ๐ Encryption:
aes-gcm
,chacha20poly1305
- โจ๏ธ CLI:
clap
๐ Project Status
RusWaCipher is an early-stage project with many features under active development:
- ๐ข Core Encryption: Basic encryption/decryption functionality
- ๐ก WASM Processing: Binary parsing and modification
- ๐ก Code Obfuscation: Control flow obfuscation, dead code insertion
- ๐ก JavaScript Runtime: Browser-side decryption
- ๐ก Plugin System: Custom algorithm integration
๐ Basic Usage
๐ฅ Installation
cargo install --path .
๐ Encrypting WASM Modules
ruswacipher encrypt -i input.wasm -o encrypted.wasm -a aes-gcm -b
๐ Decrypting WASM Modules
ruswacipher decrypt -i encrypted.wasm -o decrypted.wasm -k key_file.key
๐ Generating JavaScript Runtime
ruswacipher generate-web -o web_dir -a aes-gcm
๐ Security Considerations
- โ ๏ธ Browser-side decryption requires the key to be available in JavaScript
- ๐ก๏ธ For production, consider server-side key management
- ๐ Use this tool as one layer in a defense-in-depth strategy
๐ Documentation
Plugin development documentation and advanced features will be available soon.
๐ Continuous Integration
This project uses GitHub Actions for continuous integration and delivery:
- ๐งช CI Workflow: Automatically runs tests, linting, and builds for every push and pull request
- ๐ก๏ธ Security Audit: Regularly scans dependencies for security vulnerabilities
- ๐ฆ Release Workflow: Automates the creation of cross-platform releases when a new version is tagged
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
Dependencies
~7โ13MB
~163K SLoC