forked from John-K/pspdecrypt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
syscon_ipl_keys.c
353 lines (327 loc) · 27.7 KB
/
syscon_ipl_keys.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
/* Functions for handling 02g-11g BFC00210 Xor Keys with required syscon secrets
by Proxima - 2021
*/
#include <stdio.h>
#include <string.h>
#include "libkirk/AES.h"
unsigned char sc_secret_01_tabl[0x400] =
{ 0x1A, 0x52, 0x1B, 0xDE, 0x7A, 0xDB, 0x8D, 0xDF, 0xF6, 0x07, 0x9F, 0xCC, 0x0F, 0x0B, 0x67, 0x14,
0x8C, 0x8F, 0x46, 0x24, 0xFA, 0x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0x52, 0xB8, 0x5A, 0xF3, 0xFF, 0xE2, 0xB7, 0xCB, 0x3A, 0x6D,
0x14, 0x68, 0xA9, 0x0E, 0x94, 0xFB, 0xBC, 0x93, 0xB6, 0x1D, 0x7B, 0xF9, 0x85, 0x4E, 0x7C, 0xDE,
0xC9, 0x3B, 0xDD, 0x99, 0xCF, 0xE3, 0x3F, 0x32, 0x14, 0xC8, 0x97, 0x40, 0x78, 0x5A, 0x6C, 0x1E,
0x8A, 0x21, 0xEB, 0x37, 0x8E, 0x9B, 0x5A, 0xB9, 0x64, 0x80, 0x0F, 0x3C, 0xDB, 0x0E, 0xC7, 0x0D,
0x12, 0x3A, 0x80, 0x56, 0xAB, 0x60, 0x6A, 0x20, 0xFB, 0xD3, 0xD5, 0x31, 0x70, 0xC8, 0xC1, 0x33 };
unsigned char *tablemap[8] =
{ 0,
sc_secret_01_tabl,
sc_secret_02_tabl,
sc_secret_03_tabl,
sc_secret_GO_tabl,
sc_secret_03_tabl,
sc_secret_03_tabl,
sc_secret_03_tabl};
int modelmap[13] =
{ 0, // 00g -hah
0, // 01g
1, // 02g
2, // 03g
3, // 04g
4, // 05g -GO
0, // 06g - doesn't exist
5, // 07g
0, // 08g - doesn't exist
6, // 09g
0, // 10g - doesn't exist
7, // 11g
0, // 12g - doesn't exist
};
unsigned char ipl02_1[0x18] = { 0x61, 0x7A, 0x56, 0x42, 0xF8, 0xED, 0xC5, 0xE4, 0xDB, 0xB1, 0x1E, 0x20, 0x48, 0x83, 0xB1, 0x6F, 0x04, 0xF4, 0x69, 0x8A, 0x8C, 0xAA, 0x95, 0x30};
unsigned char ipl04_1[0x18] = { 0x8D, 0x5D, 0xA6, 0x08, 0xF2, 0xBB, 0xC6, 0xCC, 0x34, 0xDB, 0x81, 0x24, 0x1D, 0x6F, 0x40, 0x57, 0xE0, 0xDC, 0x41, 0xAF, 0xC2, 0xCD, 0x1C, 0x2D};
unsigned char iplXX_1[0x18] = { 0x79, 0x7B, 0xF6, 0xF3, 0xE3, 0x3B, 0x37, 0x56, 0xE0, 0xE8, 0x6A, 0xDA, 0x60, 0x95, 0x3A, 0x0F, 0xDC, 0xBF, 0x3C, 0xEB, 0x9D, 0xD4, 0x41, 0x4E};
unsigned char sc_key[0x10] = { 0xF1, 0x07, 0x30, 0xC3, 0x11, 0xE0, 0x26, 0xFC, 0xF8, 0x7B, 0x50, 0xAE, 0xA3, 0xD1, 0x7B, 0xA0 };
int getSysconIndex(unsigned char * data) {
AES_ctx scindexkey;
unsigned char result[0x10];
AES_set_key(&scindexkey,sc_key,128);
AES_decrypt(&scindexkey,data,result);
return result[8]&0x3F;
}
void getSysconIPLKey(int type, unsigned char * indata, unsigned char * outdata) {
int index = getSysconIndex(indata);
unsigned char * table;
if(type <13) {
table = tablemap[modelmap[type]];
} else {
memset(outdata,0,0x10);
return;
}
if (table) {
memcpy(outdata,&table[index*0x10],0x10);
} else {
memset(outdata,0,0x10);
}
return;
}
int findStage2Keys(unsigned char * stage2, int length) {
int i;
for(i=0;i<length-0x18;i++) {
if((memcmp(&stage2[i],ipl02_1,0x18) == 0) ||
(memcmp(&stage2[i],ipl04_1,0x18) == 0) ||
(memcmp(&stage2[i],iplXX_1,0x18) == 0))
return i +0x18;
}
return -1;
}