Obscuro is a powerful Visual Studio Code extension designed to protect your source code and sensitive data. It offers robust file encryption and specialized handling for Python files, compiling them into binary extensions to safeguard your intellectual property.
Key Features
AES-256-GCM Encryption: Uses industry-standard encryption to ensure your files remain confidential and tamper-proof.
Partial Encryption: Encrypt specific secrets, API keys, or sensitive strings directly within your code without locking the entire file.
Python Binary Compilation: Automatically compiles Python (.py) files into binary shared libraries (.so or .pyd) using Cython, making them importable but unreadable to humans.
Seamless Integration: fast and easy-to-use commands directly from the VS Code Explorer and Editor context menus.
Installation
Install the extension from the VS Code Marketplace or by dragging the .vsix file into the Extensions view.
Ensure you have Python 3 installed if you plan to use the Python compilation features.
The extension will assist in installing necessary dependencies like cython and setuptools.
Usage
Encrypting a File
Right-click on any file in the VS Code Explorer.
Select Obscuro: Obscure (Encrypt).
Enter a secure password and confirm it.
The file will be encrypted (and compiled if it's Python), and the original will be securely removed.
Decrypting a File
Right-click on an .obscuro file.
Select Obscuro: Reveal (Decrypt).
Enter the password.
The original file will be restored.
Encrypting a Selection (Partial Encryption)
Select the text you want to encrypt in the editor (e.g., an API key).
Right-click and select Obscuro: Encrypt Selection (or run the command via Command Palette).
Enter a password.
The text will be replaced with an encrypted string format: OBSCURO:.....
Decrypting a Selection
Select the entire encrypted string (starting OBSCURO:).
Right-click and select Obscuro: Decrypt Selection.
Enter the password.
The original text will be revealed.
Security Details
Algorithm: AES-256-GCM (Galois/Counter Mode).
Key Derivation: PBKDF2 with SHA-256, 100,000 iterations, and a unique 16-byte salt per encryption.
Integrity: GCM provides built-in integrity checking to detect tampering.
No Backdoors: Passwords are never stored on disk. If you lose your password, the data cannot be recovered.
Troubleshooting
"Cython compilation failed": Ensure gcc (Linux/macOS) or MSVC (Windows) is installed.
"Invalid format": Ensure you have selected the entire encrypted string including the OBSCURO: prefix.