Editing User talk:Masterzorag
Jump to navigation
Jump to search
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 106: | Line 106: | ||
00000400 | 00000400 | ||
</pre> | </pre> | ||
=ps3vuart-tools= | =ps3vuart-tools= | ||
Line 189: | Line 183: | ||
We got info0 + info1, 64bytes each | We got info0 + info1, 64bytes each | ||
content is 2845bytes, total is data | content is 2845bytes, total is data lenght 2973 | ||
info0, info1 are not encrypted | info0, info1 are not encrypted | ||
</pre> | </pre> | ||
Line 203: | Line 197: | ||
=.spkg_hdr.1 decryption= | =.spkg_hdr.1 decryption= | ||
strip metadata info | |||
# dd if=CORE_OS_PACKAGE.pkg.spkg_hdr.1 of=metainfo.crypt skip=32 count=64 bs=1 | # dd if=CORE_OS_PACKAGE.pkg.spkg_hdr.1 of=metainfo.crypt skip=32 count=64 bs=1 | ||
64+0 records in | 64+0 records in | ||
Line 215: | Line 207: | ||
00000020 9c 28 c7 fd 38 31 24 3b 1b 2b 9f 3f dc 72 4f c4 |.(..81$;.+.?.rO.| | 00000020 9c 28 c7 fd 38 31 24 3b 1b 2b 9f 3f dc 72 4f c4 |.(..81$;.+.?.rO.| | ||
00000030 95 34 b8 0a af 25 a1 05 b6 8f ce 2c 88 e9 2b 7b |.4...%.....,..+{| | 00000030 95 34 b8 0a af 25 a1 05 b6 8f ce 2c 88 e9 2b 7b |.4...%.....,..+{| | ||
verify metadata info decryption with standard tool | |||
# openssl enc -d -aes-256-cbc -in metainfo.crypt -K erk -iv riv | hexdump -C | # openssl enc -d -aes-256-cbc -in metainfo.crypt -K erk -iv riv | hexdump -C | ||
00000000 7c f2 9a 4b 96 de 5f 75 a1 32 87 c0 42 ec 8f cf ||..K.._u.2..B...| Key | 00000000 7c f2 9a 4b 96 de 5f 75 a1 32 87 c0 42 ec 8f cf ||..K.._u.2..B...| Key | ||
Line 221: | Line 213: | ||
00000020 6f 85 6a 60 2a 8d b4 3f 2a 81 1b 1a 9c a3 02 f6 |o.j`*..?*.......| IV | 00000020 6f 85 6a 60 2a 8d b4 3f 2a 81 1b 1a 9c a3 02 f6 |o.j`*..?*.......| IV | ||
00000030 | 00000030 | ||
strip rest of crypted metadata | |||
# dd if=CORE_OS_PACKAGE.pkg.spkg_hdr.1 of=metarest.crypt skip=96 bs=1 | # dd if=CORE_OS_PACKAGE.pkg.spkg_hdr.1 of=metarest.crypt skip=96 bs=1 | ||
544+0 records in | 544+0 records in | ||
544+0 records out | 544+0 records out | ||
544 bytes (544 B) copied, 0.00626423 s, 86.8 kB/s | 544 bytes (544 B) copied, 0.00626423 s, 86.8 kB/s | ||
decrypt rest of metadata | |||
# openssl enc -d -aes-128-ctr -in metarest.crypt -K Key -iv IV | hexdump -C | # openssl enc -d -aes-128-ctr -in metarest.crypt -K Key -iv IV | hexdump -C | ||
00000000 00 00 00 00 00 00 | 00000000 00 00 00 00 00 00 02 50 00 00 00 01 00 00 00 03 |.......P........| | ||
00000010 00 00 00 | 00000010 00 00 00 14 00 00 00 00 00 00 00 00 00 00 00 00 |................| | ||
00000020 00 00 00 00 00 00 02 80 00 00 00 00 00 00 00 40 |...............@| | |||
00000020 00 00 00 00 00 00 02 80 00 00 00 00 00 00 00 40 |...............@| | |||
00000030 00 00 00 01 00 00 00 01 00 00 00 02 00 00 00 00 |................| | 00000030 00 00 00 01 00 00 00 01 00 00 00 02 00 00 00 00 |................| | ||
00000040 00 00 00 01 ff ff ff | 00000040 00 00 00 01 ff ff ff ff ff ff ff ff 00 00 00 01 |................| | ||
00000050 00 00 00 00 00 00 02 c0 00 00 00 00 00 00 00 40 |...............@| | |||
00000050 00 00 00 00 00 00 02 c0 00 00 00 00 00 00 00 40 |...............@| | |||
00000060 00 00 00 02 00 00 00 02 00 00 00 02 00 00 00 06 |................| | 00000060 00 00 00 02 00 00 00 02 00 00 00 02 00 00 00 06 |................| | ||
00000070 00 00 00 01 ff ff ff | 00000070 00 00 00 01 ff ff ff ff ff ff ff ff 00 00 00 01 |................| | ||
00000080 00 00 00 00 00 00 03 00 00 00 00 00 00 5a 01 74 |.............Z.t| | |||
00000080 00 00 00 00 00 00 03 00 00 00 00 00 00 5a 01 74 |.............Z.t| | |||
00000090 00 00 00 03 00 00 00 03 00 00 00 02 00 00 00 0c |................| | 00000090 00 00 00 03 00 00 00 03 00 00 00 02 00 00 00 0c |................| | ||
000000a0 00 00 00 03 00 00 00 | 000000a0 00 00 00 03 00 00 00 12 00 00 00 13 00 00 00 02 |................| | ||
000000b0 fd 5e fe 3f a0 42 fe 31 d6 61 83 26 98 07 ce e8 |.^.?.B.1.a.&....| Key file | |||
000000c0 09 a7 65 7a 00 00 00 00 00 00 00 00 00 00 00 00 |..ez............| | |||
000000d0 6a 49 08 b2 87 ee 02 65 8c 73 5a 4c 54 f8 bf 5d |jI.....e.sZLT..]| | |||
000000e0 b6 3a d4 ef d3 94 74 f5 f3 a3 f2 ad af 1c 45 4e |.:....t.......EN| | |||
000000f0 08 aa 2b 61 fb 91 52 9d 69 a8 44 b0 a0 dd 39 1c |..+a..R.i.D...9.| | |||
00000100 bc 4d a0 51 ed f5 30 16 d1 35 8c b1 d1 09 54 d0 |.M.Q..0..5....T.| | |||
00000110 60 32 ff 1c 3d 1a 9d 03 61 28 d8 ad 1f dc 34 57 |`2..=...a(....4W| | |||
00000120 05 2a 1e f6 00 00 00 00 00 00 00 00 00 00 00 00 |.*..............| | |||
00000130 6a 49 08 b2 87 ee 02 65 8c 73 5a 4c 54 f8 bf 5d |jI.....e.sZLT..]| | |||
00000140 b6 3a d4 ef d3 94 74 f5 f3 a3 f2 ad af 1c 45 4e |.:....t.......EN| | |||
00000150 08 aa 2b 61 fb 91 52 9d 69 a8 44 b0 a0 dd 39 1c |..+a..R.i.D...9.| | |||
00000160 bc 4d a0 51 ed f5 30 16 d1 35 8c b1 d1 09 54 d0 |.M.Q..0..5....T.| | |||
00000170 3c 37 73 07 73 d5 69 69 52 67 97 3b e9 20 70 a9 |<7s.s.iiRg.;. p.| | |||
00000180 53 a7 11 6d 00 00 00 00 00 00 00 00 00 00 00 00 |S..m............| | |||
00000190 6a 49 08 b2 87 ee 02 65 8c 73 5a 4c 54 f8 bf 5d |jI.....e.sZLT..]| | |||
000001a0 b6 3a d4 ef d3 94 74 f5 f3 a3 f2 ad af 1c 45 4e |.:....t.......EN| | |||
000001b0 08 aa 2b 61 fb 91 52 9d 69 a8 44 b0 a0 dd 39 1c |..+a..R.i.D...9.| | |||
000001c0 bc 4d a0 51 ed f5 30 16 d1 35 8c b1 d1 09 54 d0 |.M.Q..0..5....T.| | |||
000001d0 35 53 b4 b5 44 28 fe 09 5a 04 e5 38 e8 38 f4 a6 |5S..D(..Z..8.8..| | |||
000001e0 5d 24 fa b1 e0 55 f4 58 15 22 c2 73 00 00 00 00 |]$...U.X.".s....| | |||
000001f0 00 c9 57 08 f1 6f e6 75 39 6f 2a 12 51 48 5f 8c |..W..o.u9o*.QH_.| Signature r,s | |||
00000200 97 53 e3 e2 a7 00 b7 47 fa c2 0b 01 2b df 5a 34 |.S.....G....+.Z4| | 00000200 97 53 e3 e2 a7 00 b7 47 fa c2 0b 01 2b df 5a 34 |.S.....G....+.Z4| | ||
00000210 f7 a8 d0 21 d2 f8 94 4b 6e 30 00 00 00 00 00 00 |...!...Kn0......| | 00000210 f7 a8 d0 21 d2 f8 94 4b 6e 30 00 00 00 00 00 00 |...!...Kn0......| | ||
get signature | |||
join sceh + decrypted metadata info + decrypted rest of metadata until signature | |||
compute digest of the whole decrypted metadata until signature | |||
# sha1sum metadata.bin | # sha1sum metadata.bin | ||
70942107d35df85091bf4949d7fa46421e27d056 metadata.bin | 70942107d35df85091bf4949d7fa46421e27d056 metadata.bin | ||
verify digest / signature | |||
if(ecdsa_verify(digest, r, s) == 1) signature is valid | |||