libaacs - how to check if decryption is possible with VUK from KEYDB.cfg

This forum is about all development around libVLC.
nalor
Blank Cone
Blank Cone
Posts: 10
Joined: 09 Jul 2015 20:57

libaacs - how to check if decryption is possible with VUK from KEYDB.cfg

Postby nalor » 28 Jul 2015 23:03

Hello!

I'm searching for a simple way to check if the combination of discid + vuk available in a KEYDB.cfg can be used to decrypt the disc in the drive.

Basically I think the only way to check if a bluray can be decrypted successfully is to use the function 'aacs_decrypt_unit' but I've no idea how to use the 2nd parameter 'buf' ?

Maybe someone can tell me how to use this function and ideally how to modify the aacs_info example provided with libaacs to check if a vuk found in the keydb.cfg is a valid one.

Thanks in advance! :D

Additionally I've noticed a small error in aacs.c - it only affects the formatting of debug messages, but I think it should still be corrected: in function '_find_config_entry' there are 3 sections that output a 'Found xxx key for %s: %s' message - and the first parameter has to be a string, but it isn't - and so the debug output is garbled and unreadable.
'ce->entry.discid' has to be changed to 'str_print_hex(str2, ce->entry.discid, 20)' and str2 has to be defined - this way it's working correctly for me :)

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: libaacs - how to check if decryption is possible with VUK from KEYDB.cfg

Postby Jean-Baptiste Kempf » 30 Jul 2015 10:56

I guess commenting out the processing keys in KEYDB.cfg and running aacs_info would tell you.
If it still succeeds in decoding the disc, the VUK works
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

nalor
Blank Cone
Blank Cone
Posts: 10
Joined: 09 Jul 2015 20:57

Re: libaacs - how to check if decryption is possible with VUK from KEYDB.cfg

Postby nalor » 30 Jul 2015 21:03

Hi! Thanks for your answer, but I'd like to test it without trying to play the bluray - just want to check if the VUK can be used to successfully decrypt the bluray.

And yesterday evening I've found the hint to my question here:http://forum.doom9.org/showthread.php?p ... post941401

Now I unterstand that a 'Unit' is simply a fragment of 6144 bytes from an encrypted stream :)

I've tried it a minute ago and the following approach is giving me the result I've been searching for:
  • write DISCID and VUK to a emtpy KEYDB.cfg file
  • execute libaacs: aacs_open2 with devicepath and filename of the new KEYDB.cfg
  • read first 6144 bytes of the first file in \BDMV\STREAM and check if it is encrypted (check is performed in the same way as it is visible at the beginning of 'aacs_decrypt_unit') - if it isn't retry with next file until an encrypted one is found
  • execute libaacs: aacs_decrypt_unit with the buffer to the 6144 bytes and check return value: 1=everything fine - 0=decryption error, VUK wrong
  • execute libaacs: aacs_close
libaacs is really a great library :D

Thanks for the help!


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 31 guests