Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linux-dvb] SoftCam plugin 64bit problems...



Hello,

I assume this may be a bit off-topic for this list, however my hopes are to
find someone who can deliver this info back to it's author.

In my quest to make v4l2 and related tools 64bit compatible, I came up with
SoftCam plugin. I've found some issues so far that I would like to share:

In 64bit machines, OpenSSH uses 64 bit ints for storing BIGNUMS. This speeds
arithmetics quite a lot. In usual 32bit CPU's, it's based on 32bit ints.
Sc-plugin is assuming BIGNUM base to be 32 bits, thus, when applying the
keyselect flags in libnagra, it fails "by a mile".

I.E. inside Nagra_RSADecrypt_ECM, you have:
int ks = keyselect;
(.)
ks = ks >> 4;
(.)
result->d[result->top - 1] |= ks << (28);

This is 32bit specific and fails in 64bit machines. A 64bit specific code
would be:
long ks = keyselect;
(.)
result->d[result->top - 1] |= ks << (28+32);
(.)
result->d[result->top - 1] |= ks << (28+32);


Naturally, the best way is to "question" OpenSSL about the base-bit-length
it was compiled with... since it's possible, i.e., to compile it on 64bit
machines using 32bit integer (although not very bright).

Cheers,

PJ




-- 
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe linux-dvb" as subject.



Home | Main Index | Thread Index