Editing Bluray disc
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 1: | Line 1: | ||
== Overview == | == Overview == | ||
* [http://www.osta.org/specs/pdf/udf260.pdf UDF] filesystem (a profile of [http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-167.pdf ECMA-167]) in cleartext | |||
* File entries are not encrypted, some files are not encrypted | |||
* Some regions of the disc are encrypted (sector by sector) | |||
* One sector is 2048 bytes | |||
* [http://www.osta.org/specs/pdf/udf260.pdf UDF] filesystem (a profile of [http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-167.pdf ECMA-167]) | |||
* | |||
* | |||
== Encryption == | == Encryption == | ||
Line 84: | Line 18: | ||
</pre> | </pre> | ||
* 0x00000003 | * 0x00000003 is the number of unencrypted regions | ||
* | * The first unencrypted region is from sector 0x00000000 to sector 0x0000099f | ||
* | * The first encrypted region is from sector 0x0000099f to sector 0x00a26160 | ||
* | * The second unencrypted region is from sector 0x00a26160 to sector 0x00ba73ff | ||
* The second encrypted region is from sector 0x00ba73ff to sector 0x011ddda0 | |||
* | * The third unencrypted region is from sector 0x011ddda0 to sector 0x011fddbf | ||
* 0x011fddbf sectors is 38636746752 bytes whereas the file is 38636748800 bytes : the last sector is not included for some reason. | |||
* 0x011fddbf sectors is 38636746752 bytes whereas the file is 38636748800 | |||
=== Deriving the disc key === | === Deriving the disc key === | ||
Line 103: | Line 33: | ||
* with the IV 0x69474772af6fdab342743aefaa186287 | * with the IV 0x69474772af6fdab342743aefaa186287 | ||
* no padding | * no padding | ||
* data1 is available in the IRD file | |||
* it can be found on the disc with a bunch of SCSI commands. | |||
* it can be found on the disc with a bunch of SCSI commands | |||
=== Sector encryption === | === Sector encryption === | ||
Each | Each sector is encrypted with AES CBC: | ||
* using the disc key | * using the disc key | ||
Line 147: | Line 74: | ||
== Extra "tracks" == | == Extra "tracks" == | ||
=== | === Disc Information from PIC in pre-recorded area === | ||
This information is in the PIC zone. It can be read with the [ftp://ftp.avc-pioneer.com/Mtfuji_7/Proposal/Aug08/READ_DISC_STRUCTURE.pdf READ DISC STRUCTURE] SCSI command with [http://www.t10.org/ftp/t10/document.04/04-328r0.pdf#page=41 arguments for BluRay]. | |||
For example (on Linux), | |||
<pre> | <pre> | ||
unsigned char read_pic_command[12] = { | unsigned char read_pic_command[12] = { | ||
173, // Operation Code=READ_DISC_STRUCTURE | 173, // Operation Code=READ_DISC_STRUCTURE | ||
Line 194: | Line 96: | ||
0 | 0 | ||
}; | }; | ||
int drive = open(drive_filename, 0, O_RDONLY); | int drive = open(drive_filename, 0, O_RDONLY); | ||
if (drive == -1) { | if (drive == -1) { | ||
Line 237: | Line 139: | ||
if ((header.info & SG_INFO_OK_MASK) != SG_INFO_OK) { | if ((header.info & SG_INFO_OK_MASK) != SG_INFO_OK) { | ||
fputs("SCSI failed\n", stderr); | fputs("SCSI command failed\n", stderr); | ||
return 1; | return 1; | ||
} | } | ||
</pre> | </pre> | ||
Here's the result for "The Last Of Us": | |||
<pre> | |||
00000000: 1002 0000 4449 0110 0000 2000 4244 4f01 ....DI.... .BDO. | |||
00000010: 2101 0300 0000 0000 019a f5bf 0010 0000 !............... | |||
00000020: 00ca 73fe 0000 0000 0000 0000 0000 0000 ..s............. | |||
00000030: 0000 0000 0000 0000 0000 0000 0000 0000 ................ | |||
00000040: 0000 0000 4449 0111 0001 2000 4244 4f01 ....DI.... .BDO. | |||
00000050: 2101 0300 0000 0000 019a f5bf 0135 8c00 !............5.. | |||
00000060: 01ef fffe 0000 0000 0000 0000 0000 0000 ................ | |||
00000070: 0000 5b | |||
</pre> | |||
AFAIU, the interpretation of this blob is defined in a under-NDA [BlueRay Spec](http://www.aacsla.com/specifications/AACS_Spec_BD_Prerecorded_0.912.pdf#page=27). | |||
=== "Data1" === | |||
== | === "Data2" === | ||
== References == | == References == | ||
Line 445: | Line 166: | ||
* 3k3y IsoTools, this is a .NET program available in binary form. The [https://github.com/icsharpcode/ILSpy ILspy] decompiler produces a very readable output. | * 3k3y IsoTools, this is a .NET program available in binary form. The [https://github.com/icsharpcode/ILSpy ILspy] decompiler produces a very readable output. | ||
* PS3 ISO Patcher by BlackDaemon, is a .NET program available in source code | * PS3 ISO Patcher by BlackDaemon, is a .NET program available in source code | ||