# Encrypt .Pak Files

**URL:** <https://forums.unrealengine.com/t/encrypt-pak-files/384399>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [February 9, 2017, 11:56am UTC](https://forums.unrealengine.com/t/encrypt-pak-files/384399 "2017-02-09T11:56:32Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anonymous\_57339a53b18173d74e1e64c05a6f8114](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Anonymous\_57339a53b18173d74e1e64c05a6f8114](https://forums.unrealengine.com/u/Anonymous_57339a53b18173d74e1e64c05a6f8114)\
**Post date:** [February 9, 2017, 11:56am UTC](https://forums.unrealengine.com/t/encrypt-pak-files/384399/1 "2017-02-09T11:56:32Z")

</div>

I have an Question about Package an Game!

UE4 Generates -Pak Files ( They are Easy to Extract with Some Programms from Internet)

so how i can Encrypt it Saftley?

Greets

---

<div class="post-metadata">

**Author:** ![S-ed](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/s-ed/32/1194558_2.png) [@S-ed](https://forums.unrealengine.com/u/S-ed)\
**Post date:** [February 9, 2017, 12:44pm UTC](https://forums.unrealengine.com/t/encrypt-pak-files/384399/2 "2017-02-09T12:44:21Z")

</div>

You could follow:

[How to encrypt .PAK or package file? - Programming & Scripting - Unreal Engine Forums](https://answers.unrealengine.com/questions/385942/how-to-encrypt-pak-or-package-file.html)

But seems there’s still unresolved issue.

And imo, It’s just useless even to try to encrypt the data since key will be embedded in the game itself.

---

<div class="post-metadata">

**Author:** ![Anonymous\_57339a53b18173d74e1e64c05a6f8114](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Anonymous\_57339a53b18173d74e1e64c05a6f8114](https://forums.unrealengine.com/u/Anonymous_57339a53b18173d74e1e64c05a6f8114)\
**Post date:** [February 9, 2017, 12:52pm UTC](https://forums.unrealengine.com/t/encrypt-pak-files/384399/3 "2017-02-09T12:52:38Z")

</div>

So… what would be the Best and Saftey Way?

---

<div class="post-metadata">

**Author:** ![S-ed](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/s-ed/32/1194558_2.png) [@S-ed](https://forums.unrealengine.com/u/S-ed)\
**Post date:** [February 9, 2017, 12:58pm UTC](https://forums.unrealengine.com/t/encrypt-pak-files/384399/4 "2017-02-09T12:58:39Z")

</div>

Do not release the Game?

You can’t run the game w/o extracting the files. So in any case resources could be extracted eventually.

Also You could write own packager or encryption mechanism. That probably prevent 99% of chances to extract the resources.

That still not prevent users from DX buffer dumping, and extracting 3d models from video memory.

The only 100% way that makes sense is to stream the game, like PS Now does. But it’s obviously not the UE4 function.

---

<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:** [February 13, 2017, 6:48pm UTC](https://forums.unrealengine.com/t/encrypt-pak-files/384399/5 "2017-02-13T18:48:46Z")

</div>

,

I would suggest using AES Key encryption on your project if you’re worried about anything being stolen. Here is a [forum post][1] which may help you.

If you set the EncryptIniFiles=True within the code, you’ll be able to set up AES\_Key Encryption. You can easily do this by doing the following: Project Settings \> Packaging \> Encrypt ini files inside pak files (which enables EncryptIniFiles=True).

You’ll then want to open the Command Prompt located where the Unreal Pak tool is and run UnrealPak.exe \> -encrypt \> filepath for pak file \> -GenerateKeys=keyfilename \> - TableMax=#

![126118-2-13-2017+1-34-20+pm.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/0/2/302493a141a3665f19b74dc5051a9c3695e2682f.png)

I hope this helps!

---

<div class="post-metadata">

**Author:** ![Muzaheed](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/muzaheed/32/778940_2.png) [@Muzaheed](https://forums.unrealengine.com/u/Muzaheed)\
**Post date:** [March 27, 2017, 4:02pm UTC](https://forums.unrealengine.com/t/encrypt-pak-files/384399/6 "2017-03-27T16:02:41Z")

</div>

i run the same command. it keeps generating prime numbers for almost 2 days with 100% cpu usage.  
any idea ?

the only difference with your suggested cmd is that i did not put - TableMax part .

---

<div class="post-metadata">

**Author:** ![BrUnO\_XaVIeR](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/bruno_xavier/32/1110230_2.png) [@BrUnO\_XaVIeR](https://forums.unrealengine.com/u/BrUnO_XaVIeR)\
**Post date:** [March 27, 2017, 4:15pm UTC](https://forums.unrealengine.com/t/encrypt-pak-files/384399/7 "2017-03-27T16:15:42Z")

</div>

This is useless; you only need protection if you publish on PC platforms, but it’s impossible to protect asset files on PC.  
Anybody with half a brain can use extractors to recreate the files directly from the PC hardware, touching your .pak file isn’t even needed.
