Page 1 of 1

Decrypting UHD using Unit Keys

Posted: Sat May 30, 2020 11:56 pm
by stigger
A few days I got a recently released UHD disc which MakeMKV could not decrypt yet. I submitted the dump and, while waiting, decided to explore alternative ways of obtaining the required key. The exploration resulted in a following entry in keydb.cfg:

Code: Select all

0x0000000000000000000000000000000000000000 = Movie_Title | D | 2020-05-30 | U | 1-0x00000000000000000000000000000000
I checked using VLC, and libaacs was able to play the movie using this unit key. But no matter what I did, MakeMKV seemed to refuse to accept this key: there was absolutely no difference whether the keydb.cfg was in the data directory or not.

Then I decided to look at the new "hashed keys" format, but couldn't find any details about it. Looks like it's some kind of a non-standard binary-to-text encoding.

There are also hkd files, so I decided to wait until my dump is processed and take a look at the newly released file. Today this happened and MakeMKV successfully decrypted the disk. But, unsurprisingly, I couldn't find in the new hkd neither my Disc ID, nor the unit key. I assume that it contains the same kind of entries as in the textual "hashed keys" file, but the format of the actual entries is also unclear.

So, at this point I'm a bit stuck and have several questions:
1. Does the hkd/hashed keys format contain the same single unit key for my movie, or there is some additional information?
2. Do I understand correctly, that the only way to feed MakeMKV a key obtained elsewhere is through the keydb.cfg?
3. Why didn't it work for me?

Any tips in the right direction are appreciated.

Re: Decrypting UHD using Unit Keys

Posted: Sun May 31, 2020 12:17 am
by MartyMcNuts
stigger wrote:
Sat May 30, 2020 11:56 pm
A few days I got a recently released UHD disc which MakeMKV could not decrypt yet. I submitted the dump and, while waiting, decided to explore alternative ways of obtaining the required key. The exploration resulted in a following entry in keydb.cfg:

Code: Select all

0x0000000000000000000000000000000000000000 = Movie_Title | D | 2020-05-30 | U | 1-0x00000000000000000000000000000000
I checked using VLC, and libaacs was able to play the movie using this unit key. But no matter what I did, MakeMKV seemed to refuse to accept this key: there was absolutely no difference whether the keydb.cfg was in the data directory or not.

Then I decided to look at the new "hashed keys" format, but couldn't find any details about it. Looks like it's some kind of non-standard binary-to-text encoding.

There are also hkd files, so I decided to wait until my dump is processed and take a look at the newly released file. Today this happened and MakeMKV successfully decrypted the disk. But, unsurprisingly, I couldn't find in the new hkd neither my Disc ID, nor the unit key. I assume that it contains the same kind of entries as in the textual "hashed keys" file, but the format of the actual entries is also unclear.

So, at this point I'm a bit stuck and have several questions:
1. Does the hkd/hashed keys format contain the same single unit key for my movie, or there is some additional information?
2. Do I understand correctly, that the only way to feed MakeMKV a key obtained elsewhere is through the keydb.cfg?
3. Why it didn't work for me?

Any tips in the right direction are appreciated.
I believe that the hashed keys are VUK's not unit keys.

Re: Decrypting UHD using Unit Keys

Posted: Sun May 31, 2020 12:44 am
by SamuriHL
They key database that MakeMKV internally uses (not the keydb.cfg file) are encrypted, that is why you can't read them. The format that's used is not published.