x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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.

Product Version: UE 4.8
Tags:
more ▼

asked Mar 07 '16 at 06:36 AM in Packaging & Deployment

avatar image

manuaganu
231 10 21 26

avatar image Wallenstein Aug 18 '17 at 03:26 PM

There needs to be an option to encrypt single ueasset files, not just Paks. If you have a huge game, using the Unreal patch mechanism is not an option. You need to deliver single asset files otherwise the patch delivery grows larger and larger since UE patching is accumulative.

Please Epic make this a priority! We need a simple way to encrypt all asset files during the pak process !

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

4 answers: sort voted first

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 Jira for this issue. Feel free to respond back in a few weeks or so, and check up on the bug report.

Thanks!

more ▼

answered Aug 13 '16 at 07:25 PM

avatar image numsi550 Aug 15 '16 at 10:33 AM

Hello Samantha,

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). https://issues.unrealengine.com/issue/UE-27348

avatar image Samantha Sutton ♦♦ STAFF Aug 16 '16 at 05:14 PM

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!

avatar image numsi550 Sep 01 '16 at 08:18 AM

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

avatar image Samantha Sutton ♦♦ STAFF Sep 01 '16 at 09:38 PM

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!

avatar image numsi550 Oct 04 '16 at 01:05 PM

Hi, It's been a few months and I'd like to know about the status of the issue UE-27348.

Thanks

avatar image Samantha Sutton ♦♦ STAFF Oct 07 '16 at 09:08 PM

UE-27348 is on our to do list, and assigned to a developer currently. However, since it's a priority 3, those priority 2, 1 and 0 are taken care of first.

Thanks!

avatar image Antvg Oct 22 '16 at 03:25 AM

Any news on the issue?

avatar image Estape Jan 28 '17 at 07:58 PM

Good afternoon, they fixed the UE-27348? Thank-you!

avatar image NaturalPanic STAFF Feb 03 '17 at 06:38 PM

This issue is actively being addressed, but since it is a non-trivial problem we are not able to provide an estimate on when the work may be completed.

When the feature is available, we'll be sure to update this thread.

avatar image OAXP is NinjaV3 May 13 '17 at 05:04 AM

Ok let us know please :D we need to protect our work.

avatar image mutp May 24 '17 at 12:16 PM

Is there any update on this? Would be great if we could track its progress.

avatar image Doug E ♦♦ STAFF May 24 '17 at 06:47 PM

Hey adarshmuthappa-

Unfortunately the report for this issue contains private information and cannot be made public. However the issues appears to have been fixed for 4.16. Please test your project in the latest version and let us know if you are still having this problem and we will investigate further.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Manuaganu,

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

more ▼

answered Mar 09 '16 at 07:01 PM

avatar image gustavorios2 Jul 11 '16 at 03:50 PM

this have any impact on the performance?

avatar image Samantha Sutton ♦♦ STAFF Jul 14 '16 at 06:03 PM

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.

avatar image numsi550 Jul 28 '16 at 04:06 PM

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

Thank you.

avatar image Samantha Sutton ♦♦ STAFF Aug 01 '16 at 08:31 PM

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!

avatar image numsi550 Aug 04 '16 at 08:55 AM

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: https://drive.google.com/file/d/0B0V4AxfEEBovaHdUYzBzdmxIbEk/view?usp=sharing

Thank you for your help.

avatar image Samantha Sutton ♦♦ STAFF Aug 04 '16 at 05:42 PM

Numsi,

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. :)

avatar image SalihBalkan Oct 23 '16 at 06:47 PM

Hi Samantha Sutton,

manuaganu says that AES_KEY is in AES.h. I added this line to Build.cs file of my project, is this true? Definitions.Add("AES_KEY=[SuperSecureKey]");

After I set encryption key correctly, how can I encrypt pak file for Android and iOS? Should I manually extract pak from OBB, encrypt pak file then replace with the old one inside the OBB file, via 7zip?

avatar image Samantha Sutton ♦♦ STAFF Oct 28 '16 at 07:34 PM

You should be able to encrypt Android and iOS files the same exact way as you would any other packaged file from the engine. Here is an AnswerHub post where I believe your questions may be answered.

Good luck!

avatar image numsi550 Aug 05 '16 at 08:09 AM

Thank you for your reply Samantha, 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.google.com/file/d/0B0V4AxfEEBovRU4zRHJnbHIwbFE/view?usp=sharing

Thanks :)

avatar image RasHammel Aug 08 '16 at 09:05 AM

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.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

i've got the same problem :/

more ▼

answered Aug 19 '16 at 07:47 PM

avatar image

nico77950
6 1 3 8

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

alt text

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

screenshot_1.jpg (13.4 kB)
more ▼

answered Aug 19 '16 at 07:49 PM

avatar image

nico77950
6 1 3 8

avatar image Samantha Sutton ♦♦ STAFF Aug 19 '16 at 08:43 PM

UE-27348 was entered for this issue. Thanks!

avatar image gustavorios2 Sep 06 '16 at 07:27 AM

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?

avatar image Samantha Sutton ♦♦ STAFF Sep 08 '16 at 06:04 PM

You could consider looking into this: FAES::EncryptData

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question