Updated description of libisofs checksum processing
and added it to release tarball.
This commit is contained in:
parent
d9a11a3b8d
commit
9cfa55345e
@ -261,6 +261,7 @@ EXTRA_DIST = \
|
|||||||
doc/susp_aaip_2_0.txt \
|
doc/susp_aaip_2_0.txt \
|
||||||
doc/susp_aaip_isofs_names.txt \
|
doc/susp_aaip_isofs_names.txt \
|
||||||
doc/zisofs_format.txt \
|
doc/zisofs_format.txt \
|
||||||
|
doc/checksums.txt \
|
||||||
libisofs/aaip-os-dummy.c \
|
libisofs/aaip-os-dummy.c \
|
||||||
libisofs/aaip-os-linux.c \
|
libisofs/aaip-os-linux.c \
|
||||||
libisofs/aaip-os-freebsd.c
|
libisofs/aaip-os-freebsd.c
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
by Thomas Schmitt - mailto:scdbackup@gmx.net
|
by Thomas Schmitt - mailto:scdbackup@gmx.net
|
||||||
Libburnia project - mailto:libburn-hackers@pykix.org
|
Libburnia project - mailto:libburn-hackers@pykix.org
|
||||||
16 Aug 2009
|
26 Aug 2009
|
||||||
|
|
||||||
|
|
||||||
MD5 is a 128 bit message digest with a very low probability to be the same for
|
MD5 is a 128 bit message digest with a very low probability to be the same for
|
||||||
@ -67,7 +67,7 @@ The tree checksum tag is written after the ECMA-119 directory entries.
|
|||||||
The session checksum tag is written after all payload including the checksum
|
The session checksum tag is written after all payload including the checksum
|
||||||
array. (Then follows eventual padding.)
|
array. (Then follows eventual padding.)
|
||||||
|
|
||||||
The tags are a single lines of printable text, padded by 0 bytes. They have
|
The tags are single lines of printable text, padded by 0 bytes. They have
|
||||||
the following format:
|
the following format:
|
||||||
|
|
||||||
Tag_id pos=# range_start=# range_size=# [session_start|next=#] md5=# self=#\n
|
Tag_id pos=# range_start=# range_size=# [session_start|next=#] md5=# self=#\n
|
||||||
@ -81,14 +81,13 @@ Tag_id distinguishes the following tag types
|
|||||||
A relocated superblock may appear at LBA 0 of an image which was produced for
|
A relocated superblock may appear at LBA 0 of an image which was produced for
|
||||||
being stored in a disk file or on overwriteable media (e.g. DVD+R, BD-RE).
|
being stored in a disk file or on overwriteable media (e.g. DVD+R, BD-RE).
|
||||||
Typically there is a first session recorded with a superblock at LBA 32 and
|
Typically there is a first session recorded with a superblock at LBA 32 and
|
||||||
the next session may follow shortly after its session tag. (There may be a gap
|
the next session may follow shortly after its session tag. (Typically at the
|
||||||
of padding, often 150 blocks, and aligning to the next address that is
|
next block address which is divisible by 32.) Normally no session starts after
|
||||||
divisible by 32.) Normally no session starts after the address given by
|
the address given by parameter session_start=.
|
||||||
parameter session_start=.
|
|
||||||
|
|
||||||
Session oriented media like CD-R[W], DVD+R, BD-R will have no relocated
|
Session oriented media like CD-R[W], DVD+R, BD-R will have no relocated
|
||||||
superblock but rather bear a table-of-content on media level (to be inquired
|
superblock but rather bear a table-of-content on media level (to be inquired
|
||||||
by MMC commands(.
|
by MMC commands).
|
||||||
|
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
@ -183,11 +182,11 @@ whether its MD5 matches the MD5 of the data blocks which were read before.
|
|||||||
|
|
||||||
With tag type 2:
|
With tag type 2:
|
||||||
|
|
||||||
Keep the original MD5 context of the data blocks and clone
|
Keep the original MD5 context of the data blocks and clone one for obtaining
|
||||||
one for obtaining the MD5 bytes.
|
the MD5 bytes.
|
||||||
If the MD5s match, then compute the checksum block into the kept MD5 context
|
If the MD5s match, then compute the checksum block and all folowing ones into
|
||||||
and go on with reading and computing for the tree checksum tag. This will be
|
the kept MD5 context and go on with reading and computing for the tree checksum
|
||||||
found at block address next_tag, verified and parsed by:
|
tag. This will be found at block address next_tag, verified and parsed by:
|
||||||
iso_util_decode_md5_tag(block, &tag_type, &pos,
|
iso_util_decode_md5_tag(block, &tag_type, &pos,
|
||||||
&range_start, &range_size, &next_tag, md5, 3);
|
&range_start, &range_size, &next_tag, md5, 3);
|
||||||
|
|
||||||
@ -200,14 +199,12 @@ With tag type 4:
|
|||||||
End the MD5 context and start a new context for the session which you will
|
End the MD5 context and start a new context for the session which you will
|
||||||
read next.
|
read next.
|
||||||
|
|
||||||
You may look for the first session by starting to read at LBA 32, or you may
|
Then look for the actual session by starting to read at the address given by
|
||||||
look for the last session by starting to read at the address given by parameter
|
parameter session_start= which is returned by iso_util_decode_md5_tag() as
|
||||||
session_start=. The former is suitable for a check of the whole image, the
|
next_tag. Go on by looking for tag type 2 and follow above prescription.
|
||||||
latter is the shortest way to ensure that the tree of the last session is
|
|
||||||
not corrupted.
|
|
||||||
|
|
||||||
|
|
||||||
Checking a Whole Session
|
Checking the Data Part of the Session
|
||||||
|
|
||||||
In order to check the trustworthyness of a whole session, continue reading
|
In order to check the trustworthyness of a whole session, continue reading
|
||||||
and checksumming after the tree was verified.
|
and checksumming after the tree was verified.
|
||||||
@ -224,6 +221,20 @@ bytes in parameter md5 match the MD5 computed from the data blocks which were
|
|||||||
read before the tag block.
|
read before the tag block.
|
||||||
|
|
||||||
|
|
||||||
|
Checking All Sessions
|
||||||
|
|
||||||
|
If the media is sequentially recordable, obtain a table of content and check
|
||||||
|
the first track of each session as prescribed above in Checking Before Image
|
||||||
|
Tree Loading and in Checking the Data Part of the Session.
|
||||||
|
|
||||||
|
With disk files or overwriteable media, look for a relocated superblock tag
|
||||||
|
but do not hop to address next_tag (given by session_start=). Instead look at
|
||||||
|
LBA 32 for the first session and check it as prescribed above.
|
||||||
|
After reaching its end, round up the read address to the next multiple of 32
|
||||||
|
and check whether it is smaller than session_start= from the super block.
|
||||||
|
If so, expect another session to start there.
|
||||||
|
|
||||||
|
|
||||||
Checking Single Files in a Loaded Image
|
Checking Single Files in a Loaded Image
|
||||||
|
|
||||||
An image may consist of many sessions wherein many data blocks may not belong
|
An image may consist of many sessions wherein many data blocks may not belong
|
||||||
|
Loading…
Reference in New Issue
Block a user