# How to encrypt .PAK or package file?

**URL:** <https://forums.unrealengine.com/t/how-to-encrypt-pak-or-package-file/349774>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [March 7, 2016, 6:36am UTC](https://forums.unrealengine.com/t/how-to-encrypt-pak-or-package-file/349774 "2016-03-07T06:36:17Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_0dafa81b](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_0dafa81b](https://forums.unrealengine.com/u/anonymous_user_0dafa81b)\
**Post date:** [March 7, 2016, 6:36am UTC](https://forums.unrealengine.com/t/how-to-encrypt-pak-or-package-file/349774/1 "2016-03-07T06:36:17Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_a08c0bf2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_a08c0bf2](https://forums.unrealengine.com/u/anonymous_user_a08c0bf2)\
**Post date:** [March 9, 2016, 7:01pm UTC](https://forums.unrealengine.com/t/how-to-encrypt-pak-or-package-file/349774/2 "2016-03-09T19:01:07Z")

</div>

,

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

---

<div class="post-metadata">

**Author:** ![gustavorios2](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/gustavorios2/32/1194641_2.png) [@gustavorios2](https://forums.unrealengine.com/u/gustavorios2)\
**Post date:** [July 11, 2016, 3:50pm UTC](https://forums.unrealengine.com/t/how-to-encrypt-pak-or-package-file/349774/3 "2016-07-11T15:50:03Z")

</div>

this have any impact on the performance?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_a08c0bf2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_a08c0bf2](https://forums.unrealengine.com/u/anonymous_user_a08c0bf2)\
**Post date:** [July 14, 2016, 6:03pm UTC](https://forums.unrealengine.com/t/how-to-encrypt-pak-or-package-file/349774/4 "2016-07-14T18:03:46Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2c124cb81](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2c124cb81](https://forums.unrealengine.com/u/anonymous_user_2c124cb81)\
**Post date:** [July 28, 2016, 4:06pm UTC](https://forums.unrealengine.com/t/how-to-encrypt-pak-or-package-file/349774/5 "2016-07-28T16:06:49Z")

</div>

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

Thank you.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_a08c0bf2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_a08c0bf2](https://forums.unrealengine.com/u/anonymous_user_a08c0bf2)\
**Post date:** [August 1, 2016, 8:31pm UTC](https://forums.unrealengine.com/t/how-to-encrypt-pak-or-package-file/349774/6 "2016-08-01T20:31:29Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2c124cb81](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2c124cb81](https://forums.unrealengine.com/u/anonymous_user_2c124cb81)\
**Post date:** [August 4, 2016, 8:55am UTC](https://forums.unrealengine.com/t/how-to-encrypt-pak-or-package-file/349774/7 "2016-08-04T08:55:33Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_a08c0bf2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_a08c0bf2](https://forums.unrealengine.com/u/anonymous_user_a08c0bf2)\
**Post date:** [August 4, 2016, 5:42pm UTC](https://forums.unrealengine.com/t/how-to-encrypt-pak-or-package-file/349774/8 "2016-08-04T17:42:59Z")

</div>

,

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. 🙂

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2c124cb81](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2c124cb81](https://forums.unrealengine.com/u/anonymous_user_2c124cb81)\
**Post date:** [August 5, 2016, 8:09am UTC](https://forums.unrealengine.com/t/how-to-encrypt-pak-or-package-file/349774/9 "2016-08-05T08:09:50Z")

</div>

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](https://drive)…com/file/d/0B0V4AxfEEBovRU4zRHJnbHIwbFE/view?usp=sharing

Thanks 🙂

---

<div class="post-metadata">

**Author:** ![RasHammel](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RasHammel](https://forums.unrealengine.com/u/RasHammel)\
**Post date:** [August 8, 2016, 9:05am UTC](https://forums.unrealengine.com/t/how-to-encrypt-pak-or-package-file/349774/10 "2016-08-08T09:05:43Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_a08c0bf2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_a08c0bf2](https://forums.unrealengine.com/u/anonymous_user_a08c0bf2)\
**Post date:** [August 13, 2016, 7:25pm UTC](https://forums.unrealengine.com/t/how-to-encrypt-pak-or-package-file/349774/11 "2016-08-13T19:25:36Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2c124cb81](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2c124cb81](https://forums.unrealengine.com/u/anonymous_user_2c124cb81)\
**Post date:** [August 15, 2016, 10:33am UTC](https://forums.unrealengine.com/t/how-to-encrypt-pak-or-package-file/349774/12 "2016-08-15T10:33:57Z")

</div>

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

> **[The Unreal Engine Issues and Bug Tracker](https://issues.unrealengine.com/issue/UE-27348)**
>
> Welcome to the Unreal Engine Issue and Bug Tracker. You can check the status of an issue and search for existing bugs. See latest bug fixes too.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_a08c0bf2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_a08c0bf2](https://forums.unrealengine.com/u/anonymous_user_a08c0bf2)\
**Post date:** [August 16, 2016, 5:14pm UTC](https://forums.unrealengine.com/t/how-to-encrypt-pak-or-package-file/349774/13 "2016-08-16T17:14:46Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![nico77950](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@nico77950](https://forums.unrealengine.com/u/nico77950)\
**Post date:** [August 19, 2016, 7:47pm UTC](https://forums.unrealengine.com/t/how-to-encrypt-pak-or-package-file/349774/14 "2016-08-19T19:47:43Z")

</div>

i’ve got the same problem 😕

---

<div class="post-metadata">

**Author:** ![nico77950](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@nico77950](https://forums.unrealengine.com/u/nico77950)\
**Post date:** [August 19, 2016, 7:49pm UTC](https://forums.unrealengine.com/t/how-to-encrypt-pak-or-package-file/349774/15 "2016-08-19T19:49:01Z")

</div>

![103643-screenshot_1.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/1/8/01813c8d1cbfc1bff32f3f6c74fef39f8f33a4f7.jpeg)

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

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_a08c0bf2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_a08c0bf2](https://forums.unrealengine.com/u/anonymous_user_a08c0bf2)\
**Post date:** [August 19, 2016, 8:43pm UTC](https://forums.unrealengine.com/t/how-to-encrypt-pak-or-package-file/349774/16 "2016-08-19T20:43:48Z")

</div>

UE-27348 was entered for this issue. Thanks!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2c124cb81](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2c124cb81](https://forums.unrealengine.com/u/anonymous_user_2c124cb81)\
**Post date:** [September 1, 2016, 8:18am UTC](https://forums.unrealengine.com/t/how-to-encrypt-pak-or-package-file/349774/17 "2016-09-01T08:18:32Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_a08c0bf2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_a08c0bf2](https://forums.unrealengine.com/u/anonymous_user_a08c0bf2)\
**Post date:** [September 1, 2016, 9:38pm UTC](https://forums.unrealengine.com/t/how-to-encrypt-pak-or-package-file/349774/18 "2016-09-01T21:38:27Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![gustavorios2](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/gustavorios2/32/1194641_2.png) [@gustavorios2](https://forums.unrealengine.com/u/gustavorios2)\
**Post date:** [September 6, 2016, 7:27am UTC](https://forums.unrealengine.com/t/how-to-encrypt-pak-or-package-file/349774/19 "2016-09-06T07:27:18Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_a08c0bf2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_a08c0bf2](https://forums.unrealengine.com/u/anonymous_user_a08c0bf2)\
**Post date:** [September 8, 2016, 6:04pm UTC](https://forums.unrealengine.com/t/how-to-encrypt-pak-or-package-file/349774/20 "2016-09-08T18:04:48Z")

</div>

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

[FAES::EncryptData | Unreal Engine Documentation](https://docs.unrealengine.com/latest/INT/API/Runtime/Core/Misc/FAES/EncryptData/1/index.html)

[Next page](https://forums.unrealengine.com/t/how-to-encrypt-pak-or-package-file/349774.md?page=2)
