Hi all,
I'm kinda new at this forum so i don't know where my question belongs here.
I'working on a software app that descrambles encrypted tv channels.
Most of it is done (although a lot of it needs to be tied together) but that doesnt really matter.
i'll explain how the whole thing works.
You have a laptop or pc with a smartcard reader, a source for coded mpeg2 streams and a smartcard (casema, cryptoworks irdeto).
The idea is that if you start the app, load in the mpeg2 stream, you can decrypt the channel. (CSA is implemented so i just need to get the control words from the SC)
I already tested with a casema card and a cyptoworks card but with the irdeto card i get stuck. (I think mainly because irdeto doesn't use T0 or T1 protocol)
I dug up ISO 7816-4 (
http://www.ttfn.net/techno/smartcard...6_4.html#ssB_1 ) to find out how to talk to the SC.
Every card I tried so far (with the exception of the irdeto) uses T0 protocol and i can connect to them.By making use of the winSCard.dll and the SCardConnect() function.
This function takes takes following parameter:
Parameters
hContext [in] A handle that identifies the resource manager context. The resource manager context is set by a previous call to
SCardEstablishContext.
szReader [in] The name of the reader that contains the target card.
dwShareMode [in] A flag that indicates whether other applications may form connections to the card.
Value Meaning
SCARD_SHARE_SHARED This application is willing to share the card with other applications.
SCARD_SHARE_EXCLUSIVE This application is not willing to share the card with other applications.
SCARD_SHARE_DIRECT This application is allocating the reader for its private use, and will be controlling it directly. No other applications are allowed access to it.
dwPreferredProtocols [in] A bit mask of acceptable protocols for the connection. Possible values may be combined with the
OR operation.
Value Meaning
SCARD_PROTOCOL_T0
T=0 is an acceptable protocol.
SCARD_PROTOCOL_T1
T=1 is an acceptable protocol.
0 This parameter may be zero only if
dwShareMode is set to SCARD_SHARE_DIRECT. In this case, no protocol negotiation will be performed by the drivers until an IOCTL_SMARTCARD_SET_PROTOCOL control directive is sent with
SCardControl.
phCard [out] A handle that identifies the connection to the smart card in the designated reader.
pdwActiveProtocol [out] A flag that indicates the established active protocol.
Value Meaning
SCARD_PROTOCOL_T0 T=0 is the active protocol.
SCARD_PROTOCOL_T1 T=1 is the active protocol.
SCARD_PROTOCOL_UNDEFINED SCARD_SHARE_DIRECT has been specified, so that no protocol negotiation has occurred. It is possible that there is no card in the reader.Does irdeto use T0 or T1 protocol, and if not wich one does it use and how do i set up this protocol.
I've already read a lot of stuf on the irdeto but i cannot use or try these commands or even send an ATR to the card if i can't connect to it.