Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.
Zero Tolerance for Disrespect

Repack with AES crypto

Featured Replies

How do I repack a UE4.27.2 .pak (game: [REDACTED]) with UnrealPak using AES encryption?
I have game AES (which worked for unpacking with FModel tool), but every time I trie to repack with AES I get errors or seems to use a wrong key....
I put the AES key in Crypto.json, like this:

{
   "$types":{
      "UnrealBuildTool.EncryptionAndSigning+CryptoSettings, UnrealBuildTool, Version=4.0.0.0, Culture=neutral, PublicKeyToken=null":"1",
      "UnrealBuildTool.EncryptionAndSigning+EncryptionKey, UnrealBuildTool, Version=4.0.0.0, Culture=neutral, PublicKeyToken=null":"2",
      "UnrealBuildTool.EncryptionAndSigning+SigningKeyPair, UnrealBuildTool, Version=4.0.0.0, Culture=neutral, PublicKeyToken=null":"3",
      "UnrealBuildTool.EncryptionAndSigning+SigningKey, UnrealBuildTool, Version=4.0.0.0, Culture=neutral, PublicKeyToken=null":"4"
   },
   "$type":"1",
   "EncryptionKey":{
      "$type":"2",
      "Name":"null",
      "Guid":"null",
      "Key":"0x1958456F8B54A02D25DF32327C57C9D20DFCF7E948967D08CFB48E8EBC65BEEB"
   },
   "SigningKey": false,
   "bEnablePakSigning":true,
   "bEnablePakIndexEncryption":true,
   "bEnablePakIniEncryption":true,
   "bEnablePakUAssetEncryption":true,
   "bEnablePakFullAssetEncryption":false,
   "bDataCryptoRequired":true,
   "PakEncryptionRequired":true,
   "PakSigningRequired":true,
   "SecondaryEncryptionKeys":[

   ]
}

but fails miserably:

C:\Users\Luca\Documents\Lavori in corso\Traduzioni - tools\UE\UnrealPakTool>UnrealPak.exe "D:\Epic Games\Redacted\Redacted\Content\Paks\pakchunk0-WindowsNoEditor1.pak" -Create="Lista.txt" -Encrypt -Cryptokeys="Crypto.json" -projectdir="C:\Users\user\Documents\Lavori in corso\Traduzioni - tools\UE\UnrealPakTool"
LogInit: Display: Loading text-based GConfig....
LogPakFile: Display: Parsing crypto keys from a crypto key cache file
LogWindows: Error: === Critical error: ===
LogWindows: Error:
LogWindows: Error: Assertion failed: Key.Num() == sizeof(FAES::FAESKey::Key) [File:D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Public\Misc/KeyChainUtilities.h] [Line: 81]
LogWindows: Error:
LogWindows: Error: [Callstack] 0x00007ffc5f407dc7 UnrealPak-Core.dll!FDebug::CheckVerifyFailedImpl() []
LogWindows: Error: [Callstack] 0x00007ffcb417cad6 UnrealPak-PakFileUtilities.dll!KeyChainUtilities::LoadKeyChainFromFile() []
LogWindows: Error: [Callstack] 0x00007ffcb417b665 UnrealPak-PakFileUtilities.dll!LoadKeyChain() []
LogWindows: Error: [Callstack] 0x00007ffcb416ebd4 UnrealPak-PakFileUtilities.dll!ExecuteUnrealPak() []
LogWindows: Error: [Callstack] 0x00007ff7dae6b037 UnrealPak.exe!wmain() []
LogWindows: Error: [Callstack] 0x00007ff7dae6be18 UnrealPak.exe!__scrt_common_main_seh() []
LogWindows: Error: [Callstack] 0x00007ffd323ae8d7 KERNEL32.DLL!UnknownFunction []
LogWindows: Error: [Callstack] 0x00007ffd3376c53c ntdll.dll!UnknownFunction []
LogWindows: Error:
LogWindows: Error:
LogWindows: Error:
LogWindows: Error:

 

So I tried using Base64 key in the JSON above, no error, but seems to use generic AES key 00000000000000000000000000000000 (???) now:

C:\Users\Luca\Documents\Lavori in corso\Traduzioni - tools\UE\UnrealPakTool>UnrealPak.exe "D:\Epic Games\Redacted\Redacted\Content\Paks\pakchunk0-WindowsNoEditor1.pak" -Create="Lista.txt" -Encrypt -Cryptokeys="Crypto.json" -projectdir="C:\Users\user\Documents\Lavori in corso\Traduzioni - tools\UE\UnrealPakTool"
LogInit: Display: Loading text-based GConfig....
LogPakFile: Display: Parsing crypto keys from a crypto key cache file
LogPakFile: Display: Loading response file Lista.txt
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: Creating pak D:\Epic Games\Redacted\Redacted\Content\Paks\pakchunk0-WindowsNoEditor1.pak.
LogPakFile: Display: Using encryption key 'Default' [00000000000000000000000000000000]
LogPakFile: Display: CompressionFormats in priority order: Zlib
LogDerivedDataCache: Display: Performance to ../../../Engine/DerivedDataCache: Latency=0.00ms. RandomReadSpeed=999.00MBs, RandomWriteSpeed=999.00MBs. Assigned SpeedClass 'Local'
LogPakFile: Display: CompressionFormat 0 [Zlib] : 0 files, 0 -> 0 bytes
LogPakFile: Display: CompressionFormat 1 [None] : 1 files, 1738362 -> 1738362 bytes
LogPakFile: Display: Added 1 files, 1738860 bytes total, time 0.01s.
LogPakFile: Display: PrimaryIndex size: 164 bytes
LogPakFile: Display: PathHashIndex size: 20 bytes
LogPakFile: Display: FullDirectoryIndex size: 34 bytes
LogPakFile: Display: Encryption - ENABLED
LogPakFile: Display:   Files: 1
LogPakFile: Display:   Index: Unencrypted
LogPakFile: Display:   Total: 1738368 bytes (1.66MB)
LogPakFile: Display: Unreal pak executed in 0.015542 seconds

 

How does it work this AES encryption? What am I doing wrong...? There is no help on the net and in other forums...

Edited by hexaae

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.