This page is the authoritative specification for the binary file format produced by Secure Crypt. Every file locked by the application — whether a single document or an entire folder — is written with a fixed 29-byte header followed by variable-length AES-GCM ciphertext. Understanding this layout is useful for auditing, interoperability, or writing your own tooling that reads Secure Crypt files.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Anzi001/Secure-Crypt/llms.txt
Use this file to discover all available pages before exploring further.
File Extensions
Secure Crypt uses two distinct file extensions to distinguish between encrypted files and encrypted folders.| Extension | Contents | Produced by |
|---|---|---|
.scrypt | Encrypted single file | Lock File or Quick View re-lock |
.scryptfold | Encrypted folder (zipped archive) | Lock Folder or Quick View Folder re-lock |
.scrypt is appended to the existing extension rather than replacing it. The same rule applies to .scryptfold for folders.
Examples:
| Original | Encrypted |
|---|---|
report.pdf | report.pdf.scrypt |
photo.jpg | photo.jpg.scrypt |
notes.txt | notes.txt.scrypt |
my-folder/ | my-folder.scryptfold |
Binary Layout
Every.scrypt and .scryptfold file begins with a 29-byte header. The ciphertext begins immediately at byte offset 29 and extends to the end of the file.
| Field | Offset | Size | Description |
|---|---|---|---|
| Flag | 0 | 1 byte | 0x4D (ASCII 'M') for Force Lock files; any other byte for standard files |
| Salt | 1 | 16 bytes | Random PBKDF2 salt generated with os.urandom(16) |
| Nonce | 17 | 12 bytes | Random AES-GCM nonce generated with os.urandom(12) |
| Ciphertext | 29 | variable | AES-GCM ciphertext with the 16-byte authentication tag appended |
.scrypt file without decrypting it:
Because the salt and nonce are generated freshly with
os.urandom each time a file is encrypted — including after every Quick View re-lock — encrypting the same plaintext twice with the same password will produce two completely different ciphertext blobs. No two .scrypt files are ever identical even if they protect the same data.Folder Archive Format
.scryptfold files store an encrypted ZIP archive of the original folder. The encryption process for folders works in two stages:
- The entire folder tree is compressed into an in-memory ZIP archive using Python’s
zipfilemodule. - The resulting ZIP bytes are encrypted as a single binary blob using AES-256-GCM, then written to disk with the standard 29-byte header.
.zip file that reproduces the original folder hierarchy exactly. During a Quick View or Unlock Folder operation, Secure Crypt writes this ZIP to the OS temporary directory and extracts it with zipfile.ZipFile.extractall() before opening the folder.
The intermediate ZIP file is never written as a named archive on your disk during a Lock Folder operation — it exists only in memory before encryption. During Quick View, the temporary extraction directory is cleaned up with
shutil.rmtree() after re-locking.Flag Byte Values
The first byte of every Secure Crypt file is a flag that controls how the file may be accessed.| Value | Hex | Meaning |
|---|---|---|
ASCII 'M' | 0x4D | Mandatory / Force Lock — file was encrypted with the Force Password Every Time option. Permanent unlocking is blocked; Quick View only. |
| Any other byte | — | Standard encrypted file — can be permanently unlocked with the correct password. |
b'M', the unlock is rejected immediately with a dialog titled "Access Denied" and the message "Mandatory lock. Use Quick View." — no password is ever tried for a permanent unlock of a Force Lock file.