# HideFiles — Complete Technical & Architectural Reference (llms-full.txt)
> Zero-Knowledge Client-Side Document Unlocker, Archive Extractor, Cryptographic Utility, and AI Document Analyst.
## 1. Executive Summary
HideFiles runs 100% locally inside the user's browser memory using WebCrypto (`window.crypto.subtle`), pure JavaScript archive parsers, and local document reconstructors (`pdf-lib`, `pdfjs-dist`, `@zip.js/zip.js`, `pako`, `openpgp`). Zero bytes of user files or passwords ever leave the device.
## 2. Supported Formats & Cryptographic Specifications
### 2.1 Document Password & Restriction Removal
1. **PDF (`.pdf`)**:
- **Owner Restrictions**: Strips `/Encrypt` dictionaries and resets `/P` permission bitmasks to restore full printing, copying, and editing.
- **Open Passwords**: Authenticates via ISO 32000-1 security handlers (`RC4-40`, `RC4-128`, `AES-128-CBC`, `AES-256-CBC` R5/R6 and AES-256-GCM streams) and serializes a new unencrypted PDF 1.7 document with valid `xref` byte offsets.
2. **Word (`.docx`)**:
- Parses OOXML ZIP package and removes `` and `` from `word/settings.xml`.
3. **Excel (`.xlsx`)**:
- Removes `` and `` from `xl/workbook.xml`, and removes `` from `xl/worksheets/sheet*.xml`.
4. **PowerPoint (`.pptx`)**:
- Removes `` from `ppt/presentation.xml`.
### 2.2 Archive Extraction & Creation
- **ZIP (`.zip`)**: Deflate compression + WinZip `AES-128`, `AES-192`, `AES-256` and legacy `ZipCrypto` encryption.
- **7-Zip (`.7z`)**: Signature `37 7A BC AF 27 1C`, supports `AES-256-GCM` encrypted containers (`PBKDF2-HMAC-SHA256`, 100,000 iterations, 128-bit salt, 96-bit IV).
- **TAR (`.tar`)**: POSIX `ustar` 512-byte header blocks with octal checksum verification.
- **GZIP / TAR.GZ (`.gz`, `.tar.gz`, `.tgz`)**: RFC 1952 GZIP magic `1F 8B` decompression and compression.
### 2.3 Standalone Ciphers & Encodings
- **AES-256-GCM (`.gcm`, `.enc`)**: Header `VENC\x01` (5B) + Salt (16B) + IV (12B) + Ciphertext + 128-bit Auth Tag.
- **AES-256-CBC (`.cbc`)**: Header `VENC\x02` (5B) + Salt (16B) + IV (16B) + PKCS#7 Padded Ciphertext; also supports OpenSSL `Salted__` (8B) + Salt (8B) PBKDF2 format.
- **Fernet (`.fernet`)**: Version `0x80` (1B) + 64-bit Timestamp (8B) + IV (16B) + AES-128-CBC Ciphertext + 256-bit HMAC-SHA256 Signature (32B), encoded in Base64URL.
- **OpenPGP / GPG (`.gpg`, `.pgp`, `.asc`)**: RFC 4880 symmetric session key encryption (`AES-256`).
- **Base64 & Hexadecimal (`.b64`, `.hex`)**: Bidirectional binary/text transcoding with SHA-256 digest verification.
## 3. Frequently Asked Questions (FAQ)
- **Are my files uploaded to any server?** No. Every operation happens locally in your browser's RAM using the WebCrypto API.
- **Can HideFiles remove Word and Excel editing locks without knowing the password?** Yes. Read-only editing restrictions in `.docx` and locked worksheet cells in `.xlsx` are stored as XML enforcement tags inside the OOXML package and are stripped instantly without needing the password.
- **Can HideFiles remove a PDF open password?** Yes, if you know the current open password, HideFiles decrypts the PDF streams and saves a permanently unlocked PDF copy so you never have to enter the password again. Owner print/copy restrictions are stripped automatically without a password.