Conditional access (CA)
Since we may not want to give our content away for free, we need some way of encrypting our services. This is handled by the conditional access (or CA) system. The algorithm that's used for this is proprietary to each CA vendor, although there are some open (but not publicly-known) algorithms such as the DVB Common Scrambling Algorithm. Manufacturers are understandably nervous about disclosing the algorithms they use, because the costs of having the algorithm cracked are huge - in some European markets, as much as 30% of subscribers were believed to be using hacked smart cards at one point. Even the DVB Common Scrambling Algorithm requires STB manufacturers to sign a non-disclosure agreement before they can use it.
In a DVB system, scrambling can work at either the level of the entire transport stream, or on the level of individual elementary streams. There's no provision for scrambling a service in its own right, but the same affect is achieved by scrambling all of the elementary streams in a service. In the case of scrambled elementary streams, not all of the data is actually scrambled - the packet headers are left unscrambled so that the decoder can work out their contents and handle them correctly. In the case of transport stream scrambling, only the headers of the transport packets are left unencrypted - everything else is scrambled.
As well as encrypting the data that's supposed to be encrypted, the CA system adds two types of data to the stream. These are known as CA messages, and consist of Entitlement Control Messages (ECM) and Entitlement management Messages (EMM). Together, these control the ability of individual users (or groups of users) to watch scrambled content. The scrambling (and descrambling) process relies on three pieces of information:
- The control word
- The service key
- The user key
The control word is encrypted using the service key, providing the first level of scrambling. This service key may be common to a group of users, and typically each encrypted service will have one service key. This encrypted control word is broadcast in an ECM approximately once every two seconds, and is what the decoder actually needs to descramble a service.
Next, we have to make sure that authorized users (i.e. those who have paid) can decrypt the control word, but that only authorized users can decrypt it. To do this, the service key is itself encrypted using the user key. Each user key is unique to a single user, and so the service key must be encrypted with the user key for each user that is authorized to view the content. Once we've encrypted the service key, it is broadcast as part of an EMM. Since there is a lot more information to be broadcast (the encrypted service key must be broadcast for each user), these are broadcast less frequently - each EMM is broadcast approximately every ten seconds.
Encapsulating code words and service keys in ECMs and EMMs.
One thing to note is that the encryption algorithms used may not be symmetrical. To make things easier to understand we're assuming that the same key is used for encryption and decryption in the case of the service and user keys, but this may not be the case.
When the receiver gets a CA message, it's passed to the CA system. In the case of an EMM, the receiver will check whether the EMM it intended for that receiver (usually by checking the CA serial number or smart card number), and if it is, it will use its copy of the user key to decrypt the service key.
The service key is then used to decrypt any ECMs that are received for that service and recover the control word. Once the receiver has the correct control word, it can use this to initialize the descrambling hardware and actually descramble the content.
While not all CA systems use the same algorithms (and it's impossible to know, because technical details of the CA algorithms aren't made public), they all work in basically the same way. There may be some differences, and the EMMs may or instance be used for other CA-related tasks besides decrypting service keys, such as controlling the pairing of a smart card and an STB so that the smart card will work correctly in that receiver.
In order to generate the EMMs correctly, the CA system needs to know some information about which subscribers are entitled to watch which shows. The Subscriber Management System, or SMS, is used to set which channels (or shows) an individual subscriber can watch. This is typically a large database of all the subscribers that is connected to the billing system and to the CA system, and is used to control the CA system and decide which entitlements should be generated for which users. The SMS and CA system are usually part of the same package from the CA vendor, and are tied together pretty closely.
The ECMs and EMMs are broadcast as part of the service (see the introduction to MPEG if you're unclear on the concept of a service). The PIDs for the CA data are listed in the Conditional Access Table (CAT), and different PIDs can be used for ECMs and EMMs. This makes it easier for remultiplexing, where some of the CA data (the ECMs) may be kept, while other data (the EMMs) may be replaced.
Error correction and error prevention
Before we can transmit our signal we need to make sure that it will be received correctly. This means some way of identifying and correcting errors in the stream. To do this we add some extra error correction data to the MPEG packets, in order to allow us to correct data. The most common requirement in DTV systems is for an MPEG stream to be quasi-error free (QEF), which means a bit error rate of approximately 1x10-10, or one erroneous bit every 1 hour of video for a 30 Mbits/sec stream. Since we have to be able to correct the errors in real-time, the process is called Forward Error Correction (FEC)
Different transmission mechanisms (cable, satellite or terrestrial) all have different characteristics including different noise levels. A satellite signal for instance can have a lot of errors introduced by conditions in the atmosphere. A terrestrial signal may have errors introduced by reflections from buildings, or by the receiving aerial not being aligned correctly. These different conditions mean that very efficient error correction mechanisms are needed. DVB and ATSC systems all use Reed-Solomon encoding to add a first layer of protection. This adds a number of parity bytes to each packet. Typically, this 16 parity bytes are added to a 188-byte packet, which means that an 8-byte error can be corrected. Larger errors can be detected but not corrected.
Once this is done, a further layer or error correction coding is added to improve things still further. Common coding mechanisms at this stage are trellis coding and viterbi coding. These exploit the fact that data is not sent one bit at a time, but is instead sent as 'symbols' that can carry several bits of data. In trellis coding, symbols are grouped together to form 'trellises.' For a group of three symbols, a modulation scheme that stores eight bits per symbol can store 512 separate values. By using a subset of these as 'valid' values, the network operator can introduce some extra redundancy into the signal. The effect of this is that each symbol may carry fewer bits of data, but for every group of three symbols, it's possible to correct one erroneous symbol by choosing the value for that symbol that gives a valid trellis. This is the approach used by US digital terrestrial systems. DVB systems use Viterbi coding instead, which is a modification of trellis coding that uses a slightly different algorithm to find the best matching trellis.
To strengthen the error correction, another technique called interleaving may be added. This helps avoid situations where a burst of noise (for example, a lightning strike causing electrical interference) can corrupt data past the point where FEC can fix it. After the data has FEC added, but before it is transmitted, the data is written to a RAM buffer and then read out in a different order. For instance, if we assume that our RAM buffer is a two-dimensional array with ten rows and ten columns, the data may be written to the buffer starting at row 1 and working down to row 10, then read from starting at the top of column 10 and working back to column 1. This means that bytes from the same packet (which will share error correction) are spread over a longer transmission period and are less vulnerable to burst noise.
At the receiver, the process is reversed, and the original order of the bytes can be restored. The interleaving scheme described here isn't the only possible one, and other (more memory-efficient) techniques will often be used instead.
Once we've added error correction, we need to do one more thing before it can be prepared for transmission. If the digital bitstream contains a large run of 1's, then there will be a (small) current flowing in the transmission and reception equipment. This is a Bad Thing, and so some randomization is needed to make sure that there is never a long run of 1's or 0's in the bitstream and to disperse the energy in the signal across all of its bandwidth. To do this, a simple randomizer is used, as shown in the diagram below. The process is symmetrical, so the same hardware is used to de-randomize the signal in the receiver.
A logical diagram of the DVB randomizer.
Every eight transport packets, the randomizer is reset and its register is loaded with the bit sequence 100101010000000. Of course, the randomizer and the de-randomizer must both reset themselves at the same point in the stream, or the input can't be recreated. This is done using the sync bytes from the transport packets. These are not scrambled, so the start of a packet can always be identified, and at every eighth packet, the value of the sync byte is inverted (from 0x47 to 0xB8). This is the signal for the de-randomizer to reset itself, making sure that both the randomizer and the de-randomizer are synchronized correctly.


This equipment is normally all connected together using high-speed connections like SDI (Serial Digital Interface) or ASI (Asynchronous Serial Interface) which are standard in the TV field. In addition to this, all of the equipment will me connected via ethernet to a control system and monitoring equipment to make sure that nothing goes wrong (or that if something does go wrong, the viewer doesn't see it). There will normally be a large number of some of these components, including some redundant spares in the event of problems. A typical head-end will contain many MPEG encoders and multiplexers, for instance. Now that we've seen how it's put together, let's examine each of these components in more detail.
.de
Reply With Quote
One thing to note is that the encryption algorithms used may not be symmetrical. To make things easier to understand we're assuming that the same key is used for encryption and decryption in the case of the service and user keys, but this may not be the case.
Every eight transport packets, the randomizer is reset and its register is loaded with the bit sequence 100101010000000. Of course, the randomizer and the de-randomizer must both reset themselves at the same point in the stream, or the input can't be recreated. This is done using the sync bytes from the transport packets. These are not scrambled, so the start of a packet can always be identified, and at every eighth packet, the value of the sync byte is inverted (from 0x47 to 0xB8). This is the signal for the de-randomizer to reset itself, making sure that both the randomizer and the de-randomizer are synchronized correctly.

=
.
cos(ω0+ωm)t +
) este prezent in componentele laterale ale semnalului modulat.
cos(ω0+ωm)t ;
+2
=
+2
,

cos ωmt [1+cos(2ω0t)] ,
cosωmt ,
.,
∆VBE = I0

∆VBE ,
este tensiunea termică a tranzistorului