Users browsing this thread: 1 Guest(s)
Love Nikki Encrypted Image Files
#1
Hi all! For the past year and a half, I've been ripping sprites from the 2D dress-up game Love Nikki, using Nox and NinjaRipper. However, as the game has tens of thousands of image files, that method is very tedious.

Unfortunately, it is currently my only method because although I can access the files marked as PNG and JPGs, and I'm able to file swap them with real images and have them load in game, they lack headers and appear to be encrypted or obfuscated in some way.

From what I can see opening them in a hex editor, they also don't seem to have the structure of a proper PNG or JPG file either. Unfortunately, I have very little understanding of decryption, so I'm at a roadblock.

So now I'm going to ask here, if anyone is capable of helping me, it would be so very much appreciated. 

I've attached some examples of the encrypted image files; one is what should be a 128px by 151px PNG file of a face, the other should be a 1625px by 1788px JPG of a background. 
.zip   Image.zip (Size: 246.6 KB / Downloads: 51)

Thank you!
Reply
Thanked by: Heh, kinsador
#2
They're all encrypted with Blowfish using an (effectively) constant key / mode / initial state.

Here's a java program to recursively extract encrypted files in whatever input folder (JRE 1.8 or above needed)
http://dnrv2.cyriaca.net/projects/hate3/jar/Hate3.jar
You run it in a terminal with "java -jar Hate3.jar <input folder> <output folder> <key>"
Source (just cuz)
https://github.com/veronicakulikova/play...Hate3.java

You'll need to use this key
fd1c1b2f34a0d1d246be3ba9bc5af022e83375f315a0216085d3013a

Update: also added Lua decryption
http://dnrv2.cyriaca.net/projects/hate3/.../hate3.jar
l m a o
Reply
Thanked by: lapistier, kinsador
#3
Thumbs Up 
(06-24-2019, 01:11 AM)CorruptTurret Wrote: They're all encrypted with Blowfish using an (effectively) constant key / mode / initial state.

Here's a java program to recursively extract encrypted files in whatever input folder (JRE 1.8 or above needed)
http://dnrv2.cyriaca.net/projects/hate3/jar/Hate3.jar
You run it in a terminal with "java -jar Hate3.jar <input folder> <output folder> <key>"
Source (just cuz)
https://github.com/veronicakulikova/play...Hate3.java

You'll need to use this key
fd1c1b2f34a0d1d246be3ba9bc5af022e83375f315a0216085d3013a

Aaahhhhhhhh thank you so much!!! It worked T^T You're a lifesaver!!

(For anyone else reading this who's not super well versed in Java like me, if you encounter an "illegal key size or default parameters", you gotta check out this guide.)

I'm gonna get right to compiling the sprite sheets for this then! Thank you again!!!
Reply
Thanked by: Heh
#4
Wink 
(06-24-2019, 01:11 AM)CorruptTurret Wrote: You'll need to use this key
fd1c1b2f34a0d1d246be3ba9bc5af022e83375f315a0216085d3013a

Hey there. I stumbled upon this a couple days ago and wondered how you managed to find the key. 
I am definitely not well versed in cryptography at all. Tongue
Even knowing the decryption method, I feel it is still difficult to crack it. Brute-force would still take a long time.
Do you mind explaining how you got it so I could find it again if/when it changes?

Thanks!
Smile
Reply
Thanked by:
#5
It's generated at runtime so there's a bit of work that needs to be done in order to get the key. I made a spliced app that displays the key in a hacky but consistent way, dunno how much of this is fine to talk about here.
l m a o
Reply
Thanked by:


Forum Jump: