| View previous topic :: View next topic |
| Author |
Message |
CrazyT
Joined: 23 Dec 2006 Posts: 18
|
Posted: Tue Aug 04, 2009 10:59 pm Post subject: Breakpoint on hardware functions possible? |
|
|
Hi, i just downloaded http://my.malloc.us/silverspring/files/2007/10/ipl-decrypt-sample.rar wich is an example of how they decrypt the ipl.
I was wondering if it would be possible to watch/log the calls of such hardware functions with the help of breakpoints.
Because it is not a normal call to such a function you can not simply say: "stop at offset xy"
The reason i ask is some idea about this crypto chip.
Cos nobody knows what code it uses to crypt/decrypt stuff ... why not just generate a file that stores the encrypted and decrypted buffer.
That way emulators might be possible in future ...
(of course only if the buffer that needs to get decrypted does not change every time) |
|
| Back to top |
|
 |
Dariusc123456
Joined: 12 Aug 2008 Posts: 394
|
Posted: Tue Aug 04, 2009 11:40 pm Post subject: |
|
|
Im not 100% sure, but does PSPLink do that? I dont use the darn thing (for it wont even do anything). _________________ PSHN - Playstation Hacking Network
PSX/PS1 - HACK - Game Shark
PS2 - HACK - Swap
PSP - HACK - Pandora
PS3 - ? |
|
| Back to top |
|
 |
CrazyT
Joined: 23 Dec 2006 Posts: 18
|
Posted: Wed Aug 05, 2009 1:45 am Post subject: |
|
|
PSPLink has an option for breakpoints, but the problem is that the actual function is called by the chip.
All you change is a register/memory part, so i wonder if it is somehow possible to break on the change of a special register/memory part.
For better understanding thats some part they use to decrypt stuff:
PspKirkRegs *const crypt = KIRK_HW_REGISTER_ADDR;
crypt->command = 1;
crypt->src_addr = MAKE_PHYS_ADDR(src);
crypt->dst_addr = MAKE_PHYS_ADDR(dst);
crypt->proc_phase = 1;
while((crypt->status & 0x11) == 0);
See?
There is no function call like for example "decrypt()" at all.
Question is, how the chip knows when it should process the command.(maybe just checks the field proc_phase?) |
|
| Back to top |
|
 |
m0skit0
Joined: 02 Jun 2009 Posts: 226
|
Posted: Wed Aug 05, 2009 3:04 am Post subject: |
|
|
| CrazyT wrote: | | I was wondering if it would be possible to watch/log the calls of such hardware functions with the help of breakpoints. |
Yes you can. First coprocessor CP0 has a couple of registers called WatchHi and WatchLo, which will generate an exception if the address specified on them is accessed. Check a MIPS CPU reference for further details.
| CrazyT wrote: | | Cos nobody knows what code it uses to crypt/decrypt stuff |
Sure about that?
http://hitmen.c02.at/files/yapspd/psp_doc/chap8.html#sec8.7
Afaik, Kirk doesn't do encryption as it only has the public key (for decrypting). But don't quote me on this, and correct me if i'm wrong.
EDIT: ok, you mean the algorithm for decryption, I understood otherwise :P _________________
| The Incredible Bill Gates wrote: | | The obvious mathematical breakthrough would be development of an easy way to factor large prime numbers. |
|
|
| Back to top |
|
 |
jimparis
Joined: 10 Jun 2005 Posts: 1179 Location: Boston
|
Posted: Tue Aug 11, 2009 1:07 pm Post subject: |
|
|
| It's a hardware crypto engine. There's no crypto code executing on the MIPS CPU while it's waiting for the Kirk to come up with a result, so there's nothing that a CPU breakpoint could possibly see. |
|
| Back to top |
|
 |
m0skit0
Joined: 02 Jun 2009 Posts: 226
|
Posted: Tue Aug 11, 2009 7:31 pm Post subject: |
|
|
Yes, if you see my EDIT, I finally understood that ;) _________________
| The Incredible Bill Gates wrote: | | The obvious mathematical breakthrough would be development of an easy way to factor large prime numbers. |
|
|
| Back to top |
|
 |
|