ZenHAX
http://zenhax.com/

AES Encryption
http://zenhax.com/viewtopic.php?f=11&t=7715
Page 1 of 1

Author:  TheFool [ Sat Apr 14, 2018 9:07 am ]
Post subject:  AES Encryption

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:

Author:  aluigi [ Sat Apr 14, 2018 3:07 pm ]
Post subject:  Re: AES Encryption

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.

Author:  TheFool [ Sat Apr 14, 2018 7:35 pm ]
Post subject:  Re: AES Encryption

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

Author:  aluigi [ Sun Apr 15, 2018 4:42 am ]
Post subject:  Re: AES Encryption

zip_aes is used only for ZIP archives.
I asked about the exact encryption command or the whole bms script

Author:  TheFool [ Sun Apr 15, 2018 10:00 am ]
Post subject:  Re: AES Encryption

Code:
encryption aes AES_KEY "" 0 32


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

Author:  aluigi [ Sun Apr 15, 2018 3:40 pm ]
Post subject:  Re: AES Encryption

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.

Author:  TheFool [ Mon Apr 16, 2018 7:19 pm ]
Post subject:  Re: AES Encryption

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?

Author:  aluigi [ Tue Apr 17, 2018 1:55 pm ]
Post subject:  Re: AES Encryption

yes, the script does that automatically with the "32" of the encryption command

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/