i need help with this description because i'm confused with the explanation :
"To determine whether a file is encrypted, the game checks offset 0x20 in the KTSR header which immediately follows the 0x10 byte SRST header. The encryption algorithm is Blowfish in ECB mode."
"The byte value stored in that offset is the encryption key length, with the key itself following from the next byte - if the value is 0, no decryption is performed."
my question within this file is, what is the encryption key? thanks~
Important information: this site is currently scheduled to go offline indefinitely by end of the year.
Stranger of Paradise: Final Fantasy Origin - SRST files
Stranger of Paradise: Final Fantasy Origin - SRST files
You do not have the required permissions to view the files attached to this post.
- ikskoks
- Moderator
- Posts: 1667
- Joined: Thu Jul 26, 2012 5:06 pm
- Location: Poland, Łódź
- Has thanked: 647 times
- Been thanked: 431 times
- Contact:
Re: Need help with Encryption of a game file..
What is name of the game this file comes from?
What is the platform? PC? XBOX?
Also please attach some samples.
What is the platform? PC? XBOX?
Also please attach some samples.
Re: Need help with Encryption of a game file..
it's a decrypted audio file(s) from SOPFFO PC which need to be re-encrypted to be played in-game. i couldn't attach a sample because that SRST file is over 500MBs..
i just need to know what is the encryption key based on my screenshot above.
- ikskoks
- Moderator
- Posts: 1667
- Joined: Thu Jul 26, 2012 5:06 pm
- Location: Poland, Łódź
- Has thanked: 647 times
- Been thanked: 431 times
- Contact:
Re: Stranger of Paradise: Final Fantasy Origin - SRST files
You can upload it to some hosting site like mega.nz, google drive etc. and then share a public link here.i couldn't attach a sample because that SRST file is over 500MBs..
That's NOT how reverse engineering worksi just need to know what is the encryption key based on my screenshot above.
Re: Stranger of Paradise: Final Fantasy Origin - SRST files
sorry i haven't explained before. the description i provide above is from the decryptor's github & that's what he/she provide regarding how to re-encrypt the file. since the repo has been archived, i can't comment to reply & github doesn't have private message feature.
that's why i'm asking here, so i could understand which part of the Hex is the encryption key from the decryptor's phrase: "The byte value stored in that offset is the encryption key length, with the key itself following from the next byte - if the value is 0, no decryption is performed."
- ikskoks
- Moderator
- Posts: 1667
- Joined: Thu Jul 26, 2012 5:06 pm
- Location: Poland, Łódź
- Has thanked: 647 times
- Been thanked: 431 times
- Contact:
Re: Stranger of Paradise: Final Fantasy Origin - SRST files
Ok, thanks for explanation. Can you send a link to this archived github repositroy?
I can't find it anywhere.
EDIT: Btw, according to the logic described by you in the first post, key length is 7 and key is "77 45 D6 E5 64 13 ED" (as hex).
I can't find it anywhere.
EDIT: Btw, according to the logic described by you in the first post, key length is 7 and key is "77 45 D6 E5 64 13 ED" (as hex).
Re: Stranger of Paradise: Final Fantasy Origin - SRST files
here's the link i've been forwarded when i asked some people in P5S modding discord regarding SOPFFO archive modding, since both utilize same format & i successfully mod weapon textures in SOPFFO (but haven't got more insight with BGMs).
https://github.com/yretenai/Cethleann/pull/36
btw, should i use openssl or quickbms to execute Blowfish ECB encryption? thanks a bunch~
https://github.com/yretenai/Cethleann/pull/36
btw, should i use openssl or quickbms to execute Blowfish ECB encryption? thanks a bunch~
- ikskoks
- Moderator
- Posts: 1667
- Joined: Thu Jul 26, 2012 5:06 pm
- Location: Poland, Łódź
- Has thanked: 647 times
- Been thanked: 431 times
- Contact:
Re: Stranger of Paradise: Final Fantasy Origin - SRST files
You can use quickbms (+ reimport mode)btw, should i use openssl or quickbms to execute Blowfish ECB encryption?
More info here http://aluigi.altervista.org/papers/quickbms.txt
This should be something like this in the script:
Code: Select all
encryption bf_ecb "\x77\x45\xD6\xE5\x64\x13\xED"
Re: Stranger of Paradise: Final Fantasy Origin - SRST files
hello @ikskoks , sorry for the hiatus (have been busy with work). i've successfully encrypt all individual audio files, but i get a bit problem regarding how do i repack these audio files into a KTSR package before putting it into SRST file.
i provide the original KTSR file as reference, and marked the starting lines of the 1st encrypted audio.
.
i provide the original KTSR file as reference, and marked the starting lines of the 1st encrypted audio.
.
You do not have the required permissions to view the files attached to this post.
Re: Stranger of Paradise: Final Fantasy Origin - SRST files
original KTSR file
https://www91.zippyshare.com/v/4sO9cvvW/file.html
encrypted individual audio files
https://www108.zippyshare.com/v/VbTEsJWB/file.html
https://www91.zippyshare.com/v/4sO9cvvW/file.html
encrypted individual audio files
https://www108.zippyshare.com/v/VbTEsJWB/file.html
- ikskoks
- Moderator
- Posts: 1667
- Joined: Thu Jul 26, 2012 5:06 pm
- Location: Poland, Łódź
- Has thanked: 647 times
- Been thanked: 431 times
- Contact:
Re: Stranger of Paradise: Final Fantasy Origin - SRST files
Quickbms has reimport mode (I've already mentioned it earlier).
You can import files back with the same script that was used for export.
You can import files back with the same script that was used for export.
Re: Stranger of Paradise: Final Fantasy Origin - SRST files
actually, i can't because i extracted those audios from this program https://github.com/yretenai/Cethleann/pull/36
i understand the reimport mode, but the script you provided only encrypted back each decrypted audio, so i'm a bit lost regarding to repackage them into KTSR.
- ikskoks
- Moderator
- Posts: 1667
- Joined: Thu Jul 26, 2012 5:06 pm
- Location: Poland, Łódź
- Has thanked: 647 times
- Been thanked: 431 times
- Contact:
Re: Stranger of Paradise: Final Fantasy Origin - SRST files
I'm not an expert on Koei Tecmo formats, but I think that if encryption method is known and Cethleann source code is public, it should be possible to rewrite it's code as quickbms script (at least small part of it) and then use the same script for reimport.
But first, someone needs to write such script and make it public.
But first, someone needs to write such script and make it public.