emoose / ExCrypt

Open source replacement for the Xbox360 XeCrypt suite.
BSD 3-Clause "New" or "Revised" License
26 stars 4 forks source link

Alternate encryption and decryption in Des3 #7

Closed RobertClown255 closed 3 years ago

RobertClown255 commented 3 years ago

This is the correct way to implement des3. I haven't tested it but you can view the des3 specification to verify.

emoose commented 3 years ago

Ah looks like that should be correct, good catch!

Really need to add in a test suite so we can verify these... I did make a start on one locally but it's very barebones atm, doesn't even have anything for the DES funcs right now. (mainly just lacking actual X360-generated data to verify against really, will have to find some time soon to mess around with my box)

RobertClown255 commented 3 years ago

How would you go about testing the functions on the xbox to get actual test data? I'm pretty new to xbox 360 modding and am not sure how to run my own code on it.

emoose commented 3 years ago

For bare-metal stuff like testing PPC instructions you can use xell & libxenon, but don't think you can interact with kernel functions like the XeCrypt stuff using those, AFAIK only way to compile code for MS kernel is by using MS XDK (XDKSetupXenon...) & VS2010, haven't seen any homebrew tools for compiling/linking your own XEX at least :(

IIRC once you do have code running you can pretty much just declare any kernel functions and they'll be linked against the kernel automatically (just need to make sure the parameters are correct), so can probably just use the headers from ExCrypt with things renamed to XeCrypt instead, but haven't tried that out yet.