Improve encrypted PCK robustness, by enforcing encrypted PCK usage and disabling certain unsafe features.#76161
Improve encrypted PCK robustness, by enforcing encrypted PCK usage and disabling certain unsafe features.#76161bruvzg wants to merge 1 commit intogodotengine:masterfrom
Conversation
d0b5c7e to
aaf4f88
Compare
|
Hey - thanks so much for working on this, it looks great. One thing I wanted to ask - will this also support AAB export? As new apps uploaded to playstore can only be uploaded in AAB format. From looking at the code, I would assume so based on |
m4gr3d
left a comment
There was a problem hiding this comment.
I'm curious if it's possible to add unit tests in order to validate the encryption logic and ensure we don't introduce regressions in the future.
@bruvzg Following on this comment, doesn't look like the encryption logic is applied to the |
f307c42 to
ddd22be
Compare
m4gr3d
left a comment
There was a problem hiding this comment.
For the export logic, can you move all the added logic into separate functions in a new export_encrypted_util file and call those functions from the current export logic. This will help encapsulate and reuse the logic and make the code easier to read and maintain.
Also there seems to be a high usage of magic numbers; is it possible to turn them into constants with clear names, and comment what the logic is doing.
f547b6d to
61acc9d
Compare
|
Did anyone tried to export an encrypted aab? I tried, compiling all of this and building an export template with this. The aab have encrypted assets, but the app doesn't launch. My app was running when exported not encrypted in aab using 4.2. It may be unrelated, I'm going to continue looking for the issue. from the logcat |
I tried building this commit and the export templates (as well as 4.2.1, and 4.3dev6) and it wasn't working for me either unfortunately... is there any update on this? Kind regards |
|
I tried to install an encrypted aab and it also crashed on startup, here's the full logcat: I think this is causing the crash in particular: USER ERROR: Can't open encrypted pack-referenced file '.godot/extension_list.cfg'.. If I extract the contents of the encrypted aab, there is no .godot/ folder in assets directory, it's only present in the non-encrypted aab. |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
a713a86 to
0be3a68
Compare
Add support for APK/AAB assets encryption using PCK encryption key/export config. Enforce encrypted core files and file directory usage, and disable certain unsafe features to prevent external code/overrides loading.
|
Closing in favor of #105984 (also enabled encryption for APK/AAB without excessive changes). |
I might be misunderstanding but wasn't this issue meant to improve robustness for every platform, while #105984 is ONLY for android? So are the other platforms just basically removed from consideration? Because this feature would make sure that when encryption is enabled, only further encrypted PCKs can be loaded. That feature is not the case now though... I think the whole addition of require_encryption to the PCK loader would have been generally a sweet thing to have, to have more safeguards in place to prevent exported games from being penetrated with imported packfiles too easily, heh |
Adds some extra restrictions to the exports with embedded encryption key (compiled with
SCRIPT_AES256_ENCRYPTION_KEY) to make encryption bypass by overriding project settings harder:Allows encrypting asset files in the APK/AAB using existing PCK encryption key/export config, without using APK extension.
project.godot/project.binaryoutside the PCK.override.cfg.Implements godotengine/godot-proposals#6675