SASC-NG
DVBSoftCAM

sc-irdeto.c File Reference

#include <stdio.h>
#include <string.h>
#include <openssl/rand.h>
#include "system-common.h"
#include "smartcard.h"
#include "crypto.h"
#include "data.h"
#include "misc.h"
#include "parse.h"
#include "log-sc.h"
#include "log-core.h"
#include "version.h"

Go to the source code of this file.

Classes

class  cSystemScIrdeto
class  cSystemLinkScIrdeto
class  cCamCrypt
class  cSmartCardDataIrdeto
class  cSmartCardIrdeto
class  cSmartCardLinkIrdeto

Defines

#define SYSTEM_NAME   "SC-Irdeto"
#define SYSTEM_PRI   -5
#define SC_NAME   "Irdeto"
#define SC_ID   MAKE_SC_ID('I','r','d','t')
#define L_SC   8
#define L_SC_ALL   LALL(L_SC_LASTDEF)
#define XOR_START   0x3F
#define ADDRLEN   4
#define MAX_PROV   16
#define RECOVER_TIME   100

Functions

 SCAPIVERSTAG ()
static void BN_complement (const unsigned char *data, int len, BIGNUM *bn)

Variables

static struct LogModule lm_sc
static cSystemLinkScIrdeto staticInit
static struct StatusMsg msgs []
static struct CardConfig cardCfg
static cSmartCardLinkIrdeto staticScInit

Define Documentation

#define ADDRLEN   4

Definition at line 348 of file sc-irdeto.c.

Referenced by cSmartCardIrdeto::Update().

#define L_SC   8

Definition at line 43 of file sc-irdeto.c.

#define L_SC_ALL   LALL(L_SC_LASTDEF)

Definition at line 44 of file sc-irdeto.c.

#define MAX_PROV   16

Definition at line 349 of file sc-irdeto.c.

#define RECOVER_TIME   100

Definition at line 350 of file sc-irdeto.c.

Referenced by cSmartCardIrdeto::Init().

#define SC_ID   MAKE_SC_ID('I','r','d','t')

Definition at line 41 of file sc-irdeto.c.

Referenced by cSystemLinkScIrdeto::CanHandle().

#define SC_NAME   "Irdeto"

Definition at line 40 of file sc-irdeto.c.

Referenced by cSmartCardIrdeto::Init().

#define SYSTEM_NAME   "SC-Irdeto"

Definition at line 37 of file sc-irdeto.c.

#define SYSTEM_PRI   -5

Definition at line 38 of file sc-irdeto.c.

#define XOR_START   0x3F

Definition at line 347 of file sc-irdeto.c.


Function Documentation

static void BN_complement ( const unsigned char *  data,
int  len,
BIGNUM *  bn 
) [static]

Definition at line 54 of file sc-irdeto.c.

References AUTOMEM, and i.

Referenced by cSmartCardDataIrdeto::Parse(), and cCamCrypt::SetupCardFiles().

{
  unsigned char *buff=AUTOMEM(len);
  for(int i=len-1; i>=0; i--) buff[i]=~data[i];
  BN_bin2bn(buff,len,bn);
  BN_add_word(bn,1);
}
SCAPIVERSTAG ( )

Variable Documentation

struct CardConfig cardCfg [static]
Initial value:
 {
  SM_8N2,3000,100
  }

Definition at line 396 of file sc-irdeto.c.

struct LogModule lm_sc [static]
Initial value:

Definition at line 46 of file sc-irdeto.c.

struct StatusMsg msgs[] [static]
Initial value:
 {
  { { 0x00,0x00 }, "Instruction executed without error", true },
  { { 0x55,0x00 }, "Instruction executed without error", true },
  { { 0x57,0x00 }, "CAM string rejected", false },
  { { 0x58,0x00 }, "Instruction executed without error", true },
  { { 0x9D,0x00 }, "Decoding successfull", true },
  { { 0x90,0x00 }, "ChID missing. Not subscribed?", false },
  { { 0x93,0x00 }, "ChID out of date. Subscription expired?", false },
  { { 0x9C,0x00 }, "Master key error", false },
  { { 0x9E,0x00 }, "Wrong decryption key", false },
  { { 0x9F,0x00 }, "Missing key", false },
  { { 0x70,0x00 }, "Wrong hex serial", false },
  { { 0x71,0x00 }, "Wrong provider", false },
  { { 0x72,0x00 }, "Wrong provider group", false },
  { { 0x73,0x00 }, "Wrong provider group", false },
  { { 0x7C,0x00 }, "Wrong signature", false },
  { { 0x7D,0x00 }, "Masterkey missing", false },
  { { 0x7E,0x00 }, "Wrong provider identifier", false },
  { { 0x7F,0x00 }, "Invalid nano", false },
  { { 0x54,0x00 }, "No more ChID's", true },
  { { 0xFF,0xFF }, 0, false }
  }

Definition at line 373 of file sc-irdeto.c.

Definition at line 84 of file sc-irdeto.c.

Definition at line 714 of file sc-irdeto.c.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines