netmdocm
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| netmdocm [2011/01/16 14:34] – nopsled | netmdocm [2024/05/21 14:50] (current) – nopsled | ||
|---|---|---|---|
| Line 202: | Line 202: | ||
| unsigned char maclist1_dat[72] = | unsigned char maclist1_dat[72] = | ||
| { | { | ||
| - | 0x4D, 0x41, 0x43, 0x4C, 0x49, 0x53, 0x54, 0x00, 0x01, 0x0F, 0x50, 0x00, 0x00, 0x04, 0x00, 0x00, | + | |
| - | | + | salomgid <0x01, 0x0F, 0x50, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC3, 0x24, 0x4C, 0x60, 0x26>, |
| - | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, | + | <0x02>, |
| - | | + | number-of-mac-ops <0x00, 0x00, 0x00, 0x03>, |
| - | | + | number-of-macs <0x00, 0x00, 0x00, 0x00>, |
| + | | ||
| + | extension-type <0x00, 0x00, 0x00, 0x00>, | ||
| + | extension-size <0x00, 0x00, 0x00, 0x18>, | ||
| + | leaf-id <0x00, 0x00, 0x00, 0x02, 0x00, 0x00>, status-code <0x00, 0x01>, | ||
| + | leaf-id <0x00, 0x00, 0x00, 0x01, 0x00, 0x01>, status-code <0x00, 0x03>, | ||
| + | leaf-id <0x00, 0x00, 0x00, 0x02, 0x00, 0x01>, status-code <0x00, 0x01>, | ||
| + | <0x00, 0x00, 0x00>, | ||
| } ; | } ; | ||
| - | There is a 40-byte header (MACLIST\0, followed by 4 DWORDs with unknown meaning, followed by (DWORD)2, followed by the number of operations done on the maclist (in this case 3), followed by the number of MACs (here: 0), followed by 0 (unknown field). | + | There is a 40-byte header (MACLIST\0, followed by 16 bytes of the SalOmgID (omg_id.dat), followed by (DWORD)2, followed by the number of operations done on the maclist (in this case 3), followed by the number of MACs (here: 0), followed by 0 (unknown field). |
| ===== maclist2.dat ===== | ===== maclist2.dat ===== | ||
| Line 937: | Line 944: | ||
| In other words, this extracts the 0-extension of a MACLIST and an encrypted hash of that. | In other words, this extracts the 0-extension of a MACLIST and an encrypted hash of that. | ||
| + | |||
| + | See pcmaclist(6) | ||
| /* | /* | ||
| Line 1085: | Line 1094: | ||
| ===== querycif(09) - Get KEK encrypted content key ===== | ===== querycif(09) - Get KEK encrypted content key ===== | ||
| - | |||
| - | /* | ||
| - | Procedure prototype: | ||
| - | | ||
| - | |||
| - | Input: | ||
| - | |||
| - | SalPointer const &, | ||
| - | SalPointer const &, | ||
| - | long, | ||
| - | long, | ||
| - | SalPointer const &, | ||
| - | SalOmgId const &, | ||
| - | SalPointer const &, | ||
| - | long, | ||
| - | SalExtrinsicsProg const &, | ||
| - | |||
| - | Output: | ||
| - | |||
| - | SalAsnSeqBegin, | ||
| - | long &, | ||
| - | OmgString & | ||
| - | querycif(09) | ||
| - | |||
| - | Process File, SalOmgId, param3, long (3), long (3), Ekb capability table, 00010001_EKB -> Enc(CKEY, KEK) | ||
| - | |||
| - | */ | ||
| - | |||
| - | |||
| - | unsigned char param3[24] = | ||
| - | { | ||
| - | 0x46, 0x73, 0xE4, 0x89, 0x6A, 0xA9, 0x0B, 0x96, 0x69, 0x43, 0xAA, 0x39, 0x99, 0xE2, 0x08, 0xC4, | ||
| - | 0xF8, 0xCA, 0x19, 0x2E, 0x38, 0xE2, 0x3E, 0x4C, | ||
| - | } ; | ||
| - | |||
| - | unsigned char param6_EkbCapabilityTable[24] = | ||
| - | { | ||
| - | 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x03, 0x00, 0x00, 0x00, | ||
| - | 0x02, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, | ||
| - | } ; | ||
| - | |||
| - | |||
| - | /* Return value. TODO: double check */ | ||
| - | |||
| - | unsigned char return_value[11] = | ||
| - | { | ||
| - | 0x30, 0x80, 0x02, 0x01, 0x00, 0x04, 0x08, 0x82, 0x19, 0x23, 0xFD, | ||
| - | } ; | ||
| < | < | ||
| Line 1185: | Line 1146: | ||
| - | |||
| - | |||
| - | function GetKekEncCKEY(blob_t OpfImage (arg_2), blob_t EkbCapTableBody (arg_3)) | ||
| - | { | ||
| - | Array ProcessFile[5]; | ||
| - | |||
| - | dict[4] = EkbCapTableBody; | ||
| - | ProcessFile = decode_asn1(opf_image); | ||
| - | dict[3] = OpfImage; | ||
| - | |||
| - | // | ||
| - | // Calculate HMAC for the opf[3] usage information. Check if it matches with the HMAC value in opf[1] | ||
| - | // | ||
| - | // ProcessFile[1]: | ||
| - | |||
| - | blob_t dec_pf2 = devicesal_220_decrypt_hook_249(ProcessFile[2], | ||
| - | blob_t serialized_opf3 = BCSerialize(ProcessFile[3]); | ||
| - | blob_t key = concat ( dec_pf2, serialized_opf3 ); | ||
| - | blob_t hasked_key = inline:: | ||
| - | blob_t key_pf2 = concat ( dec_pf2, hashed_key ); | ||
| - | blob_t hashed_key_pf2 = inline: | ||
| - | |||
| - | // if( HMAC(opf[3], | ||
| - | // | ||
| - | // | ||
| - | if (compare_blob (hashed_key_pf2, | ||
| - | // Test_Small_Int_For_Zero -> 0 (acc) | ||
| - | { | ||
| - | ... todo | ||
| - | } | ||
| - | } | ||
| </ | </ | ||
netmdocm.1295188448.txt.gz · Last modified: 2011/01/16 14:34 by nopsled
