How to encrypt .PAK or package file?

I want to encrypt .PAK file such that UE4PakUnpacker.exe and UnrealPak.exe can not extract content from it.

So I has add AES_KEY in AES.h file and build Unreal Engine and My Project. But unable to encrypt.

1 Like

,

If you pass -encrypt to UnrealPak, the internal data will be encrypted.

1 Like

this have any impact on the performance?

Encryption will mostly affect load times, during the loading stage it’ll decrypt. Once the decryption has occurred, the performance should level out and be normal.

Sorry, for highjacking this thread, but could you write a step by step guide on how to encrypt .PAK file.

Thank you.

You should be able to open a Command Prompt window, and drag UnrealPak and your .Pak files in there and add -encrypt to the end. The way I set mine up was first UnrealPak and then the .Pak files -encrypt.

I hope that helps, thanks!

I dragged and dropped UnrealPak.exe followed by .pak file and added -encrypt command at the end but it said:

LogPakFile: Display: Added 0 entries to add to pak file.
LogPakFile: Error: No files specified to add to pak file.

I’ve created a short video to demonstrate the problem I have:

Thank you for your help.

,

Sorry about that, I got mixed up in telling you the instructions. Ok, so open the command prompt like you did, but it’ll be: Unrealpak.exe > -encrypt > .pakfile.

It should say that it’s added the entries to the pak file. Let me know if you run into any other complications.

Thank you. :slight_smile:

Thank you for your reply , I did as you suggested, now there was an entry that was added:

LogPakFile:Display: Added 1 entries to add to pak file.
LogPakFile:Display: Collecting files to add to pak file…
LogPakFile:Display: Collected 1 files in 0.00s.
LogPakFile:Display: Added 1 files, 2619281228 bytes total, time 7.56s.

But when I tried to extract the pak file, it extracted it without any problems, so the encryption didn’t work again. How can I prevent the -extract command to be able to open the .pak file?

Here is a short video of what I did:
https://drive…com/file/d/0B0V4AxfEEBovRU4zRHJnbHIwbFE/view?usp=sharing

Thanks :slight_smile:

Hello,
I’m also troubled by this. Even though i haven’t successfully encrypt a pak file, how can i implement the new encrypted pak file in my unreal project. I see with the UnrealPak you could generate keys and table for the encryption but i was unable to properly use these functions.
Can anyone help me with this.

Numsi550,

Thanks for bringing this to our attention. I have tested it out, even with shipping and encryption added to the cooker commands in UFE and I have still been able to extract the files. UE-27348 is currently in for this issue. Feel free to respond back in a few weeks or so, and check up on the bug report.

Thanks!

Hello ,

I’m really glad that this problem is marked as an issue. But I can’t seem to find the issue in the Unreal Engine Issues (issue UE-27348).

UE-27348 isn’t released to the public, not all bugs are released to the public it all depends on what information is provided within the bug itself.

Thanks!

i’ve got the same problem :confused:

103643-screenshot_1.jpg

i’ve got the same problem, the .pak file is not encrypted. Plz help.

UE-27348 was entered for this issue. Thanks!

Hello,
I’d like to check up on the bug report. Has it been resolved?
Thanks

It’s still on our to do list. Hopefully we’ll have some more information in a month or so. It’s a priority 3, so it mostly likely won’t be worked on as quickly as a priority 2, 1 or 0 bug.

Thank you!

I don’t know the details about encrypting but, as the engine have its code open, wouldn’t be waste of time encript the pak? Or its possible to generate a unique key for the encryption?

You could consider looking into this: [FAES::EncryptData][1]

FAES::EncryptData | Unreal Engine Documentation