xvdtool
xvdtool copied to clipboard
Find how dataUnit in hash tables is created.
Last 4 bytes of hash-entries are used during crypto as the XTS "dataUnit" number, I'd previously only seen those bytes being set to the relative page number of the page in the region (0, 1, 2...), but MSIXVCs have some set to much larger numbers (eg. 0x731ED983, 0x731ED984, 0x731ED985...)
How are these numbers created? It seems there's a base number which gets the relative page num added to it, is that base number just random? or does it come from the hash of the first page in the region?
It's probably not really that important for us to create them the same way (we should be able to just use last 4 bytes of hash as dataUnit for each page fine), but it'd be nice to have xvdtool act the same way as the official tools.