ZenHAX

Free Game Research Forum | Official QuickBMS support | twitter @zenhax | SSL HTTPS://zenhax.com
It is currently Thu Apr 26, 2018 11:09 pm

All times are UTC




Post new topic  Reply to topic  [ 8 posts ] 
Author Message
 Post subject: AES Encryption
PostPosted: Sat Apr 14, 2018 9:07 am 
User avatar

Joined: Sat Apr 14, 2018 9:01 am
Posts: 4
Am working on a project, which decrypts game files while retaining their structure. For that I need to decrypt AES 256 which by far none of the libraries available on internet were able to do properly due to AESBlockSize differences or Xor padding differences. QuickBMS's decrypt function works perfectly but it's too much intermingled with its command line. Can I get the function for AES256 or preferably AES which is used in QuickBMS. Any language might do :ugeek:


Top
   
 Post subject: Re: AES Encryption
PostPosted: Sat Apr 14, 2018 3:07 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 7947
First you need to specify what "encryption" command is used in quickbms.
Once you know the exact type of aes (there are many), key and ivec (if it's not ecb) then you have only to use the right library for your programming language.


Top
   
 Post subject: Re: AES Encryption
PostPosted: Sat Apr 14, 2018 7:35 pm 
User avatar

Joined: Sat Apr 14, 2018 9:01 am
Posts: 4
I traced it back to zip_aes_ctx with 256 bits key, which am not sure if am right or wrong. For current case, am trying to make it work for UE4's SAO:FB, which uses key as follows:
Code:
h67GrjX2aGMgrAQeNwf9VmCYbt50ylJFeP3rIhbxh4e9bZXnqm8sbvEjWGOi6rgs


Top
   
 Post subject: Re: AES Encryption
PostPosted: Sun Apr 15, 2018 4:42 am 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 7947
zip_aes is used only for ZIP archives.
I asked about the exact encryption command or the whole bms script


Top
   
 Post subject: Re: AES Encryption
PostPosted: Sun Apr 15, 2018 10:00 am 
User avatar

Joined: Sat Apr 14, 2018 9:01 am
Posts: 4
Code:
encryption aes AES_KEY "" 0 32


http://aluigi.org/papers/bms/others/unr ... ment_4.bms


Top
   
 Post subject: Re: AES Encryption
PostPosted: Sun Apr 15, 2018 3:40 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 7947
UE4 uses a simple AES 256 ecb, which means it uses no ivec while the key is 32 bytes long.
It's a very common implementation with plenty of libraries and stand-alone codes supporting it.


Top
   
 Post subject: Re: AES Encryption
PostPosted: Mon Apr 16, 2018 7:19 pm 
User avatar

Joined: Sat Apr 14, 2018 9:01 am
Posts: 4
I see, thanks for answering, just one more question, the key provided which I posted earlier, its 64 bytes long, not 32 bytes, does that mean it needs to be trimmed or parsed?


Top
   
 Post subject: Re: AES Encryption
PostPosted: Tue Apr 17, 2018 1:55 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 7947
yes, the script does that automatically with the "32" of the encryption command


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 8 posts ] 

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Limited