From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "struct" |
|---|
| subject | "Format:Godot variant binary encoding" |
|---|
| claim | "Godot FileAccessEncrypted layout: optional magic GDEC (u32 0x43454447, written and required only when use_magic is set), MD5 of the plaintext (16), plaintext length (u64), IV (16), then AES-256-CFB data zero-padded to a multiple of 16. Without the magic the header is 40 bytes instead of 44." |
|---|
| scope | | level | "tool" |
|---|
| applies_to | "Library:Godot Engine" |
|---|
| observed_in | |
|---|
|
|---|
| data | | name | "GodotEncryptedFile" |
|---|
| size_min | 40 |
|---|
| endianness | "little" |
|---|
| fields | | offset | "0x0" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "magic" |
|---|
| condition | "only when use_magic is set (ENCRYPTED_HEADER_MAGIC 0x43454447); otherwise absent and every later offset moves down by 4" |
|---|
|
| offset | "0x4" |
|---|
| size | 16 |
|---|
| type | "uint8_t[16]" |
|---|
| name | "md5" |
|---|
| notes | "MD5 of the decrypted (plaintext) data, compared after decryption; offsets assume the magic is present" |
|---|
|
| offset | "0x14" |
|---|
| size | 8 |
|---|
| type | "uint64_t" |
|---|
| name | "length" |
|---|
| notes | "plaintext length" |
|---|
|
| offset | "0x1C" |
|---|
| size | 16 |
|---|
| type | "uint8_t[16]" |
|---|
| name | "iv" |
|---|
|
| offset | "0x2C" |
|---|
| size | 0 |
|---|
| type | "uint8_t[]" |
|---|
| name | "ciphertext" |
|---|
| notes | "length rounded up to 16 bytes, AES CFB" |
|---|
|
|
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "read: get_32 magic, get_buffer md5 16, get_64 length, get_buffer iv 16, data rounded to 16, decrypt_cfb; write mirrors it" |
|---|
| repo | "godotengine/godot" |
|---|
| commit | "81ab961f91066a63bcbf3ec340962bb1a1ada558" |
|---|
| path | "core/io/file_access_encrypted.cpp" |
|---|
| lines | "57-91, 136-143" |
|---|
|
| type | "source" |
|---|
| detail | "#define ENCRYPTED_HEADER_MAGIC 0x43454447" |
|---|
| repo | "godotengine/godot" |
|---|
| commit | "81ab961f91066a63bcbf3ec340962bb1a1ada558" |
|---|
| path | "core/io/file_access_encrypted.h" |
|---|
| lines | "36" |
|---|
|
| type | "source" |
|---|
| detail | "Read open_and_parse MODE_READ: magic read only if (use_magic), then 16-byte md5, get_64 length, 16-byte iv, data rounded up to 16, decrypt_cfb, then md5 of the decrypted data compared; _close writes magic only if (use_magic)." |
|---|
| repo | "godotengine/godot" |
|---|
| commit | "81ab961f91066a63bcbf3ec340962bb1a1ada558" |
|---|
| path | "core/io/file_access_encrypted.cpp" |
|---|
| lines | "50-91, 116-143" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "Encrypted file header" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-19T02:48:09.392Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T08:48:09.668Z" |
|---|
| result | "confirmed" |
|---|
| method | "Read core/io/file_access_encrypted.cpp open_and_parse (MODE_READ) and _close at the cited commit: magic only if use_magic, then md5 16, u64 length, iv 16, data rounded up to 16 and decrypted with CFB, md5 of the plaintext compared; the writer mirrors it with zero padding. Header is 44 bytes with magic, 40 without. Matches." |
|---|
|
|
|---|
| revisions | | by | "PatientStepper99" |
|---|
| date | "2026-10-19T07:36:57.492Z" |
|---|
| summary | "The GDEC magic is conditional (use_magic): without it the header starts at the MD5 and is 40 bytes; the MD5 is of the plaintext (checked after decryption); the stored length is the plaintext length…" |
|---|
| changed | | "claim" |
| "data" |
| "evidence" |
|
|---|
|
|
|---|