Gildor's Forums

Author Topic: How to work AES key ?  (Read 2497 times)
BlendSkill
Jr. Member
**
Posts: 40


View Profile
How to work AES key ?
« on: May 06, 2019, 16:11 »

Hi
I'm trying to make a little software to extract uasset and uexp from Fortnite paks, but I can not understand how to link the index and files with the AES key. I tried to read the codes of Umodel but I do not understand anything in C ++ (I program in C #). Can you help me please?
Logged
Gildor
Administrator
Hero Member
*****
Posts: 7924



View Profile WWW
Re: How to work AES key ?
« Reply #1 on: May 06, 2019, 16:18 »

AES key is used in 2 places for UE4 games. The usual case: encrypted files. Another case: encrypted pak file index, when files themselves aren't encrypted (but it is possible to encrypt them), however pak's file list is stored as a single memory block and then encryption is applied.

What difficulties you have with reading umodel's C++ code?
Logged
BlendSkill
Jr. Member
**
Posts: 40


View Profile
Re: How to work AES key ?
« Reply #2 on: May 06, 2019, 16:20 »

It's just that I never learned that language.
Logged
Gildor
Administrator
Hero Member
*****
Posts: 7924



View Profile WWW
Re: How to work AES key ?
« Reply #3 on: May 06, 2019, 16:25 »

Anyway, I need particular questions. I've explained things "in general", but "details" needs detail questions.
Logged
BlendSkill
Jr. Member
**
Posts: 40


View Profile
Re: How to work AES key ?
« Reply #4 on: May 06, 2019, 16:29 »

When I open the paks, I know that each uasset starts with "Áƒ*žùÿÿÿ". But for example, in the image below, how to know which file belongs to the code? BP_SprayDecal or SPID_002_XMark?

https://image.noelshack.com/fichiers/2019/19/1/1557145729-capture.png
Logged
BlendSkill
Jr. Member
**
Posts: 40


View Profile
Re: How to work AES key ?
« Reply #5 on: May 06, 2019, 16:31 »

*Sorry if my English is not very correct, I'm French and I'm 16 years old
Logged
BlendSkill
Jr. Member
**
Posts: 40


View Profile
Re: How to work AES key ?
« Reply #6 on: May 06, 2019, 16:33 »

I thought that the AES key would allow me to identify the file.
Logged
Gildor
Administrator
Hero Member
*****
Posts: 7924



View Profile WWW
Re: How to work AES key ?
« Reply #7 on: May 06, 2019, 16:34 »

I feel you're not experienced with file processing. I'm not checking any patterns, I'm getting the beginning of the file and it's name from pak file "index" which is located at the end of file.
Logged
BlendSkill
Jr. Member
**
Posts: 40


View Profile
Re: How to work AES key ?
« Reply #8 on: May 06, 2019, 16:39 »

Indeed I am a beginner in this field.
I do not understand very well where is this index, you could explain to me again please?
Logged
Gildor
Administrator
Hero Member
*****
Posts: 7924



View Profile WWW
Re: How to work AES key ?
« Reply #9 on: May 06, 2019, 16:46 »

I'd suggest you looking at umodel's UnArchivePak.h, method AttachReader of class FPakVFS locates and reads pak file index. There's no spec exists for any Unreal engine 4 data format, so you have to read C++ code to understand it. If you'd prefer reading UE4 code, then look at Engine/Source/Runtime/PakFile/Public/IPlatformFilePak.h, method FPakInfo::Serialize().
Logged
BlendSkill
Jr. Member
**
Posts: 40


View Profile
Re: How to work AES key ?
« Reply #10 on: May 06, 2019, 16:49 »

Okay, I'll go see that. Thanks a lot for your help.
Logged
Jump to:  

Powered by SMF | SMF © 2006-2009, Simple Machines LLC
Leviathan design by Bloc | XHTML | CSS