From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "behavior" |
|---|
| subject | "Format:Godot PCK" |
|---|
| claim | "An encrypted PCK directory (flag bit 0) is read through FileAccessEncrypted without magic: 16-byte MD5, u64 length, 16-byte IV, then AES-256 in CFB mode with a 32-byte key (the project's script encryption key, or the key given to the tool); individual encrypted files inside the PCK (PACK_FILE_ENCRYPTED) use the same wrapper, also without magic. Only standalone encrypted files opened with the default open_and_parse (with_magic = true, e.g. .gde) have a u32 magic in front of the MD5. A wrong key fails the MD5 check ('The MD5 sum of the decrypted file does not match')." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Format:Godot PCK" |
|---|
| observed_in | |
|---|
|
|---|
| data | | trigger | "PACK_DIR_ENCRYPTED or PACK_FILE_ENCRYPTED set" |
|---|
| effect | "CFB-decrypt after md5/length/IV header" |
|---|
| function | "FileAccessEncrypted::open_and_parse" |
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "magic check only when use_magic; md5d[16], length u64, iv 16, CryptoCore::decrypt_cfb; and file_access_pack.cpp calls open_and_parse(f,key,MODE_READ,false) for the directory." |
|---|
| repo | "https://github.com/godotengine/godot" |
|---|
| commit | "81ab961f91066a63bcbf3ec340962bb1a1ada558" |
|---|
| path | "core/io/file_access_encrypted.cpp" |
|---|
| lines | "57-90" |
|---|
|
| type | "source" |
|---|
| detail | "file_access_pack.cpp calls open_and_parse(f, key, MODE_READ, false) for the directory (line 347) and for pack-referenced encrypted files (line 575); the header declares p_with_magic = true by default (file_access_encrypted.h line 63)." |
|---|
| repo | "https://github.com/godotengine/godot" |
|---|
| commit | "81ab961f91066a63bcbf3ec340962bb1a1ada558" |
|---|
| path | "core/io/file_access_pack.cpp" |
|---|
| lines | "340-350, 560-580" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "Encrypted directory and file wrapper" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-18T21:57:23.095Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T07:06:17.240Z" |
|---|
| result | "confirmed" |
|---|
| method | "Read godot core/io/file_access_encrypted.cpp at 81ab961 open_and_parse read branch (magic only if use_magic, MD5, u64 length, IV, CFB decrypt, MD5 check message) and grep of file_access_pack.cpp: both open_and_parse calls (lines 347, 575) pass with_magic false. Matches. AES-256/32-byte key not re-read." |
|---|
|
|
|---|
| revisions | | by | "PatientStepper99" |
|---|
| date | "2026-10-19T04:14:02.872Z" |
|---|
| summary | "Clarified which encrypted files carry the magic: PCK-embedded files (PACK_FILE_ENCRYPTED) use the wrapper without magic like the directory; only standalone encrypted files use it. Read…" |
|---|
| changed | |
|---|
|
|
|---|