Application Research of AES Algorithm in PVR Set-Top Box

1 Introduction

The AES algorithm is an advanced encryption algorithm selected by the National Institute of Standards and Technology (NIST) in 3 years and after 2 rounds of evaluation. All the design principles of AES are open and there are no patent rights issues. Anyone can obtain and use this algorithm through normal channels. As a new generation of data encryption standards, AES brings together the advantages of strong security, high performance, high efficiency, ease of use, and flexibility. The encryption speed is fast and the memory requirements are low. It is very suitable for application on embedded platforms. Based on the analysis of the principle of AES encryption algorithm, this paper focuses on the implementation steps of the algorithm, and implements the encryption / decryption operation of AES algorithm completely in C language, and implements the application in PVR set-top boxes.

2 AES encryption / decryption algorithm principle introduction

The AES algorithm is a block cipher algorithm, and its input packet, output packet, and intermediate packet length for encryption / decryption are all 128 b. There are three key lengths: 128, 192, and 256 b.

The AES algorithm is based on permutation and substitution operations. Replacement is to rearrange the data, and substitution is to replace one data unit with another. The input of the AES-128 algorithm used in this article is 128-bit data, and the key length is also 128 bits. Each round requires an extended key with the same length as the input packet to participate.

The AES algorithm is mainly composed of three parts: round change, number of turns and key expansion. This article introduces in detail the implementation steps of each part of the AES encryption / decryption algorithm; combined with the C language, the application of the advanced encryption algorithm AES in the PVR digital TV set-top box is realized. The flow chart of the encryption / decryption module program of the AES-128 algorithm used is shown in Figure 1.


2.1 Encryption transformation

Each round of encryption of the AES encryption algorithm uses substitution and aliasing to process the entire data packet state in parallel. It is mainly realized through the cyclic call of 5 sub-modules SubBytes, ShiftRows, MixColumns, AddRounke and GetNewEncrypt.

Subbyte transformation, or s box replacement, is the only nonlinear transformation in the AES algorithm. It replaces each byte in the state with S-box. The first 4 bits of each byte specify the row value of the s box, the last 4 bits specify the column value of the S box, and then take the corresponding row and column elements in the S box as output to replace the byte.

ShiftRow completes row-based cyclic shift operations. It cyclically shifts the lines in the state according to different offsets. In general, the 0th line does not move, the 1st line rotates left by 1 byte, and the 2nd line rotates left by 2 bytes. The 3 lines rotate left by 3 bytes.

MixColumn performs obfuscation transformation on the status column. Take the transformation result of ShiftRow as a polynomial in the GF (28) domain, multiply by c (x) = 03x3 + 01x2 + 01x + 02, and then modulo the irreducible polynomial x8 + x4 + x3 + x + 1 In this paper, according to the GF (28) finite field operation rules, the column transform is improved into simple shift and XOR operations. Set 1 byte as (b7b6b5b4b3b2b1b0), then:




AddRounkey is a simple XOR logical operation by byte and the result of mixing columns and subkeys.

GetNewEncrypt generates the key needed for the next round of transformation. It is grouped by the columns of the matrix. The generation method is as follows: If the i-th column is not a multiple of 4, that is (i% 4 == 1), then the i-column is as follows Formula determination:

W (i) = W (i-4) XORW (i-1).

If the i-th column is a multiple of 4, ie (i% 4 == 0), then the i-th column is determined by the following equation:

W (i) = W (i- + 4) XOR T [W (i-1)]

Where T [W (i-1)] is a conversion form of w (i-1), and let W (i-1) = [a, b, c, d]. The implementation is as follows:

Shift the element of W (i-1) to the left, that is, [b, C, d, a]. Enter these 4 bytes into the S box to get new 4 bytes [e, f, g, h]. Calculate the new constant r (i) = 2 (i-4) / 4. Generate the converted column [e XOR r (i), f, g, h].

The key generation columns of the i-th round are W (4i), W (4i + 1), W (4i + 2), W (4i + 3), so the key matrix of the i + 1th round is obtained.

When calculating the round constant, when the number of encryption rounds is greater than or equal to 9, 8 bits are not enough to indicate its value. At this time, mod (x8 + x4 + x3 + x + 1), the value is 0x1b, and the subsequent value is 0x1b. multiple. That is, when r (i) is greater than or equal to 256, the value of r (i) is 0x1b * (turn-8).

The AddRounkey transformation XORs the result of the MixColumn transformation and the result of the GetNewEncrypt transformation by corresponding bytes, and the obtained result is used as the input for the next round of transformation.

The above five steps complete a round of AES encryption transformation, and repeat the above process according to the number of encryption rounds until the final round of transformation. The difference of the last round of transformation is that there is no column aliasing transformation MixCol-umn. The AddRounkey transformation directly XORs the result of ShiftRow transformation and the result of GetNewEncrypt transformation according to the corresponding bytes. Text.

Now that you know why having the best LED Hydroponic Light is the most effective way of growing plants indoors, it is important to know what exactly you should be looking for in a model before purchasing it. Even though Led Grow Lights overall consume less power, provide more useful light, and give off less heat, there are still poor models that wouldn't give you everything that you are looking for in a set up. By taking a look at a few things, though, you'll be capable of having the best harvests ever and making sure you are saving money and able to truly enjoy the fruits of your labor. 


LED Grow tube light uses the new light spectrum optimized horticulture SMD LEDs for higher yields and lower operating costs compared to standard horticultural T8 and T5 fluorescent light fixtures.Ideal lighting for Micro greens, lettuce and seedlings, the low profile light tube allows for a great utilization of growing space while reducing the cost and maintenance of LED drivers.


How to Select the Best Grow Light for your Greenhouse?

The plant needs light to thrive cause the light is essental for photosynthesis.without it,plants can not make food.but light can also be too intense,too hot or last too long for growing healthy plants.plant growth accelerates with abundant light because more of the plant`s leaves have exposure,which means more photosynthesis.in the winter,days are not long enough,but many plants still need 12 hours or more of light per day.

Now,adding LED Grow Lights to your greenhouse is an nice choice if you live in the north, and can not get enough daylight in winter.you might be take HID into consideration,cause it has high output and cover a wide area.but now,we providing you some dfferent.the newest type of grow lights use LED technology.


Provides Maximum Light Density and optimizing spectrum(410nm-740nm,white)


as we know that the plants need more light from the blue side of the spectrum during their seedling stage and when developing foliage and require light from the orange to red side of the spectrum while inblooming and fruiting phases. We adopting lastest intergrated COB technology, white , more red and blue PAR(410-740nm) per Watt than any other lighting fixture  for the best color uniformity.


Dual Veg and Bloom for plant growth and bloom

the Led grow lights feature selectable VEG and BLOOM light spectrums to deliver maximum performance from seeding through the flower stage and finally harvest.

Increase yields and potency

using high quality lense that hyper-focus the lights on your canopy.the photons are beamed directly to the plants.this gives growers the ability to get greatest possible crop yield.

Reduce your costs with energy efficiency

energy-efficient cannabis grow lights cost between 40%-60% less to operate compared to HID lam year.

Led Grow Light also eliminate the needs for ballasts and reflectors while they minimize the cooling systems,accelerating your payback.you will see the electrical bills trimmed by approximately half,year after year.

Installs and operates simply

the input voltage is AC100V-240V,fit for the world standard,built-in power supply.do not need other equipment,just access to the Plug,the lamp will be work smoothly. The Led Grow Lighting is small size,just few inches and easy to install.it is the good option for some greenhouse.

Long lifespan

using built-in quiet fans and the shutter in the wind,induced draftfrom all sides.runs with quiet. Useadvanced isolation power supply and soft start protection technology, to prevent the high voltage when turn on the light from damagingthe lamp body.


Applications

Latest Diamond Version Led Grow Light For Plants,using effective full spectrum 360-870nm sunlight spectrum for plants,largely accelerate the plant growth.Compare with the previous led grow lights,Diamond LED Grow Light use high par value and high lumen ligthing for the plant growth.Solid lamp body  can last for long time.It can be used to enhance the growth of different plants (medical plants, vegetables, herbs and flowers ).Widely used in hydroponic,greenhouse, indoor garden, horticulture, aeroponics.It is suitable for all plants growth.


Usage Instruction:
Extremely bright,do not look directly at the LED grow light when the light is working.
Indoor use only,not water-proof.no extra ballast is needed.
This light includes IR(infrared)LEDs which look dim/invisible,they are not faulty LEDs.
Timer controls both channels on/off together.cannot turn VEG and BLOOM channels on/off separately.

LED Hydroponic Light

Led Hydroponics Light,Led Dual Band Light,Hydroponics Dual Band Light,Hydroponic Led Grow Light

Shenzhen Phlizon Technology Co.,Ltd. , https://www.philizon.com