[MPlayer-dev-eng] what happened to the blu-ray support

Alexander Roalter alex at roalter.it
Mon Jun 28 12:32:13 CEST 2010


On 27.06.2010 21:26, Alexander Roalter wrote:
> On 06/27/2010 08:11 PM, Reimar Döffinger wrote:
>> On Sun, Jun 27, 2010 at 07:35:34PM +0200, Alexander Roalter wrote:
>>> Jonathan had an update to this patch posted, which I cannot get to work,
>>> so I'm sticking with this...
>>
>> I'd appreciate it if you could get the last one posted to work,
>> I can try to help debugging any issues.
>> IIRC the other one was fairly close to ok, whereas this one
>> hasn't really a chance.
> I saw in the older thread your notes on the updated patch, trying to
> integrate these, when I'm trying to get the update running.
> 
> Problem with it is that in bd_stream_open of the new version where
> bd_get_uks(bd) gets called, where the decoding is done with
> av_aes_crypt, I get from the input buffer the value
> acb194e94f3c5d69a7d8cfa05b180b22, which then decodes to 0xbf6203fc108f44....
> 
> whereas the original reads the input as
> acb194e94f3c5d69a7d8cfa05b180b22 and decodes to
> e7317ac00ee7c13f8363da07e0e42a38
> 
> 
> The old (working, with openssl) is
> 
> 
> pos=buf[0]<<24|buf[1]<<16|buf[2]<<8|(buf[3]&0xff);
> bd->uks.count=buf[pos]<<8|(buf[pos+1]&0xff);
> bd->uks.keys=malloc(sizeof(struct uk)*bd->uks.count);
> 
> for(i=0;i<bd->uks.count;i++) {
>     int key_pos=pos+i*48+48;
>     if(key_pos+16<=file_size) {
>         memcpy( bd->uks.keys[i].enc_key,&buf[key_pos],16);
>         // dec unit key
>         AES_KEY aes_key;
>         AES_set_decrypt_key(bd->vuk, 128, &aes_key);
>         AES_decrypt(bd->uks.keys[i].enc_key, bd->uks.keys[i].dec_key,
> &aes_key);
>     }
> }
> 
> 
> the new, non working is
> 
> pos = AV_RB32(buf);
> if (pos < file_size) {
>     bd->uks.count = AV_RB16(&buf[pos]);
>     bd->uks.keys = calloc(bd->uks.count,sizeof(struct uk));
> 
>     a = av_malloc(av_aes_size);
>     av_aes_init(a, bd->vuk, 128 , 1);
> 
>     for (i = 0; i < bd->uks.count; i++) {
>         int key_pos = pos + i * 48 + 48;
>         if (key_pos + 16 <= file_size) {
>             av_aes_crypt(a, bd->uks.keys[i].key, &buf[key_pos], 1, NULL,
> 1);  // decrypt unit key
>         }
>     }
> }
> 
> 
> pos and bd->uks.count is in both cases 128 and 1, respectively, the VUK
> is also identical on both.
> 
> 
Even if I enter the key C204905B20C64F997BC855A8353DF9AA and the code
acb194e94f3c5d69a7d8cfa05b180b22 in some randomly chose
online-aes-decrypter, I get the correct result:

http://www.hanewin.net/encrypt/aes/aes-test.htm

outputs e7317ac00ee7c13f8363da07e0e42a38

But I don't know how to parametrize the av_aes_crypt to do what they are
supposed to do... from the docs I don't see anything wrong with it...

-- 
cheers,
Alex



More information about the MPlayer-dev-eng mailing list