qTe Docs — Security & Protection
Security & Protection
File protection, encryption, password chains, and security phrases
Security Overview
qTe provides multiple layers of security: file-level protection via extension renaming,
content-level encryption using password-derived keys, an 11-character password chain system,
and application-level security phrases for access control.
File Protection (.qTe → .qTp)
File protection is a simple but effective mechanism: offset files are renamed from .qTe
to .qTp. The decoder only scans for .qTe files, so protected files
are invisible to the decoding process until unprotected.
Implementation (qTeLite Reference)
LoadProtectFilesList() — Scans qte_offsets for *.qTe files
- User selects files and enters 11-character password
ProtectFiles() — Calls File.Move(path, Path.ChangeExtension(path, ".qTp"))
- Protected files disappear from decoder file list
Encryption (DES)
Content-level encryption uses DES with a key derived from the user's password. The password is
padded or trimmed to 16 characters, then split into an 8-byte key and 8-byte IV.
Password (any length) → Pad/trim to 16 chars
Key = first 8 chars (UTF-8 bytes)
IV = last 8 chars (UTF-8 bytes)
DES-CBC encrypt → Base64 output
Legacy consideration: DES is used for backward compatibility. The encoding itself
provides significant obfuscation through the bijection/offset system, making the DES layer an
additional convenience protection rather than the primary security boundary.
Password Chain
The PasswordChain system generates and validates 11-character passwords. When a file
is encoded with a password, the password is required for decoding. Passwords can be shared with
contacts via the app.qte.share.password AT Protocol collection.
Password Requirements
- Exactly 11 characters
- Used as the encryption key (padded to 16 chars for DES)
- Stored hashed — never in plaintext
- Can be shared securely via AT Protocol password share records
Security Phrase
The security phrase is an application-level lock. When enabled, users must enter the phrase
to access the app. The phrase is hashed with SHA-256 and stored locally.
SecurityViewModel Flow
- User enters security phrase (minimum 8 characters) and confirms it
- Phrase is hashed:
SHA256(UTF8(phrase)) → Base64
- Hash stored in
security_settings.json
- On app launch, user prompted to enter phrase — hash compared
- Protected file count shown by scanning
*.qTp files in offsets folder
Privacy Levels
| Level | Value | Description |
| Public | 0 | Visible to anyone, can be syndicated |
| Contacts | 1 | Visible only to accepted contacts |
| Private | 2 | Local only, never shared (default) |