7. The ECM Next comes the major cmd. These are sent about every 7 seconds.
48 40 40 80 XX The packet length can vary depending upon the number of entitlements included.
The following is a full ECM packet logged with a DVB-s. You'll see that only the last part is actually passed on to the smartcard. The first part is processed by the ICAM:
80 70 54 00 00 01 0E 38 1A 23 C5 FF FF 32 50 01 20 01 00 00 EB 41 7E 12 00 00 00 00 00 00 00 00 7E CC A1 C2 5E B6 85 92 00 00 7F 12 76 68 2C CF 57 B6 41 F6 80 E4 86 8F 7B C5 C3 0D 92 44 09 10 10 00 01 38 1A 23 C5 CB 02 FF FF 02 80 67 08 70 7F 04 34 82 D6 A1 D8
80 70 packet separator, first byte alternates between 80 and 81.
54 length of the whole packet
00 00 01 allways the same
0E Header length
38 1A 23 C5 Date and Time (26.09.2001 04:30:10)
FF FF allways the same
32 50 9th and 10th byte of key returned by INS54
01 alternates between 01 and 11 (indicates Odd/Even CW in returned key?)
20 01 00 00 allways the same
EB Checksum (00+00+01+0E+38+1A+23+C5+FF+FF+32+50+01+20+01+00+0 0=EB)
41 length of the packet send to the SmartCard
The following bytes are passed on to the SmartCard:
48 40 00 00 41 generated instruction header from the ICAM
00 Dummy send by the ICAM too
7E_12 00 00 00 00 00 00 00 00 7E CC A1 C2 5E B6 85 92 00 00 - signature and key adjustment
7F_12 76 68 2C CF 57 B6 41 F6 80 E4 86 8F 7B C5 C3 0D 92 44 - signature and key adjustment - for future cards?
09 10 10 00 set key
01 38 1A 23 C5 Sets Date/Time (for exemple:26.09.2001 04:30:10)
CB_02 FF FF sets two bytes
02 80 Sets rating byte
67_08 70 7F 04 34 82 D6 A1 D8 signature
Answer to ECM
>48 54 00 00 0f
<54 ICAM Command
<F9 8E F5 D5 D1 1B 2A A6 Even or Odd Control Word (encrypted with IRD number on PayTV channels)
<32 50 bytes are compared to the bytes in ECM Header
<00 00 Always zero?
<40 Something to do with fuse byte
<03 03=decryption was successfull/04=decryption was not seccessfull?
<00 Always zero?
<90 20 Sw1/Sw2
Now let's concentrate on the parts send to the SmartCard
>48 40 40 80 46
<40 ICAM comand
>00 Dummy
>7e_12 7E nano
>00 00 00 00 00 00 00 00 Signature Adjustment Bytes
>56 ab cf 95 51 b7 0e a2 00 00 Key Adjustment Bytes (using simple XOR if rating byte 00 or 80)
>09 10 10 00 Select public key 10 and initialise ASIC
>01 36 14 93 ee 01 nano - load date and time
>02 00 02 nano - rating byte - program content
>03 00 10 00 03 nano - check channel entitlements
>03 b7 58 00 These list the packages that include this encrypted channel
>03 b7 59 00
>03 b7 5a 00
>03 b7 5b 00
>03 b7 57 00
>03 b7 23 00
>67_08 Signature nano
>b8 07 e5 40 e5 6a 9a 34 Digital signature calculate with key 10
<90 20 transmission ok
---------------
Channel 5
48 40 40 80 37 [40] 00 7e 12 00 00 00 00 00 00 00 00 4d 23 cb 4e 15
68 cd 6c 00 00 09 10 10 00 01 36 14 91 36 02 40
24 38_05 08 00 1a 00 1d 04 03 00 1d 00 67 08 7f 38_05 nano
f3 a9 99 b0 e5 5f f0 90 20
Same Channel 5 a few seconds later
48 40 40 80 37 [40] 00 7e 12 00 00 00 00 00 00 00 00 2a b2 7e 30 61
b0 bb 9b 00 00 09 10 10 00 01 36 14 91 3c 02 00
24 38_05 08 00 1a 00 1d 04 03 b7 65 00 67 08 eb
97 8f e9 6a 72 6b 64 90 20
Note: the last time byte has incremented and for some reason the entitlement bytes have changed?? This may be associated with a change in the rating byte??
The channel ID entitlement is the two bytes after the 03 nano. These two bytes must match the channel ID entitlement that is on the card. These entitlements can be seen with a 48_2a read card.
For a BBC card they are:-
00 1D xx Cx BBC 1 + 2, BBC Choice, BBC News 24, BBC Knowledge
B7 65 xx Cx Channel 5
B7 66 xx Cx Channel 4
B7 72 xx Dx ITV (Channel 3)
B7 73 xx Dx ?
The last two bytes vary depending upon the expiry date of the entitlement. The first date byte is the year and month. The second byte always has a high nibble of Ch or Dh. These nibbles overwrite the high nibble of the day byte sent in the entitlement update.
eg
Original channel entitlement
B7 73 3A C5
card receives this update cmd
41 B7 73 3A 1A
then this is written to the card
B7 73 3A DA
These are the entitlements that exist for Sky 1
b7 23 xx Cx
b7 57 xx Cx
b7 59 xx Cx
b7 5a xx Cx
b7 5b xx Cx
It looks like these channel IDs can change over time as expired cards which were open on this channel do not have these IDs.
--------
At certain times some ECMs are longer and appear to have two sets of key adjustment nanos. These use both nanos 7e_12 and 7f_12. They also have some additional nanos/flags.
>48 40 40 80 4e
<40 card replys command for ICAM
>00
>7e_12 7E nano
>00 00 00 00 00 00 00 00 Signature Adjustment Bytes
>56 62 6e 2f f9 fd c7 55 00 00 Key Adjustment Bytes
>7f_12 7E nano
>07 7e a6 fb d9 86 c5 27 Signature Adjustment Bytes - reserved for future cards?
>b2 ad d0 c3 69 65 ea 1d c4 99 Key Adjustment Bytes - reserved for future cards?
>09 10 10 00 initialise ASIC with public key 10
>01 39 01 ad 39 Set date and time
>CB 02 ff ff nano and data (always FF FF?)
>02 40 rating byte
>24 Flag, Close Filter
>38 03 08 00 18 nano and data (length can also be 05 or 07)
>25 Flip filter cmd from open to closed or vice versa
>03 00 1d CHID "00 1d" is required, set by 03 nano
>00
>67_08 signature nano
>9a 3d db 7f c2 12 c0 b2 signature
<90 20 transmission ok
---------------------------
Some PPV ECMs appear to have a different P1
>48 40 60 80 75
<40 card replys command for ICAM
>00
>7e 12 7E nano
>00 00 00 00 00 00 00 00 Signature Adjustment Bytes
>e0 44 ad bb e4 94 c5 bc 00 00 Key Adjustment Bytes (using simple XOR if rating byte 00 or 80)
>7f 12 7E nano
>26 56 e6 f9 6f 2e 90 49 Signature Adjustment Bytes - reserved for future cards?
>e8 54 75 b9 72 e2 35 cc 68 8b Key Adjustment Bytes - reserved for future cards?
>09 10 10 00 initialise ASIC with public key 10
>01 39 0a 81 6b Set date and time
>cb 02 ff ff nano and data (always FF FF?)
>02 52 rating byte
>03 5d 68 c0 PPV CHID "5d 68" must be active, or
>03 b7 f4 c0 PPV CHID "b7 f4" must be active, or
>03 b8 28 c0 PPV CHID "b8 28" must be active
>38_03 08 00 cc nano and data (length can also be 05 or 07)
>25 Flip filter cmd from open to closed or vice versa
>04 Flag, unknown propose
>4d_0e 5d 68 39 10 00 65 06 00 00 a3 e3 00 d9 e4 unknown, same as in PPV EMM
>4d_0e 5d 68 39 10 00 65 06 00 01 45 e3 01 b1 e4 unknown, same as in PPV EMM
>67 08 signature nano
>b6 b4 18 7c 9f 8c d1 28 signature
<90 a0
=== to be continued ===


.de
Reply With Quote
