Jump to content

Kirikir/KAG .sig files


Recommended Posts

  • 1 month later...

I was about to make a topic about that, before noticing this.

To answer your question... Kirikiri2, under tools, has an application called "krkrsign.exe" which makes those .sig files.
However, when making a .sig file for my patch, the game simply returns "Invalid Input Packet".
I even remade the .sig file for the original data.xp3 but with no success.

The weird thing is that, upon making a patch for yet another game (Devils Devel Concept), which also uses .sig files, it patches the game with no problems at all, even if the patch.xp3 is the only one missing a .sig file, both use kirikiri engine, yet while Devils Devel Concept does not care that my patch.xp3 has no sig, that other game instead returns a missing .sig file error.
If anyone has any idea from what it depends and how to solve this problem, it would be plenty of help!

Link to comment
Share on other sites

The Kirikiri 2 games that give you an error message for missing .sig files use the sigcheck plugin to verify archive files with a signature. The system uses public key cryptography which means that only the public key can be found in the game's files, which can be used to check the signatures, but new signatures for the same public key can not be generated since that would require the private key.
Most game I've seen use this handle the actual work in script/release.ks where you'll find the public key and code that does the actual verification, so you have the option to either

  • Remove the signature check by uncommenting/removing the invocation of the check method to disable signature checks altogether, or
  • Generate your own public/private key pair, replace the original public key in release.ks with yours and generate new .sig files with your private key

You can then add your modified version of release.ks to to your patch.xp3 archive and if you did everything correctly, you'll be able to run the game without any error messages (and optionally with custom file signature verification).

Link to comment
Share on other sites

19 minutes ago, Porygon2 said:

You can then add your modified version of release.ks to to your patch.xp3 archive and if you did everything correctly, you'll be able to run the game without any error messages (and optionally with custom file signature verification).

But he is trying to make a patch.xp3, and patch.xp3 does not have a sigcheck, correct? That's actually why i wanted to know what is the game, to see what is there.

Link to comment
Share on other sites

On 7/7/2016 at 4:57 PM, Scorp said:

But he is trying to make a patch.xp3, and patch.xp3 does not have a sigcheck, correct?

Yes there is, at least for the game he is using:

/* チェックするファイル */ var fn = [ System.exeName.substr( System.exePath.length ), // エンジン名 'data.xp3', 'patch.xp3' ];

So if patch.xp3 exists, its signature will be verified with patch.xp3.sig (displaying an error message should patch.xp3.sig not exist), making the above solutions to the problem necessary for distribution of a patch.xp3, this could potentially be circumvented by naming the patch archive patch2.xp3 (or 3 and so on).
 

Link to comment
Share on other sites

  • 1 year later...
On 7/7/2016 at 4:38 PM, Porygon2 said:

The Kirikiri 2 games that give you an error message for missing .sig files use the sigcheck plugin to verify archive files with a signature. The system uses public key cryptography which means that only the public key can be found in the game's files, which can be used to check the signatures, but new signatures for the same public key can not be generated since that would require the private key.
Most game I've seen use this handle the actual work in script/release.ks where you'll find the public key and code that does the actual verification, so you have the option to either

  • Remove the signature check by uncommenting/removing the invocation of the check method to disable signature checks altogether, or
  • Generate your own public/private key pair, replace the original public key in release.ks with yours and generate new .sig files with your private key

You can then add your modified version of release.ks to to your patch.xp3 archive and if you did everything correctly, you'll be able to run the game without any error messages (and optionally with custom file signature verification).

Hello, sorry for kinda necroposting this, but I would really appreciate some kind of help.

I'm trying to translate this アパタイト game, which unfortunately uses the .sig files.

To sum it up all I did was make readable the .ks files through bruteforce + XOR, translating some lines of text, and reprocessing them. I then used Kikiriki to create a "patch.xp3" file.

After this I tried following all your advices: I generated my own public/private key pair, replaced the original public key inside "release.ks" and put it inside patch.xp3; I then generated a patch.xp3.sig file and put both patch.xp3 and patch.xp3.sig inside the game directory, but when I try to run it, I still receive the "invalid input packet" error message.

If I try to rename patch.xp3 as patch1.xp3 (or patch2.xp3) the game runs with no error messages, but I cannot see any translated text, which implies that the game is completely ignoring my patch.xp3 file with the translated text.

Could you please help me in this regard?

Edited by きょうすけ
Link to comment
Share on other sites

4 hours ago, きょうすけ said:

After this I tried following all your advices: I generated my own public/private key pair, replaced the original public key inside "release.ks" and put it inside patch.xp3; I then generated a patch.xp3.sig file and put both patch.xp3 and patch.xp3.sig inside the game directory, but when I try to run it, I still receive the "invalid input packet" error message.

If I try to rename patch.xp3 as patch1.xp3 (or patch2.xp3) the game runs with no error messages, but I cannot see any translated text, which implies that the game is completely ignoring my patch.xp3 file with the translated text.

That error message means that there's something wrong with your signature.

Creating a patch2.xp3 works perfectly fine (created a patch with KrkrExtract and it worked ingame) - if that is not working, then the archive itself might be broken or it isn't replacing the right files. Just try creating a patch using KrkrExtract and name it patch2.xp3, that should work.

 

Edit: Detailed instructions, as you mentioned you didn't know how to use KrkrExtract:
Download the current master branch, extract the archive, and copy the contents of KrkrExtract-master/KrkrExtract/Release (or just the .exe and .dll files) into the game's directory.

Then, drag the game's executable and drop it on KrkrExtract.exe to start it (alternatively, start it with the executable as the only argument) to start KrkrExtract.

Once KrkrExtract is started, you can drop .xp3 archives from the game onto the KrkrExtract window to extract them into KrkrExtract_Output.

To repack, go to Pack Setting on the right, put the folder containing your patch into Folder (all files should be in that folder directory, no subdirectories such as scenario/, etc.), fill the location of the original data.xp3 into Original Pack (if it isn't there already) and the location for your patch2.xp3 (e.g. in the game's directory) into Output Pack, then hit Make Package.

Edited by Porygon2
Add detailed instructions
Link to comment
Share on other sites

11 hours ago, Porygon2 said:

That error message means that there's something wrong with your signature.

Creating a patch2.xp3 works perfectly fine (created a patch with KrkrExtract and it worked ingame) - if that is not working, then the archive itself might be broken or it isn't replacing the right files. Just try creating a patch using KrkrExtract and name it patch2.xp3, that should work.

 

Edit: Detailed instructions, as you mentioned you didn't know how to use KrkrExtract:
Download the current master branch, extract the archive, and copy the contents of KrkrExtract-master/KrkrExtract/Release (or just the .exe and .dll files) into the game's directory.

Then, drag the game's executable and drop it on KrkrExtract.exe to start it (alternatively, start it with the executable as the only argument) to start KrkrExtract.

Once KrkrExtract is started, you can drop .xp3 archives from the game onto the KrkrExtract window to extract them into KrkrExtract_Output.

To repack, go to Pack Setting on the right, put the folder containing your patch into Folder (all files should be in that folder directory, no subdirectories such as scenario/, etc.), fill the location of the original data.xp3 into Original Pack (if it isn't there already) and the location for your patch2.xp3 (e.g. in the game's directory) into Output Pack, then hit Make Package.

 

THANK YOU, THANK YOU SO MUCH!

I was using the wrong piece of software and, shame on me, I didn't notice there was a "release" folder inside the master branch. The tool is a bit picky, as it crashes on me unless I rely exclusively on drag % drop, but that will sufface.

Really, I can't thank you enough from the bottom of my heart for helping me.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...