(19)
(11)EP 3 376 725 B1

(12)EUROPEAN PATENT SPECIFICATION

(45)Mention of the grant of the patent:
10.06.2020 Bulletin 2020/24

(21)Application number: 15909475.4

(22)Date of filing:  30.11.2015
(51)International Patent Classification (IPC): 
H04L 25/03(2006.01)
H04N 5/913(2006.01)
(86)International application number:
PCT/CN2015/096032
(87)International publication number:
WO 2017/091958 (08.06.2017 Gazette  2017/23)

(54)

DATA SCRAMBLING METHOD AND SCRAMBLING APPARATUS

DATENVERSCHLÜSSELUNGSVERFAHREN UND VERSCHLÜSSELUNGSVORRICHTUNG

PROCÉDÉ ET APPAREIL D'EMBROUILLAGE DE DONNÉES


(84)Designated Contracting States:
AL AT BE BG CH CY CZ DE DK EE ES FI FR GB GR HR HU IE IS IT LI LT LU LV MC MK MT NL NO PL PT RO RS SE SI SK SM TR

(43)Date of publication of application:
19.09.2018 Bulletin 2018/38

(73)Proprietor: Huawei Technologies Co., Ltd.
Longgang District Shenzhen, Guangdong 518129 (CN)

(72)Inventor:
  • LI, Changsong
    Shenzhen Guangdong 518129 (CN)

(74)Representative: Epping - Hermann - Fischer 
Patentanwaltsgesellschaft mbH Schloßschmidstraße 5
80639 München
80639 München (DE)


(56)References cited: : 
WO-A1-2015/100621
CN-A- 104 185 094
US-A1- 2008 095 218
CN-A- 103 745 746
CN-A- 105 009 540
  
      
    Note: Within nine months from the publication of the mention of the grant of the European patent, any person may give notice to the European Patent Office of opposition to the European patent granted. Notice of opposition shall be filed in a written reasoned statement. It shall not be deemed to have been filed until the opposition fee has been paid. (Art. 99(1) European Patent Convention).


    Description

    TECHNICAL FIELD



    [0001] Embodiments of the present invention relate to the communications field, and in particular, to a data scrambling method and a scrambling apparatus.

    BACKGROUND



    [0002] With the development of the Internet, a requirement on interface bandwidth of the Ethernet increases. The interface bandwidth of the Ethernet increases from 10 gigabits per second (Gigabit per second, Gpbs) to 100 Gbps, and evolves towards 400 Gbps and 1 terabit per second (terabit per second, Tbps). To improve channel utilization, a flexible grid optical transmission network (Flexible Grid Optical Transmission Network) technology emerges. An optical layer of an Ethernet interface can dynamically adjust a data sending rate according to a transmission distance of to-be-transmitted data and quality of a channel used to transmit the data. An interface standard of a network device may be 10 Gbps, 40 Gbps, or 100 Gbps. To implement interconnection, interfaces of two communication parties need to use interface standards that match each other. To reduce hardware costs, a design requirement that a transmitter or a receiver includes Ethernet interfaces of different interface standards exists. In the foregoing scenario, a variable-bandwidth interface needs to be used. A variable-bandwidth optical layer technology also requires that an electrical layer should include a variable-bandwidth interface.

    [0003] In an Ethernet communication protocol, to ensure normal working of a clock and data recovery (Clock Data Recover, CDR) circuit, a scramble algorithm is generally used, so as to reduce a probability that successive 0s or successive Is appear in transmitted serial data.

    [0004] In the prior art, a scrambling apparatus can only scramble a data stream of a specification, and cannot scramble a data stream of another specification. A usage scenario of the scrambling apparatus is limited. For example, a requirement of a flexible Ethernet scenario cannot be well satisfied. For example, in the prior art, if a scrambling apparatus is configured to scramble a data stream formed by two sub-data streams, the scrambling apparatus can only scramble a data stream formed by two sub-data streams, and cannot be configured to scramble a data stream formed by three sub-data streams, and cannot scramble a data stream including only one sub-data stream either.

    [0005] WO 2015/100621 A1 discloses a scrambling method and a scrambling apparatus, capable of being used in a flexible Ethernet. In a scenario of a flexible Ethernet, it may be required to adjust the number of Ethernet frame streams received by an Ethernet interface of a receiver and a bit width of each of the Ethernet frame streams. In the disclosed technical solutions, a corresponding scrambling circuit is set for each data segment in the Ethernet frame streams to separately scramble each data segment, the number of bits of each data segment being M. X scrambling circuits corresponding to X data segments in a first Ethernet frame stream can separately calculate scrambling results of X data segments. Therefore, if the bit width of each of the adjusted Ethernet frame streams is an integral multiple of M, reconfiguration can be performed by means of the corresponding number of scrambling circuits, so as to scramble each of the adjusted Ethernet frame streams.

    SUMMARY



    [0006] Embodiments of the present invention provide a data scrambling method and a scrambling apparatus, as defined in the attached claims to scramble data streams of different specifications, which can help expand an application scenario of a scrambling apparatus.

    [0007] According to a first aspect, an embodiment of the present disclosure provides a data scrambling method, where the method is executed by a scrambling apparatus, the scrambling apparatus includes multiple scrambling circuits, the multiple scrambling circuits include a first scrambling circuit and a second scrambling circuit, and the method includes:

    performing, by the first scrambling circuit, data calculation on a first data block according to a first scrambling factor, to obtain a data calculation result generated by the first scrambling circuit, where the first scrambling factor is a scrambling factor determined by a scrambling polynomial, the first data block belongs to a first sub-data stream, and the first sub-data stream belongs to a data stream transmitted to the scrambling apparatus;

    performing, by the second scrambling circuit, data calculation on a second data block in the data stream and a first parameter according to the first scrambling factor, to obtain a data calculation result generated by the second scrambling circuit, where the second data block is a data block that is located after the first data block and that is adjacent to the first data block in the data stream during serial transmission, the second data block belongs to a second sub-data stream, the second sub-data stream belongs to the data stream, when the second sub-data stream and the first sub-data stream are a same sub-data stream, the first parameter is the data calculation result generated by the first scrambling circuit, and when the second sub-data stream and the first sub-data stream are two different sub-data streams, the first parameter is zero;

    performing, by the second scrambling circuit according to a second scrambling factor, feedback calculation on feedback data provided by a third scrambling circuit, to obtain a feedback calculation result generated by the second scrambling circuit, where the third scrambling circuit is a scrambling circuit among the multiple scrambling circuits, multiple data blocks in the second sub-data stream are obtained by the multiple scrambling circuits in one clock cycle, the last data block among the multiple data blocks in the second sub-data stream is obtained by the third scrambling circuit, the last data block is the last data block that is transmitted during serial transmission of the multiple data blocks, the second scrambling factor is a scrambling factor determined by the scrambling polynomial and a location of the second data block in the second sub-data stream, and the feedback data includes data that is obtained after scrambled data generated by the third scrambling circuit is registered for one clock cycle, or the feedback data includes a result that is obtained after exclusive OR calculation is performed on a first result and a data calculation result that is generated by the third scrambling circuit, where the first result is obtained after feedback calculation is performed on feedback data that is provided by the third scrambling circuit and that is registered for one clock cycle; and

    performing, by the second scrambling circuit, exclusive OR calculation on the data calculation result generated by the second scrambling circuit and the feedback calculation result generated by the second scrambling circuit, to obtain scrambled data generated by the second scrambling circuit, and outputting, by the second scrambling circuit, the scrambled data generated by the second scrambling circuit.



    [0008] With reference to the first aspect, in a first possible implementation manner of the first aspect, the performing, by the second scrambling circuit, data calculation on a second data block in the data stream and a first parameter according to the first scrambling factor, to obtain a data calculation result generated by the second scrambling circuit includes:

    multiplying, by the second scrambling circuit, a first scrambling parametric value in the first scrambling factor by the first parameter, to obtain a first multiplication result generated by the second scrambling circuit;

    multiplying, by the second scrambling circuit, a second scrambling parametric value in the first scrambling factor by the second data block, to obtain a second multiplication result generated by the second scrambling circuit; and

    performing, by the second scrambling circuit, exclusive OR calculation on the first multiplication result and the second multiplication result, to obtain the data calculation result generated by the second scrambling circuit.



    [0009] With reference to the first aspect or the first possible implementation manner of the first aspect, in a second possible implementation manner of the first aspect, the performing, by the second scrambling circuit according to a second scrambling factor, feedback calculation on feedback data provided by a third scrambling circuit, to obtain a feedback calculation result generated by the second scrambling circuit includes:

    performing, by the second scrambling circuit according to a constant matrix in the second scrambling factor and a power exponent of the constant matrix, exclusive OR calculation on the feedback data provided by the third scrambling circuit, to obtain an exclusive OR result generated by the second scrambling circuit, where the power exponent is determined according to the location of the second data block in the second sub-data stream; and

    performing, by the second scrambling circuit, a shift operation on the exclusive OR result according to the location of the second data block in the second sub-data stream, to obtain the feedback calculation result generated by the second scrambling circuit.



    [0010] With reference to the first aspect, or the first or second possible implementation manner of the first aspect, in a third possible implementation manner of the first aspect, the performing, by the second scrambling circuit, data calculation on a second data block in the data stream and a first parameter according to the first scrambling factor, to obtain a data calculation result generated by the second scrambling circuit includes:

    if each data block in the data stream has n bits, the second data block is the jth data block in the data stream, and the first data block is the j-1th data block in the data stream,

    where.


    is the data calculation result generated by the second scrambling circuit, Dn,j is the second data block, Nj-1 is the first parameter, M is the first scrambling parametric value in the first scrambling factor, and F is the second scrambling parametric value in the first scrambling factor, where





    where
    Pnext is a status value of a status register in the scrambling apparatus in a next clock cycle, Pcurr is a status value of the status register in a current clock cycle, i is scrambled data corresponding to di in the data stream, and di is the ith bit in the data stream;



    and

    where
    J is an order-reversing calculation parametric value;

    the performing, by the second scrambling circuit according to a second scrambling factor, feedback calculation on feedback data provided by a third scrambling circuit, to obtain a feedback calculation result generated by the second scrambling circuit includes:

    where


    is the feedback calculation result generated by the second scrambling circuit, pre is the scrambled data generated by the third scrambling circuit, and Mj is a third scrambling parametric value in the second scrambling factor; and

    the performing, by the second scrambling circuit, exclusive OR calculation on the data calculation result generated by the second scrambling circuit and the feedback calculation result generated by the second scrambling circuit, to obtain scrambled data generated by the second scrambling circuit includes:

    where
    n,j is the scrambled data generated by the second scrambling circuit,

    is the data calculation result generated by the second scrambling circuit, and

    is the feedback calculation result generated by the second scrambling circuit.



    [0011] With reference to the first aspect, or the first or second possible implementation manner of the first aspect, in a fourth possible implementation manner of the first aspect, the performing, by the second scrambling circuit, data calculation on a second data block in the data stream and a first parameter according to the first scrambling factor, to obtain a data calculation result generated by the second scrambling circuit includes:

    if each data block in the data stream has n bits, the second data block is the jth data block in the data stream, and the first data block is the j-1th data block in the data stream,

    where


    is the data calculation result generated by the second scrambling circuit, Dn,i is a data block in the second sub-data stream, G = T-1 × F, and F is the second scrambling parametric value in the first scrambling factor;



    where
    Pnext is a status value of a status register in the scrambling apparatus in a next clock cycle, Pcurr is a status value of the status register in a current clock cycle, i is scrambled data corresponding to di in the data stream, and di is the ith bit in the data stream;






    satisfies the following relationship: t=n-m, m is an order of A,

    b = [1 0 L 0]T,





    Ta = Om×b, Ib is a bth-order unit matrix, and



    and

    where
    J is an order-reversing calculation parametric value;

    the performing, by the second scrambling circuit according to a second scrambling factor, feedback calculation on feedback data provided by a third scrambling circuit, to obtain a feedback calculation result generated by the second scrambling circuit includes:

    where




    is the feedback calculation result generated by the second scrambling circuit, pre = T-1×pre, pre is the scrambled data generated by the third scrambling circuit, and

    is a fourth scrambling parametric value in the second scrambling factor; and

    the performing, by the second scrambling circuit, exclusive OR calculation on the data calculation result generated by the second scrambling circuit and the feedback calculation result generated by the second scrambling circuit, to obtain scrambled data generated by the second scrambling circuit includes:

    where
    n,j T-1 × n,j,



    n,j is the scrambled data generated by the second scrambling circuit,

    is the data calculation result generated by the second scrambling circuit, and

    is the feedback calculation result generated by the second scrambling circuit.



    [0012] According to a second aspect, an embodiment of the present disclosure provides a scrambling apparatus, where the scrambling apparatus includes multiple scrambling circuits, and the multiple scrambling circuits include a first scrambling circuit and a second scrambling circuit, where
    the first scrambling circuit is configured to perform the following step:

    performing data calculation on a first data block according to a first scrambling factor, to obtain a data calculation result generated by the first scrambling circuit, where the first scrambling factor is a scrambling factor determined by a scrambling polynomial, the first, data block belongs to a first sub-data stream, and the first sub-data stream belongs to a data stream transmitted to the scrambling apparatus; and

    the second scrambling circuit is configured to perform the following steps:

    performing data calculation on a second data block in the data stream and a first parameter according to the first scrambling factor, to obtain a data calculation result generated by the second scrambling circuit, where the second data block is a data block that is located after the first data block and that is adjacent to the first data block in the data stream during serial transmission, the second data block belongs to a second sub-data stream, the second sub-data stream belongs to the data stream, when the second sub-data stream and the first sub-data stream are a same sub-data stream, the first parameter is the data calculation result generated by the first scrambling circuit, and when the second sub-data stream and the first sub-data stream are two different sub-data streams, the first parameter is zero;

    performing, according to a second scrambling factor, feedback calculation on feedback data provided by a third scrambling circuit, to obtain a feedback calculation result generated by the second scrambling circuit, where the third scrambling circuit is a scrambling circuit among the multiple scrambling circuits, multiple data blocks in the second sub-data stream are obtained by the multiple scrambling circuits in one clock cycle, the last data block among the multiple data blocks in the second sub-data stream is obtained by the third scrambling circuit, the last data block is the last data block that is transmitted during serial transmission of the multiple data blocks, the second scrambling factor is a scrambling factor determined by the scrambling polynomial and a location of the second data block in the second sub-data stream, and the feedback data includes data that is obtained after scrambled data generated by the third scrambling circuit is registered for one clock cycle, or the feedback data includes a result that is obtained after exclusive OR calculation is performed on a first result and a data calculation result that is generated by the third scrambling circuit, where the first result is obtained after feedback calculation is performed on feedback data that is provided by the third scrambling circuit and that is registered for one clock cycle;

    performing exclusive OR calculation on the data calculation result generated by the second scrambling circuit and the feedback calculation result generated by the second scrambling circuit, to obtain scrambled data generated by the second scrambling circuit; and

    outputting the scrambled data generated by the second scrambling circuit.



    [0013] With reference to the second aspect, in a first possible implementation manner of the second aspect, the second scrambling circuit is specifically configured to perform the following steps:

    multiplying a first scrambling parametric value in the first scrambling factor by the first parameter, to obtain a first multiplication result generated by the second scrambling circuit;

    multiplying a second scrambling parametric value in the first scrambling factor by the second data block, to obtain a second multiplication result generated by the second scrambling circuit; and

    performing exclusive OR calculation on the first multiplication result and the second multiplication result, to obtain the data calculation result generated by the second scrambling circuit.



    [0014] With reference to the second aspect or the first possible implementation manner of the second aspect, in a second possible implementation manner of the second aspect, the second scrambling circuit is specifically configured to perform the following steps:

    performing, according to a constant matrix in the second scrambling factor and a power exponent of the constant matrix, exclusive OR calculation on the feedback data provided by the third scrambling circuit, to obtain an exclusive OR result generated by the second scrambling circuit, where the power exponent is determined according to the location of the second data block in the second sub-data stream; and

    performing a shift operation on the exclusive OR result according to the location of the second data block in the second sub-data stream, to obtain the feedback calculation result generated by the second scrambling circuit.



    [0015] With reference to the second aspect, or the first or second possible implementation manner of the second aspect, in a third possible implementation manner of the second aspect, the second scrambling circuit is specifically configured to perform the following steps:

    if each data block in the data stream has n bits, the second data block is the jth data block in the data stream, and the first data block is the j-1th data block in the data stream,

    where


    is the data calculation result generated by the second scrambling circuit, Dn,j is the second data block, Nj-1 is the first parameter, M is the first scrambling parametric value in the first scrambling factor, and F is the second scrambling parametric value in the first scrambling factor, where





    where
    Pnext is a status value of a status register in the scrambling apparatus in a next clock cycle, Pcurr is a status value of the status register in a current clock cycle, i is scrambled data corresponding to di in the data stream, and di is the ith bit in the data stream;





    where
    J is an order-reversing calculation parametric value;

    where


    is the feedback calculation result generated by the second scrambling circuit, pre is the scrambled data generated by the third scrambling circuit, and Mj is a third scrambling parametric value in the second scrambling factor;

    feedback calculation is performed, in the following manner, on the feedback data generated by the third scrambling circuit:

    where


    is the feedback calculation result generated by the second scrambling circuit, pre is the scrambled data generated by the third scrambling circuit, and Mj is a third scrambling parametric value in the second scrambling factor; and

    exclusive OR calculation is performed, in the following manner, on the data calculation result generated by the second scrambling circuit and the feedback calculation result generated by the second scrambling circuit:

    where
    n,j is the scrambled data generated by the second scrambling circuit,

    is the data calculation result generated by the second scrambling circuit, and

    is the feedback calculation result generated by the second scrambling circuit.



    [0016] With reference to the second aspect, or the first or second possible implementation manner of the second aspect, in a fourth possible implementation manner of the second aspect, the second scrambling circuit is specifically configured to perform the following steps:

    if each data block in the data stream has n bits, the second data block is the jth data block in the data stream, and the first data block is the j-1th data block in the data stream,

    where


    is the data calculation result generated by the second scrambling circuit, Dn,i is a data block in the second sub-data stream, G = T-1×F, and F is the second scrambling parametric value in the first scrambling factor;



    where
    Pnext is a status value of a status register in a next clock cycle, Pcurr is a status value of the status register in a current clock cycle, i is scrambled data corresponding to di in the data stream, and di is the ith bit in the data stream;





    t satisfies the following relationship: t = n-m, m is an order of A,

    b = [1 0 L 0]T,





    Ta = Om×b, Ib is a bth-order unit matrix, and





    where
    J is an order-reversin calculation parametric value;

    where




    is the feedback calculation result generated by the second scrambling circuit, pre = T-1×pre, D̃pre is the scrambled data generated by the third scrambling circuit, and

    is a fourth scrambling parametric value in the second scrambling factor; and

    the performing, by the second scrambling circuit, exclusive OR calculation on the data calculation result generated by the second scrambling circuit and the feedback calculation result generated by the second scrambling circuit, to obtain scrambled data generated by the second scrambling circuit includes:

    where
    n,j=T-1×n,j,



    n,j is the scrambled data generated by the second scrambling circuit,

    is the data calculation result generated by the second scrambling circuit, and

    is the feedback calculation result generated by the second scrambling circuit.



    [0017] Optionally, in the first aspect, the first to fourth possible implementation manners of the first aspect, the second aspect, and the first to fourth possible implementation manners of the second aspect, different sub-data streams in the data stream may be differentiated according to different destination devices to which the sub-data streams need to be sent. All data blocks included in a same sub-data stream need to be sent to a same destination device. A sub-data stream may include one or more data blocks.

    [0018] Optionally, in the first aspect, the first to fourth possible implementation manners of the first aspect, the second aspect, and the first to fourth possible implementation manners of the second aspect, when the first scrambling circuit performs data calculation on the first data block, the first scrambling factor determined by the scrambling polynomial may refer to one or more scrambling parametric values that need to be used during the data calculation. The data calculation performed by the first scrambling circuit refers to a manner for calculating a to-be-scrambled data block (for example, the first data block). During the data calculation, the to-be-scrambled data block needs to be used, and the feedback data and the feedback calculation result do not need to be used.

    [0019] Optionally, in the first aspect, the first to fourth possible implementation manners of the first aspect, the second aspect, and the first to fourth possible implementation manners of the second aspect, when the second scrambling circuit performs data calculation on the second data block, the first scrambling factor determined by the scrambling polynomial may refer to one or more scrambling parametric values that need to be used during the data calculation. The data calculation performed by the second scrambling circuit refers to a manner for calculating a to-be-scrambled data block (for example, the second data block). During the data calculation, the to-be-scrambled data block needs to be used, and the feedback data and the feedback calculation result do not need to be used.

    [0020] Optionally, in the first aspect, the first to fourth possible implementation manners of the first aspect, the second aspect, and the first to fourth possible implementation manners of the second aspect, the adjacent first data block and second data block included in the data stream may belong to different sub-data streams, or the first data block and second data block may belong to a same sub-data stream. Whether the first data block and the second data block belong to a same sub-data stream may be specifically determined according to whether the first data block and the second data block are sent to a same destination device. A sub-data stream may include one or more data blocks.

    [0021] Optionally, in the first aspect, the first to fourth possible implementation manners of the first aspect, the second aspect, and the first to fourth possible implementation manners of the second aspect, a scrambling circuit configured to process the last data block among the multiple data blocks included in the second sub-data stream is defined as the third scrambling circuit. When the second sub-data stream includes only the second data block, the third scrambling circuit and the second scrambling circuit refer to a same scrambling circuit. The feedback data provided by the third scrambling circuit may have two implementation manners. One implementation manner is that the feedback data includes data that is obtained after scrambled data generated by the third scrambling circuit is registered for one clock cycle. The other implementation manner is that the feedback data includes a result that is obtained after exclusive OR calculation is performed on a first result and a data calculation result that is generated by the third scrambling circuit, where the first result is obtained after feedback calculation is performed on feedback data that is provided by the third scrambling circuit and that is registered for one clock cycle.

    [0022] Optionally, in the first aspect, the first to fourth possible implementation manners of the first aspect, the second aspect, and the first to fourth possible implementation manners of the second aspect, a specific form of expression of the second scrambling factor that is used for the feedback calculation and that is determined by the scrambling polynomial may be a constant matrix and a power exponent of the constant matrix. In this case, the feedback calculation may be implemented by performing, by using a power exponent of a constant matrix, exclusive OR calculation on the feedback data provided by the third scrambling circuit.

    [0023] As can be seen from the foregoing technical solutions, the embodiments of the present invention have the following advantages:
    In the foregoing technical solutions, a scrambling apparatus may scramble a data stream including a first data block and a second data block. The first data block and the second data block may belong to a same sub-data stream, or may belong to different sub-data streams. A specification of the data stream when the first data block and the second data block belong to a same sub-data stream is different from a specification of the data stream when the first data block and the second data block belong to different sub-data streams. Therefore, the scrambling apparatus can scramble data streams of different specifications. The foregoing technical solutions provided in the embodiments of the present invention expand an application scenario of a scrambling apparatus.

    BRIEF DESCRIPTION OF DRAWINGS



    [0024] 

    FIG. 1 is a schematic flowchart of a data scrambling method according to an embodiment of the present invention;

    FIG. 2 is a schematic structural diagram of a scrambling apparatus according to an embodiment of the present invention;

    FIG. 3 is a schematic diagram of a location at which scrambling processing is performed in an Ethernet interface according to an embodiment of the present invention;

    FIG. 4-a is a schematic diagram of a circuit performing scrambling processing on a data block according to an embodiment of the present invention;

    FIG. 4-b is a schematic structural diagram of a scrambling apparatus performing parallel scrambling processing on l data blocks;

    FIG. 5-a is a schematic diagram of another circuit performing scrambling processing on a data block according to an embodiment of the present invention;

    FIG. 5-b is a schematic structural diagram of another scrambling apparatus performing parallel scrambling processing on l data blocks;

    FIG. 6 is a schematic diagram of a circuit for exclusive OR calculation in power multiplication calculation according to an embodiment of the present invention;

    FIG. 7-a is a schematic diagram of another circuit performing scrambling processing on a data block according to an embodiment of the present invention;

    FIG. 7-b is a schematic structural diagram of another scrambling apparatus performing parallel scrambling processing on / data blocks; and

    FIG. 8 is a schematic structural diagram of a scrambling apparatus according to an embodiment of the present invention.


    DESCRIPTION OF EMBODIMENTS



    [0025] Embodiments of the present invention provide a data scrambling method and a scrambling apparatus, to scramble data streams of multiple different specifications, which can help expand an application scenario of a scrambling apparatus.

    [0026] To make the invention objectives, features, and advantages of the present invention clearer and more comprehensible, the following clearly describes the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Apparently, the embodiments described in the following are merely a part rather than all of the embodiments of the present invention. Persons skilled in the art can obtain other embodiments based on the embodiments provided in this application.

    [0027] In the specification, claims, and accompanying drawings of the present invention, the terms "first", "second", and so on are intended to distinguish between similar objects but do not necessarily indicate a specific order or sequence. It should be understood that the terms used in such a way are interchangeable in proper circumstances, which is merely a discrimination manner that is used when objects having a same attribute are described in the embodiments of the present invention.

    [0028] Detailed descriptions are separately provided in the following.

    [0029] In an embodiment of a data scrambling method of the present invention, the data scrambling method is executed by a scrambling apparatus, and the method may be applicable to scrambling processing performed by the scrambling apparatus on multiple data blocks in a data stream. The scrambling apparatus includes multiple scrambling circuits. The multiple scrambling circuits include a first scrambling circuit and a second scrambling circuit. Referring to FIG. 1, a data scrambling method provided in an embodiment of the present invention may include the following steps.

    [0030] 101: The first scrambling circuit performs data calculation on a first data block according to a first scrambling factor, to obtain a data calculation result generated by the first scrambling circuit.

    [0031] The first scrambling factor is a scrambling factor determined by a scrambling polynomial, the first data block belongs to a first sub-data stream, and the first sub-data stream belongs to a data stream transmitted to the scrambling apparatus.

    [0032] This embodiment of the present invention may be used in a scenario of a CDR circuit. Specifically, data received by the CDR circuit needs to have randomness. A requirement of the CDR circuit on data is that 0s and 1s in the data are balanced and a probability of appearance of successive 0s and successive Is is reduced as much as possible. After data is encoded, encoded data may be scrambled, to implement randomness of the data. For example, in a 100 Gbps Ethernet standard, after 64b/66b encoding is performed on data, encoded data needs to be scrambled. Certainly, another encoding manner may be used to encode data, which is not limited in this embodiment of the present invention.

    [0033] In this embodiment of the present invention, an encoded data stream is scrambled. The scrambling apparatus obtains the foregoing encoded data stream. The data stream includes at least one sub-data stream. Different sub-data streams in the data stream may be differentiated according to different destination devices to which the sub-data streams need to be sent. All data blocks included in a same sub-data stream need to be sent to a same destination device. A sub-data stream may include one or more data blocks. An inclusion relationship between a sub-data stream and a data block can be flexibly configured, and a quantity of sub-data streams included in a data stream can also be flexibly configured. When a quantity of data blocks included in a sub-data stream in a data stream 1 is different from a quantity of data blocks included in a sub-data stream in a data stream 2, the data stream 1 and the data stream 2 are data streams of different specifications. Alternatively, when a quantity of sub-data streams included in a data stream 1 is different from a quantity of sub-data streams included in a data stream 2, the data stream 1 and the data stream 2 are data streams of different specifications. Each data stream in this embodiment of the present invention includes multiple data blocks. Next, scrambling processing of any two adjacent data blocks (separately referred to as a first data block and a second data block) in the data stream is described.

    [0034] A sub-data stream in which the first data block is located is defined as a first sub-data stream. The first sub-data stream belongs to a data stream transmitted to the scrambling apparatus. All data blocks included in the first sub-data stream are sent to a same destination device. A sub-data stream in which the second data block is located is defined as a second sub-data stream. The second sub-data stream belongs to the data stream transmitted to the scrambling apparatus. All data blocks included in the second sub-data stream are sent to a same destination device. The first sub-data stream in which the first data block is located and the second sub-data stream in which the second data block is located may be a same sub-data stream, or the first sub-data stream in which the first data block is located and the second sub-data stream in which the second data block is located may be two different sub-data streams. In addition, that the first data block and the second data block are two adjacent data blocks refers to that locations of the first data block and the second data block in the data stream are adjacent to each other during serial transmission of the data stream, and the second data block is located after the first data block in the data stream. A time at which the second data block is transmitted is later than a time at which the first data block is transmitted. In all the following embodiments of the present invention, scrambling processing of the second data block is described in detail. Scrambling processing of other data blocks included in the data stream transmitted to the scrambling apparatus may also be implemented with reference to the scrambling processing of the second data block in this embodiment of the present invention. Scrambling processing processes of the other data blocks are all similar to a scrambling processing process of the second data block, and the scrambling processing of the other data blocks is not described in detail herein one by one.

    [0035] In this embodiment of the present invention, after the first scrambling circuit in the scrambling apparatus obtains the to-be-scrambled first data block, the first scrambling circuit obtains the first scrambling factor determined by the scrambling polynomial. The scrambling polynomial may be determined by a scramble algorithm implemented by the scrambling apparatus. A 100 Gbps Ethernet interface standard is used as an example for description. The 100 Gbps Ethernet interface standard uses self-synchronous scrambling. A scrambling polynomial defined in the Institute of Electrical and Electronics Engineers (Institute of Electrical and Electronics Engineers, IEEE) 802.3 standard is: G(x)=1+x39+x58. In step 101, when the first scrambling circuit performs data calculation on the first data block, the first scrambling factor determined by the scrambling polynomial may refer to one or more scrambling parametric values that need to be used during the data calculation. The first scrambling factor determined by the scrambling polynomial has multiple specific implementation forms, and may have different forms of expression corresponding to different values of the scrambling polynomial. In addition, both a specific form and a value result of a scrambling parametric value included in the first scrambling factor need to be implemented with reference to a specific scenario. The data calculation performed by the first scrambling circuit refers to a manner for calculating a to-be-scrambled data block (for example, the first data block). During the data calculation, the to-be-scrambled data block needs to be used, and feedback data and a feedback calculation result described in the following embodiments do not need to be used. A specific process of the data calculation and a specific value of the first scrambling factor are implemented in different manners in different application scenarios, which is not limited herein. For ease of description in the following embodiments, a result obtained after the first scrambling circuit performs data calculation in step 101 is defined as the data calculation result generated by the first scrambling circuit.

    [0036] It should be noted that, in step 101, the first scrambling circuit performs data calculation on the first data block input to the first scrambling circuit in the data stream. The data calculation described herein requires the use of the first scrambling factor. If the first data block is the first data block in the first sub-data stream (which herein refers to that the first data block is the first data block in the sub-data stream in terms of location), the first scrambling circuit can obtain, by using only the first scrambling factor, the data calculation result generated by the first scrambling circuit. If the first data block is not the first data block in the first sub-data stream, the first scrambling circuit further needs to use a data calculation result that is generated after data calculation is performed on a previous data block of the first data block. After the first scrambling circuit performs data calculation on the first data block, the first scrambling circuit further needs to transfer the data calculation result generated by the first scrambling circuit to a scrambling circuit configured to process a next data block of the first data block. After obtaining the data calculation result, the first scrambling circuit further needs to transfer the data calculation result to the scrambling circuit configured to process the next data block of the first data block, so that the data calculation result is used for data calculation performed by the scrambling circuit configured to process the next data block of the first data block. Pipeline operations are implemented between the multiple scrambling circuits in the scrambling apparatus. By means of transfer of data calculation results between the scrambling circuits, an objective of quick calculation can be achieved, so as to save logical computing resources. The first data block and the next data block of the first data block are adjacent data blocks.

    [0037] When performing data calculation, the first scrambling circuit uses the first scrambling factor determined by the scrambling polynomial. The use of the first scrambling factor by the first scrambling circuit may refer to direct use of the foregoing first scrambling factor, or the use of the first scrambling factor by the first scrambling circuit refers to use of a scrambling factor that is obtained by performing transformation according to the first scrambling factor after the first scrambling factor is determined. Specific parameter content of the first scrambling factor in this embodiment of the present invention needs to be determined with reference to a specific protocol followed by data transmission, a scramble algorithm, and a specific bandwidth standard that is involved in a transmission network, which is described in the following embodiments by using examples.

    [0038] 102: The second scrambling circuit performs data calculation on a second data block in the data stream and a first parameter according to the first scrambling factor, to obtain a data calculation result generated by the second scrambling circuit.

    [0039] The second data block is a data block that is located after the first data block and that is adjacent to the first data block in the data stream during serial transmission. The second data block belongs to a second sub-data stream, and the second sub-data stream belongs to the data stream. When the second sub-data stream and the first sub-data stream are a same sub-data stream, the first parameter is the data calculation result generated by the first scrambling circuit, and when the second sub-data stream and the first sub-data stream are two different sub-data streams, the first parameter is zero.

    [0040] In this embodiment of the present invention, among the multiple scrambling circuits included in the scrambling apparatus, the first scrambling circuit and the second scrambling circuit perform scrambling processing in parallel in a same clock cycle. The second scrambling circuit is a scrambling circuit configured to perform scrambling processing on the second data block. As can be known from the above-described relationship between the first data block and the second data block, the first data block and the second data block are two adjacent data blocks in the data stream; therefore, the first scrambling circuit and the second scrambling circuit are two adjacent scrambling circuits in the scrambling apparatus. The two scrambling circuits may be connected by using a switch. When the second sub-data stream and the first sub-data stream are a same sub-data stream, that is, the first data block and the second data block are from a same sub-data stream, the switch is turned on. The data calculation result generated by the first scrambling circuit may be transferred to the second scrambling circuit by using the switch. The first parameter used by the second scrambling circuit to perform data calculation on the second data block is the data calculation result generated by the first scrambling circuit. When the second sub-data stream and the first sub-data stream are two different sub-data streams, the switch is turned off. The second scrambling circuit does not need to use the data calculation result transferred by the first scrambling circuit. In this case, the first parameter used by the second scrambling circuit to perform data calculation on the second data block is zero.

    [0041] In this embodiment of the present invention, after the second scrambling circuit in the scrambling apparatus obtains the to-be-scrambled second data block, the second scrambling circuit obtains the first scrambling factor determined by the scrambling polynomial. The scrambling polynomial may be determined by a scramble algorithm implemented by the scrambling apparatus, for example, the scrambling polynomial may be G(x)=1+x39+x58. In step 102, when the second scrambling circuit performs data calculation on the second data block, the first scrambling factor determined by the scrambling polynomial may refer to one or more scrambling parametric values that need to be used during the data calculation. The first scrambling factor determined by the scrambling polynomial has multiple specific implementation forms, and may have different forms of expression corresponding to different values of the scrambling polynomial. In addition, both a specific form and a value result of a scrambling parametric value included in the first scrambling factor need to be implemented with reference to a specific scenario. The data calculation performed by the second scrambling circuit refers to a manner for calculating a to-be-scrambled data block (for example, the second data block). During the data calculation, the to-be-scrambled data block needs to be used, and feedback data and a feedback calculation result described in the following embodiments do not need to be used. A specific process of the data calculation and a specific value of the first scrambling factor are implemented in different specific manners in different application scenarios, which is not limited herein. For ease of description in the following embodiments, a result obtained after the second scrambling circuit performs data calculation in step 102 is defined as the data calculation result generated by the second scrambling circuit.

    [0042] In this embodiment of the present invention, the adjacent first data block and second data block included in the data stream may belong to different sub-data streams, or the first data block and second data block may belong to a same sub-data stream. Whether the first data block and the second data block belong to a same sub-data stream may be specifically determined according to whether the first data block and the second data block are sent to a same destination device. A sub-data stream may include one or more data blocks. An inclusion relationship between a sub-data stream and a data block can be flexibly configured. The data calculation performed by the second scrambling circuit on the second data block specifically includes: if the first data block and the second data block belong to a same sub-data stream, the second scrambling circuit needs to use the data calculation result generated by the first scrambling circuit; if the first data block and the second data block belong to two different sub-data streams, the second data block is the first data block in the second sub-data stream, and a value of the first parameter is zero. In this embodiment of the present invention, that the value of the first parameter is zero means that the second scrambling circuit can also complete data calculation on the second data block without using the first parameter.

    [0043] In some embodiments of the present invention, step 102, that is, the second scrambling circuit performs data calculation on a second data block in the data stream and a first parameter according to the first scrambling factor, to obtain a data calculation result generated by the second scrambling circuit may include the following steps:

    A1: The second scrambling circuit multiplies a first scrambling parametric value in the first scrambling factor by the first parameter, to obtain a first multiplication result generated by the second scrambling circuit.

    A2: The second scrambling circuit multiplies a second scrambling parametric value in the first scrambling factor by the second data block, to obtain a second multiplication result generated by the second scrambling circuit.

    A3: The second scrambling circuit performs exclusive OR calculation on the first multiplication result and the second multiplication result, to obtain the data calculation result generated by the second scrambling circuit.



    [0044] The first scrambling factor determined by the scrambling polynomial may include the first scrambling parametric value and the second scrambling parametric value. Specific implementation of the first scrambling parametric value and the second scrambling parametric value is related to a protocol followed by data transmission, a scramble algorithm, and a specific bandwidth standard that is involved in a transmission network, and may be determined according to a specific application scenario. The data calculation performed by the second scrambling circuit on the second data block may be implemented in the following manner: first calculating the first multiplication result and the second multiplication result, and then performing exclusive OR calculation on the first multiplication result and the second multiplication result, to obtain the data calculation result generated by the second scrambling circuit.

    [0045] It should be noted that, in this embodiment of the present invention, data calculation may refer to GF field calculation based on the scrambling polynomial G(x)=1+x39+x58 ; certainly, data calculation may be based on another scrambling polynomial. Values of scrambling factors corresponding to different polynomials are different. In addition, in step 102, the first scrambling factor that is determined by the scrambling polynomial and that is used by the second scrambling circuit to perform data calculation on the second data block is related to a data protocol followed by data transmission, a scramble algorithm, and a specific bandwidth standard that is involved in a transmission network, and a specific value or a specific transformation of the first scrambling factor may be determined with reference to a specific application scenario.

    [0046] 103: The second scrambling circuit performs, according to a second scrambling factor, feedback calculation on feedback data provided by a third scrambling circuit, to obtain a feedback calculation result generated by the second scrambling circuit.

    [0047] The third scrambling circuit is a scrambling circuit among the multiple scrambling circuits. Multiple data blocks in the second sub-data stream are obtained by the multiple scrambling circuits in one clock cycle. The last data block among the multiple data blocks in the second sub-data stream is obtained by the third scrambling circuit, and the last data block is the last data block that is transmitted during serial transmission of the multiple data blocks. The second scrambling factor is a scrambling factor determined by the scrambling polynomial and a location of the second data block in the second sub-data stream. The feedback data includes data that is obtained after scrambled data generated by the third scrambling circuit is registered for one clock cycle, or the feedback data includes a result that is obtained after exclusive OR calculation is performed on a first result and a data calculation result that is generated by the third scrambling circuit, where the first result is obtained after feedback calculation is performed on feedback data that is provided by the third scrambling circuit and that is registered for one clock cycle.

    [0048] In this embodiment of the present invention, the second sub-data stream in which the second data block is located may include multiple data blocks. The multiple scrambling circuits in the scrambling apparatus may respectively perform scrambling processing on the multiple data blocks included in the second sub-data stream. The multiple scrambling circuits may respectively generate multiple pieces of scrambled data. A scrambling circuit that already completes scrambling may output scrambled data. As described in step 102, the second scrambling circuit performs data calculation on the second data block, to obtain the data calculation result generated by the second scrambling circuit. Then the second scrambling circuit further needs to perform step 103, that is, the second scrambling circuit performs, according to the second scrambling factor, feedback calculation on the feedback data provided by the third scrambling circuit, to obtain the feedback calculation result generated by the second scrambling circuit. In addition to the second data block, the second sub-data stream may further include multiple data blocks. The multiple scrambling circuits in the scrambling apparatus simultaneously perform scrambling processing on all the data blocks included in the second sub-data stream. Each scrambling circuit performs scrambling processing on one data block in the second sub-data stream. After performing scrambling processing, each scrambling circuit outputs scrambled data. A scrambling circuit configured to process the last data block among the multiple data blocks included in the second sub-data stream is defined as the third scrambling circuit. When the second sub-data stream includes only the second data block, the third scrambling circuit and the second scrambling circuit refer to a same scrambling circuit. The feedback data provided by the third scrambling circuit may have two implementation manners. One implementation manner is that the feedback data includes data that is obtained after scrambled data generated by the third scrambling circuit is registered for one clock cycle. The other implementation manner is that the feedback data includes a result that is obtained after exclusive OR calculation is performed on a first result and a data calculation result that is generated by the third scrambling circuit, where the first result is obtained after feedback calculation is performed on feedback data that is provided by the third scrambling circuit and that is registered for one clock cycle.

    [0049] It should be noted that, in this embodiment of the present invention, in step 103, the feedback calculation performed on the feedback data provided by the third scrambling circuit requires the use of the second scrambling factor determined by the scrambling polynomial. When performing feedback calculation, the second scrambling circuit uses the second scrambling factor, for example, the second scrambling circuit directly uses the second scrambling factor, or uses a scrambling factor that is obtained by performing transformation according to the second scrambling factor. A specific parameter of the second scrambling factor determined by the scrambling polynomial may be determined with reference to a protocol followed by data transmission, the scrambling polynomial, and a specific bandwidth standard that is involved in a transmission network. The specific parameter of the second scrambling factor is described in the following embodiments by using examples. In addition, for the first scrambling factor determined by the scrambling polynomial and the second scrambling factor determined by the scrambling polynomial that are used for the data calculation in step 102 and the feedback calculation in step 103, respective implementation manners and specific values of the scrambling factors need to be separately set with reference to specific requirements on the data calculation and the feedback calculation. Specifically, specific values or specific transformations of the first scrambling factor and the second scrambling factor may be determined with reference to an application scenario.

    [0050] In some embodiments of the present invention, for the feedback calculation in step 103, the feedback calculation needs to be performed, by using the second scrambling factor determined by the scrambling polynomial, on the feedback data provided by the third scrambling circuit. As can be known from the description of the foregoing content, the feedback data in this embodiment may be provided by the third scrambling circuit. Step 103, that is, the second scrambling circuit performs, according to a second scrambling factor, feedback calculation on feedback data provided by a third scrambling circuit, to obtain a feedback calculation result generated by the second scrambling circuit, includes:

    B1: The second scrambling circuit performs, according to a constant matrix in the second scrambling factor and a power exponent of the constant matrix, exclusive OR calculation on the feedback data provided by the third scrambling circuit, to obtain an exclusive OR result generated by the second scrambling circuit, where the power exponent is determined according to the location of the second data block in the second sub-data stream.

    B2: The second scrambling circuit performs a shift operation on the exclusive OR result according to the location of the second data block in the second sub-data stream, to obtain the feedback calculation result generated by the second scrambling circuit.



    [0051] A specific form of expression of the second scrambling factor that is used for the feedback calculation and that is determined by the scrambling polynomial may be a constant matrix and a power exponent of the constant matrix. In this case, the feedback calculation may be implemented by performing, by using a power exponent of a constant matrix, exclusive OR calculation on the feedback data provided by the third scrambling circuit. The constant matrix is a scrambling parametric value included in the second scrambling factor determined according to a scramble algorithm (that is, the scrambling polynomial). The power exponent is determined according to the location of the second data block in the second sub-data stream. To reduce an amount of calculation in the feedback calculation in the scrambling apparatus, the feedback calculation is changed into shift calculation. That is, a shift circuit may be disposed in the scrambling apparatus, and the feedback calculation is performed, by using the shift circuit and according to the second scrambling factor determined by the scrambling polynomial, on the feedback data provided by the third scrambling circuit. In a specific application, the shift circuit needs to be disposed with reference to a specific application scenario. In addition, for the second scrambling factor that is used for the feedback calculation and that is determined by the scrambling polynomial, a specific parameter of the second scrambling factor needs to be selected or a selected parameter needs to be transformed according to a specific application scenario.

    [0052] 104: The second scrambling circuit performs exclusive OR calculation on the data calculation result generated by the second scrambling circuit and the feedback calculation result generated by the second scrambling circuit, to obtain scrambled data generated by the second scrambling circuit, and the second scrambling circuit outputs the scrambled data generated by the second scrambling circuit.

    [0053] In this embodiment of the present invention, by performing the foregoing steps 101 to 103, the scrambling apparatus may separately obtain the data calculation result generated by the second scrambling circuit and the feedback calculation result generated by the second scrambling circuit, obtain, according to the data calculation result generated by the second scrambling circuit and the feedback calculation result generated by the second scrambling circuit, the scrambled data generated by the second scrambling circuit, to complete scrambling processing of the second data block, and after scrambling is completed, output the scrambled data generated by the second scrambling circuit, to provide a choice for the feedback calculation. In addition, multi-lane distribution (Multi Lane Distribution, MLD) may be further performed on the obtained scrambled data generated by the second scrambling circuit.

    [0054] It should be noted that, in this embodiment of the present invention, the scrambling processing of the second data block includes the data calculation described in step 102 and the feedback calculation described in step 103. The scrambling processing of the second data block further includes performing, on the basis of the data calculation and the feedback calculation, exclusive OR calculation on the data calculation result generated by the second scrambling circuit and the feedback calculation result generated by the second scrambling circuit. The exclusive OR calculation refers to performing GF2 field addition.

    [0055] In some embodiments of the present invention, the foregoing step 102, that is, the second scrambling circuit performs data calculation on a second data block in the data stream and a first parameter according to the first scrambling factor, to obtain a data calculation result generated by the second scrambling circuit, may include:

    if each data block in the data stream has n bits, the second data block is the jth data block in the data stream, and the first data block is the j-1th data block in the data stream,

    where


    is the data calculation result generated by the second scrambling circuit, Dn,j is the second data block, Nj-1 is the first parameter, M is the first scrambling parametric value in the first scrambling factor, and F is the second scrambling parametric value in the first scrambling factor, where





    where
    Pnext is a status value of a status register in the scrambling apparatus in a next clock cycle, Pcurr is a status value of the status register in a current clock cycle, i is scrambled data corresponding to di in the data stream, and di is the ith bit in the data stream;



    and
    M = H×J, where
    J is an order-reversing calculation parametric value;

    step 103, that is, the second scrambling circuit performs, according to a second scrambling factor, feedback calculation on feedback data provided by a third scrambling circuit, to obtain a feedback calculation result generated by the second scrambling circuit, includes:

    where


    is the feedback calculation result generated by the second scrambling circuit, pre is the scrambled data generated by the third scrambling circuit, and Mj is a third scrambling parametric value in the second scrambling factor; and

    the performing, by the second scrambling circuit, exclusive OR calculation on the data calculation result generated by the second scrambling circuit and the feedback calculation result generated by the second scrambling circuit, to obtain scrambled data generated by the second scrambling circuit includes:

    where
    n,j is the scrambled data generated by the second scrambling circuit, D'n,j is the data calculation result generated by the second scrambling circuit, and

    is the feedback calculation result generated by the second scrambling circuit.



    [0056] In some embodiments of the present invention, step 102, that is, the second scrambling circuit performs data calculation on a second data block in the data stream and a first parameter according to the first scrambling factor, to obtain a data calculation result generated by the second scrambling circuit, includes:

    if each data block in the data stream has n bits, the second data block is the jth data block in the data stream, and the first data block is the j-1th data block in the data stream,





    is the data calculation result generated by the second scrambling circuit, Dn,i is a data block in the second sub-data stream, G = T-1×F, and F is the second scrambling parametric value in the first scrambling factor;



    where
    Pnext is a status value of a status register in the scrambling apparatus in a next clock cycle, Pcurr is a status value of the status register in a current clock cycle, di is scrambled data corresponding to di in the data stream, and di is the ith bit in the data stream;





    t satisfies the following relationship: t=n-m, m is an order of A,

    b = [1 0 L 0]T,





    Ta = Om×b, Ib is a bth-order unit matrix, and



    and

    where
    J is an order-reversing calculation parametric value;

    the performing, by the second scrambling circuit according to a second scrambling factor, feedback calculation on feedback data provided by a third scrambling circuit, to obtain a feedback calculation result generated by the second scrambling circuit includes:

    where




    is the feedback calculation result generated by the second scrambling circuit, pre = T-1×pre, D̃pre is the scrambled data generated by the third scrambling circuit, and

    is a fourth scrambling parametric value in the second scrambling factor; and

    in step 103, the performing, by the second scrambling circuit, exclusive OR calculation on the data calculation result generated by the second scrambling circuit and the feedback calculation result generated by the second scrambling circuit, to obtain scrambled data generated by the second scrambling circuit includes:

    where






    n,j is the scrambled data generated by the second scrambling circuit,

    is the data calculation result generated by the second scrambling circuit, and

    is the feedback calculation result generated by the second scrambling circuit.



    [0057] As can be known from the description of this embodiment of the present invention, a scrambling apparatus may scramble a data stream including a first data block and a second data block. The first data block and the second data block may belong to a same sub-data stream, or may belong to different sub-data streams. A specification of the data stream when the first data block and the second data block belong to a same sub-data stream is different from a specification of the data stream when the first data block and the second data block belong to different sub-data streams. Therefore, the scrambling apparatus can scramble data streams of different specifications. Therefore, the foregoing technical solution expands an application scenario of the scrambling apparatus.

    [0058] For ease of better understanding and implementation of the foregoing solution of the embodiment of the present invention, a corresponding application scenario is used in the following as a specific example for description. Next, a 100 Gbps Ethernet interface standard is used as an example for description. The 100 Gbps Ethernet interface standard uses self-synchronous scrambling. A scrambling polynomial defined in the IEEE 802.3 standard is as follows:



    [0059] Scrambling may be implemented by using a linear feedback shift register (Linear Feedback Shift Register, LFSR). FIG. 2 is a schematic structural diagram of a scrambling apparatus according to an embodiment of the present invention. S0 to S57 are status registers. To-be-scrambled serial data is added to data stored in S57 and S38, to obtain scrambled data. Then the scrambled data is stored in S0. S0 to S57 are shifted to the right. Scrambling of a bit can be implemented by means of the foregoing operation. The addition herein is modulo-2 addition, and is equivalent to performing an exclusive OR operation.

    [0060] FIG. 3 is a schematic diagram of a location at which scrambling processing is performed in an Ethernet interface according to an embodiment of the present invention. FIG. 3 may be a schematic structural diagram of a 100 Gbps Ethernet interface. The scrambling processing may be performed by a physical coding sublayer (Physical Coding Sublayer, PCS). Specifically, the scrambling processing is performed by a scrambling circuit. The scrambling processing is a step for data processing. The data processing may include the following steps. A reconciliation sublayer (Reconciliation Sublayer, RS) transmits data to the PCS through a 400 Gb media-independent interface (400 Gigabit per second Media Independent Interface, CDGMII). CD corresponds to the Roman numeral 400. As can be seen from FIG. 3, the scrambling processing occurs after 64b/66b encoding is performed on the data and before multi-lane distribution (Multi-Lane Distribution, MLD) processing is performed on the data. When data blocks in a same data stream are scrambled, encoding processing and a scrambling operation are first performed according to virtual lanes (Virtual lane, VL), and then the data blocks are distributed to physical lanes (Physical Lane, PL). In the case of flexible Ethernet, a VL may belong to different sub-data streams (that is, one or more VLs may correspond to one sub-data stream), and data of different sub-data streams (corresponding to different VLs) needs to be separately scrambled. The MLD processing may be performed by an MLD circuit. After the MLD processing is completed, the physical coding sublayer transmits the data to a physical medium attachment (Physical Medium Attachment, PMA) circuit and a physical medium dependent (Physical Media Dependent, PMD) circuit through n lanes. The PMD circuit sends processed data to a physical medium through m lanes. The physical medium transmits the processed data to a destination device. The physical medium may be implemented by using an optical module or optical fiber. The PMD circuit may be coupled to the physical medium through a medium dependent interface (Medium Dependent Interface, MDI). In addition, n and m herein are non-zero natural numbers, and specific values of n and m may be determined with reference to an application scenario.

    [0061] In the foregoing scrambling processing, a scrambling process is performing an exclusive OR operation on the 39th bit (bit) and the 58th bit of a status register to obtain a bit, and then performing an exclusive OR operation on the bit and a current bit, to generate and output scrambled data. Written as mathematical expressions, the process may be the following formulas (2) and (3):

    and

    where
    Pnext is a status of the status register in a next clock cycle, Pcurr is a status of the status register in a current clock cycle, di is unscrambled data, i is scrambled data corresponding to the unscrambled data di, and the subscript i is a reference sign of the data. For example, Pcurr may be specifically a status value of a status register among the status registers (S0∼S57) in FIG. 2.

    [0062] In the foregoing formula (2) and formula (3), A, B, and C are constants. Using the status register shown in FIG. 2 and the scrambling polynomial being the formula (1) as an example, A, B, and C may be specifically the following matrices:



    and

    where
    in the formula (4), if the matrix C is identified in such a sequence that high- order bits are on the left and low-order bits are on the right, the 57th bit (the highest-order bit) and the 38th bit are 1, and other bits are 0. In the formula (6), the last row of the matrix A is the same as the matrix C, and an upper-right corner of the matrix A is a unit matrix. In the formula (5), ""' in the matrix B represents transposition, the last bit in the matrix B is 1, and other bits in the matrix B are 0.

    [0063] If data calculation needs to be performed on n bits in parallel, it is assumed that the status register can save any status among m statuses. At a time point, the status register can save only one status. A status matrix p formed by the m statuses satisfies the following relationship:

    where
    p0, p1, and pm-1 are respectively the 1st, 2nd, ..., and mth statuses in the status register, and in the 802.3 standard, m may be 58.

    [0064] The foregoing formula (2) is iterated n times, and the following formula may be obtained:

    where
    statuses in a next clock cycle that respectively correspond to the statuses in the status matrix p form an output matrix P(n), and Dn is an unscrambled data matrix formed by n pieces of data in encoded data.

    [0065] The foregoing formula (3) is iterated n times, and the following formula may be obtained:

    where
    n is a scrambled data matrix formed by n pieces of data in scrambled data, Dn is the unscrambled data matrix formed by the n pieces of data in the encoded data, and p is the status matrix formed by the m statuses in the status register.

    [0066] In the foregoing formula (8) and formula (9), W, H, and F may be specifically the following matrices:



    and

    where
    Dn in the formulas (8) and (9) may be represented by the following formula (13):

    P(n) in the formula (8) represents a status value stored in the status register P after iteration processing of the n bits is performed. n in the formula (9) represents scrambled data of the n bits. As can be seen from the foregoing formula (8) and formula (9), the status values stored in the status register shift continuously, and a low-order status value in the status register is padded with scrambled data. Therefore, the formula (8) may be further transformed into the following formula:

    where
    the n pieces of data in the scrambled data form the scrambled data matrix n, and the output matrix P(n) in the status register may be obtained by using a calculation manner in the formula (14).

    [0067] Using the status register shown in FIG. 2 and the scrambling polynomial being the formula (1) as an example, the matrix A, the matrix B, and the matrix C are respectively substituted into the matrix W, the matrix H, and the matrix F, and the following formulas of a matrix E and a matrix J may be obtained:

    and

    or



    [0068] In the formula (15), elements on a minor diagonal of the matrix E are 1, and the other elements are all 0. In the formula (14), the matrix E raised to the power of n is left-multiplied by the matrix P, which indicates that the matrix P is shifted by n columns. The matrix J is an m×nth-order matrix. If m<n, the matrix J is represented by the formula (16); otherwise, the matrix J is represented by the formula (17).

    [0069] In 100 Gbps Ethernet, 64b/66b encoding is used, and therefore, a smallest data block has 64 bits. In this embodiment of the present invention, next, m < n , particularly a case in which n=64, is used as an example for description. Other cases may be deduced by analogy according to the data scrambling method provided in the present invention. In this case, a parallel calculation formula may be simplified into the following formula (18):

    where
    M satisfies the following formula (19):



    [0070] If a sub-data stream in Ethernet includes l data blocks, if n pieces of data form a data block and scrambling calculation is performed on the l data blocks in parallel, a value range of j in the formula (18) is 1 to l. n,j is the jth scrambled data matrix n and Dn,j is the jth unscrambled data matrix Dn. When j=1, n,j-1 represents a calculation result of the last data block in a previous clock cycle, which may be represented by pre. Scrambling calculation is performed on the l data blocks in parallel. In a case in which j>0, the formula (18) is iterated and expanded, and the following formula may be obtained:

    where
    n,j is the jth scrambled data matrix n and pre is a scrambled data matrix obtained by performing scrambling calculation on a data block in a previous clock cycle before scrambling calculation is performed in a current clock cycle.

    in the formula (20) is defined as an intermediate quantity Nj of data calculation, and therefore, the following formula (21) and formula (22) exist:

    and



    [0071] According to the formula (21) and the formula (22), the formula (20) may be transformed into the following formula (23):



    [0072] As can be known from the formula (23), scrambling calculation performed on unscrambled data (that is, the foregoing scrambling processing) may include two parts: data calculation and feedback calculation. As can be known from the formula (23), j is used to indicate a current stage, and j-1 is used to indicate a previous stage, the data calculation is classified into data calculation of the previous stage (that is, M×Nj-1) and data calculation of the current stage (that is, F×Dn,j), and the feedback calculation may be performed by using Mj×pre. FIG. 4-a is a schematic diagram of a circuit performing scrambling processing on a data block according to an embodiment of the present invention. For example, in FIG. 4-a, a second scrambling circuit performs scrambling processing on a second data block. Data calculation performed by the second scrambling circuit may include: completing data calculation by using M×Nj-1, + F × Dn,i, to obtain a data calculation result generated by the second scrambling circuit. Feedback calculation performed by the second scrambling circuit may include: completing feedback calculation by using Mj×pre, to obtain a feedback calculation result generated by the second scrambling circuit. j represents a number of a data block, k represents a number of a data block Dn,j in a sub-data stream, and Z-1 represents a unit delay. For the formula (23), in unscrambled data, n pieces of data form a data block, the jth data block is Dn,j, data output after Z-1 is a data calculation result of a current stage, and n,j is scrambled data of the current stage. A selector obtains, from multiple scrambling circuits included in a scrambling apparatus, scrambled data generated by the multiple scrambling circuits, performs selection from the scrambled data, and defines selected data as feedback data provided by a third scrambling circuit. After the feedback data provided by the third scrambling circuit is multiplied by M raised to the power of k, a feedback calculation result of the current stage is obtained. After exclusive OR calculation is performed on the data calculation result of the current stage and the feedback calculation result of the current stage, scrambled data n,j of the current stage is obtained.

    [0073] The second scrambling circuit may perform the scrambling processing shown in FIG. 4-a. First, matrix multiplication calculation (that is, calculation in GF(2)) is performed on the data Dn,j and the matrix F, and multiplication calculation is performed on a data calculation result Nj-1 in a previous clock cycle and the matrix M. Then, exclusive OR calculation (addition in the GF(2) field) is performed on results of the two types of calculation, to obtain a data calculation result Nj of a current stage. The data calculation result Nj is transferred to a next stage for use, and at the current stage, Nj is also transferred for subsequent scrambling calculation. The feedback calculation is multiplying the feedback data provided by the third scrambling circuit by the matrix M raised to the power of k to obtain a multiplication result, and then performing exclusive OR calculation on the multiplication result and the data calculation result Nj of the current stage, to obtain final scrambled data.

    [0074] FIG. 4-a describes the second scrambling circuit that performs scrambling processing on Dn,j. Next, referring to FIG. 4-b, FIG. 4-b is a schematic structural diagram of a scrambling apparatus performing parallel scrambling processing on / data blocks. Scrambling processing is performed on encoded data blocks Dn,1, Dn,2,..., and Dn,j in parallel according to a clock cycle, and data calculation results of the data block Dn,1 to the data block Dn,j-1 are transferred to a next stage. For feedback calculation, scrambled data of a stage is selected from a selector, to obtain a feedback calculation result. After exclusive OR calculation is performed on data calculation results and feedback calculation results of stages, scrambled data n,1, n,2,..., and Dn,j of the stages may be obtained.

    [0075] In the case of scrambling calculation of variable bandwidth, circuit structures of the scrambling circuits included in the foregoing scrambling apparatus may remain almost unchanged, and only the following three aspects need to be configured for applicability to data streams of other specifications. First, a switch that is used during multiplication calculation of the matrix M. If a data block processed by a scrambling circuit of a previous stage and a data block processed by a scrambling circuit of a current stage belong to a same sub-data stream, the switch needs to be turned on, that is, a data calculation result of the previous stage is allowed to be transferred to the current stage for data calculation of the current stage; if the data block processed by the scrambling circuit of the previous stage and the data block processed by the scrambling circuit of the current stage belong to two different sub-data streams, the switch needs to be turned off (that is, the data calculation result of the previous stage may be set to 0), that is, the data calculation result of the previous stage is not used for data calculation of the current stage, and the current stage is used as the first stage of the sub-data stream to which the data block processed at the current stage belongs. Second, a value of the power exponent k of the matrix M. The value of k is a number of the current stage for the sub-data stream to which the data block processed at the current stage belongs. For example, if the current stage is the first stage of the sub-data stream, the value of k is 1; if the current stage is the second stage of the sub-data stream, the value of k is 2; and the rest can be deduced by analogy. k is determined according to a location of the data block in the sub-data stream. Third, a source of the feedback data. The feedback data is a feedback calculation result of the last stage of a same sub-data stream. If the current stage is the last stage of the sub-data stream to which the data block processed at the current stage belongs, the feedback data is from scrambled data of the current stage, that is, the selector selects the scrambled data of the current stage; if the current stage is not the last stage of the sub-data stream, the feedback data is from scrambled data the subsequent last stage. The selector has a maximum of l sources, that is, the scrambled data of the current stage and scrambled data of stages after the current stage. By means of the foregoing three configurations, the scrambling apparatus is applicable to scrambling of data streams of multiple specifications, and an application scenario of the scrambling apparatus is expanded.

    [0076] It should be noted that FIG. 4-b shows an overall structure of the scrambling apparatus. The scrambling apparatus is formed by multiple scrambling circuits connected to each other. The data calculation in the foregoing scrambling processing may be performed by using a pipeline structure, that is, may be registered for multiple clock cycles, which is determined according to a specific time sequence status. The feedback calculation in the scrambling processing needs to be completed within one clock cycle.

    [0077] Next, a scrambling apparatus provided in an embodiment of the present invention is described by using another application scenario as example.

    [0078] To optimize the scrambling apparatus shown in FIG. 4-a and FIG. 4-b, a key path at which feedback calculation is performed may be optimized. A rank of the matrix M is 58, and the matrix M and the matrix A in the formula (6) have a same characteristic polynomial. Therefore, a matrix T may be constructed, to satisfy the following formula (24):



    [0079] The matrix T may be solved according to the following calculation manner:
    First, block processing is performed on the matrix An and the matrix M, to obtain the following formulas (25) and (26):

    and

    where
    t in the foregoing formula (26) satisfies the following relationship: t = n - m.

    [0080] Using the status register shown in FIG. 2 and the scrambling polynomial being formula (1) as an example, the matrix An is a 64th-order matrix obtained by extending the 58th-order matrix A, and compared with the matrix A, elements of extended rows and columns are equal to 0. The matrix M may be represented in a form of a block, for example, the formula (26). The matrix T may also be represented by a block, for example, the formula (27):

    where
    b, T, Wm, Tb, and Ta respectively satisfy the following relationships:







    and



    [0081] The matrix Ib is a bth-order unit matrix. Therefore, the matrix T may be obtained by using the foregoing formula (28) to the formula (32), and the matrix T-1 may be obtained by calculating an adjoint matrix of the matrix T. The formula (24) is substituted into the formula (20), and the following formula (33) may be obtained:



    [0082] Each variable at the two ends of the formula (33) is left-multiplied by the matrix T-1, and the following formula (34) may be obtained:

    where
    n,j, pre, and G respectively satisfy the following relationships:



    and



    [0083] As can be known from the formula (34), scrambling calculation performed on unscrambled data (that is, the foregoing scrambling processing) may include two parts: data calculation and feedback calculation. The data calculation is performed by using

    and the feedback calculation is performed by using

    FIG. 5-a is a i=1 schematic diagram of another circuit performing scrambling processing on a data block according to an embodiment of the present invention. For example, in FIG. 5-a, a second scrambling circuit performs scrambling processing on a second data block. Data calculation performed by the second scrambling circuit may include: completing data calculation by using

    to obtain a data calculation result generated by the second scrambling circuit. Feedback calculation performed by the second scrambling circuit may include: completing feedback calculation by using

    obtain a feedback calculation result generated by the second scrambling circuit, j represents a number of a data block, k represents a number of a data block Dn,j in a sub-data stream, and Z-1 represents a unit delay. A selector obtains, from multiple scrambling circuits included in a scrambling apparatus, scrambled data generated by the multiple scrambling circuits, performs selection from the scrambled data, and defines selected data as feedback data provided by a third scrambling circuit. After the feedback data provided by the third scrambling circuit is multiplied by the matrix A raised to the power of k, a feedback calculation result of a current stage is obtained. After exclusive OR calculation is performed on a data calculation result of the current stage and the feedback calculation result of the current stage, scrambled data n,j of the current stage is obtained.

    [0084] The second scrambling circuit may perform the scrambling processing shown in FIG. 5-a. After the data calculation of the current stage, the data calculation result of the current stage is output. n,j is the scrambled data of the current stage. The selector selects, from the scrambled data (that is, j) generated by the multiple scrambling circuits, the feedback data provided by the third scrambling circuit. After the feedback data is multiplied by A raised to the power of k, the feedback calculation result of the current stage is obtained. Exclusive OR calculation is performed on the data calculation result of the current stage and the feedback calculation result of the current stage, to obtain the scrambled data of the current stage. Next, referring to FIG. 5-b, FIG. 5-b is a schematic structural diagram of another scrambling apparatus performing parallel scrambling processing on l data blocks. Scrambling processing is performed on encoded data blocks Dn,2, Dn,j,..., and Dn,1 in parallel according to a clock cycle, and data calculation results of the data block Dn,1 to the data block Dn,j-1 are transferred to a next stage. For feedback calculation, scrambled data of a stage is selected from a selector, to obtain a feedback calculation result. Scrambled intermediate results 1, 2,..., and j of stages may be obtained according to data calculation results and feedback calculation results of the stages, and then the scrambled intermediate results 1, 2,..., and j of the stages are separately multiplied by the matrix T, to obtain scrambled data n,1, n,2, ..., and n,j.

    [0085] Further, because the matrix A is a sparse matrix, the matrix A raised to the power of k may be simplified. A result obtained by performing multiplication calculation on a scrambled intermediate result V and the matrix A is a shift of the scrambled intermediate result V. Referring to FIG. 6, FIG. 6 is a schematic diagram of a circuit for exclusive OR calculation in power multiplication calculation according to an embodiment of the present invention. A data stream f may be constructed, and the circuit for exclusive OR calculation shown in FIG. 6 is used. The first 58 bits of output data f is input data V. The highest-order bit of f is represented by f(57), and the rest follows a rule of progressive decreasing. Therefore, f(-1) may be represented by V(57)^V(38), f(-2) may be represented by V(56)^V(37), and the rest can be deduced until f(-39). The scrambled intermediate result V is multiplied by the matrix A raised to the power of k, and a calculation result may be represented by a shift of the f sequence. When k=0, a result is f(57:0); when k=1, a result is f(56:-1); and the rest can be deduced by analogy. Power multiplication calculation of a matrix is implemented by using the circuit for exclusive OR calculation shown in FIG. 6 plus a shift circuit.

    [0086] It should be noted that, in the foregoing embodiment, a selection circuit may be used to select the scrambled intermediate result V, a circuit for exclusive OR calculation may be used to generate f, and finally, the shift circuit may be used to complete power multiplication calculation, to obtain a feedback calculation result; and exclusive OR calculation is performed according to the feedback calculation result and a data calculation result, to complete scrambling processing.

    [0087] Next, another application scenario is used as an example for description.

    [0088] In both the scrambling circuit in FIG. 5-a and the scrambling apparatus in FIG. 5-b, the matrix An and the matrix M are used to form similar matrices, which simplifies feedback calculation compared with FIG. 4-a and FIG. 4-b. When bandwidth is relatively large, feedback calculation may be further simplified in the following manner. Because only a scrambling circuit that processes a data block of the last stage in a sub-data stream generates effective feedback data, FIG. 7-a, which is a schematic diagram of another circuit performing scrambling processing on Dn,j according to an embodiment of the present invention, may be used. Z-1 represents a unit delay, n pieces of data in unscrambled data form a data block, and the jth data block is Dn,j.

    [0089] As shown in FIG. 7-a, scrambling processing performed by a second scrambling circuit on a second data block is used an example. The second scrambling circuit first performs data calculation, to obtain a data calculation result generated by the second scrambling circuit, and transfers the data calculation result generated by the second scrambling circuit to a scrambling circuit of a next stage; performs multiplication calculation on feedback data generated by the second scrambling circuit in a previous clock cycle and the matrix A raised to the power of k, to obtain a first result generated by the second scrambling circuit; performs exclusive OR calculation on the first result generated by the second scrambling circuit and the data calculation result generated by the second scrambling circuit, to obtain feedback data generated by the second scrambling circuit; and inputs the feedback data generated by the second scrambling circuit into a selector. The selector may receive feedback data generated by multiple scrambling circuits of the scrambling apparatus. The selector outputs feedback data provided by a third scrambling circuit. Then multiplication calculation is performed on the feedback data provided by the third scrambling circuit and the matrix A raised to the power of k, to obtain a feedback calculation result generated by the second scrambling circuit. Then exclusive OR calculation is performed on the feedback calculation result generated by the second scrambling circuit and the data calculation result generated by the second scrambling circuit, to generate a scrambled intermediate result n,j. Multiplication calculation is performed on the scrambled intermediate result Vn,j and the matrix T, to obtain scrambled data n,j.

    [0090] Next, referring to FIG. 7-b, FIG. 7-b is a schematic structural diagram of another scrambling apparatus performing parallel scrambling processing on / data blocks. Scrambling processing is performed on encoded data blocks Dn,1, Dn,2,..., and Dn,j in parallel according to a clock cycle, and data calculation results of the data block Dn,1 to the data block Dn,j-1 are transferred to a next stage. For feedback calculation, scrambled data of a stage is selected from a selector, to obtain a feedback calculation result by means of calculation. Scrambled data n,1, n,2, ..., and Dn,j may be obtained according to data calculation results and feedback calculation results of stages.

    [0091] In the implementation manners in FIG. 7-a and FIG. 7-b, the feedback calculation may be divided into a selection operation of the feedback data and multiplication calculation performed on the feedback data and the matrix A raised to the power of k. Therefore, for the selection operation of the feedback data and the multiplication calculation performed on the feedback data and the matrix A raised to the power of k, a pipeline structure may be used. Between the selection operation of the feedback data and the multiplication calculation performed on the feedback data and the matrix A raised to the power of k, a register may be used for registration, to resolve a time sequence problem. Compared with the implementation manners in FIG. 5-a and FIG. 5-b, the scrambling apparatuses in FIG. 7-a and FIG. 7-b can implement simplification of feedback calculation.

    [0092] As can be known from the exemplary descriptions of FIG. 5-a, FIG. 5-b, FIG. 7-a, and FIG. 7-b, after a data block is received, an operation of multiplying the data block by the matrix G is performed, and before scrambled data is output, multiplication calculation is performed on the matrix T. Multiplication calculation performed on matrices may be implemented by a multiply-accumulator. The matrix A is a sparse matrix, and few resources are occupied for accumulation calculation after multiplication of the matrix A. If one lane requires two matrix multiplication calculations and one multiplication calculation of the matrix A raised to the power of k, 2X+Y resources are required in total. There are n lanes in total, and a total resource is R=2*n*X+n*Y. X is a resource for one m-bit matrix multiplication calculation, and Y is a resource for multiplication calculation of the power of the matrix A and feedback data. In Xilinx V7, X is a 0.1K lookup table (Look-Up-Table, LUT), and a maximum value of Y is a 1.5K LUT. When a quantity of lanes is not greater than 16, X is 0.1K. When n is 16, a required total resource≈10K LUT. In the case of scrambling of fixed bandwidth, Y and X resources are approximately of a same size, and a total resource≈5K LUT.

    [0093] As can be known from the exemplary descriptions of the present invention in the foregoing embodiments, the data scrambling method is applicable to scrambling of data blocks in data streams of multiple specifications, and multiple sub-data streams can be scrambled simultaneously. Compared with a scrambling method in the prior art, fewer resources are required, and the present invention is applicable to a relatively high clock frequency.

    [0094] It should be noted that, for the foregoing method embodiments, for ease of description, the embodiments are described as a series of action combinations. However, persons skilled in the art should know that the present invention is not limited to the described action sequence, because some steps may be performed in another sequence or simultaneously. In addition, persons skilled in the art should also know that the embodiments described in this specification are all preferred embodiments, and involved actions and modules are not necessarily essential.

    [0095] For better implementation of the foregoing solutions in the embodiments of the present invention, the following further provides a related apparatus configured to implement the foregoing solutions.

    [0096] Referring to FIG. 8, FIG. 8 is a schematic structural diagram of a scrambling apparatus 800 according to an embodiment of the present invention. The scrambling apparatus 800 may be configured to execute the method shown in FIG. 1. For specific implementation of the scrambling apparatus 800, reference may be made to the embodiment corresponding to FIG. 1. The scrambling apparatus 800 may include multiple scrambling circuits, and the multiple scrambling circuits include a first scrambling circuit 801 and a second scrambling circuit 802.

    [0097] The first scrambling circuit 801 is configured to perform the following step:
    performing data calculation on a first data block according to a first scrambling factor, to obtain a data calculation result generated by the first scrambling circuit, where the first scrambling factor is a scrambling factor determined by a scrambling polynomial, the first data block belongs to a first sub-data stream, and the first sub-data stream belongs to a data stream transmitted to the scrambling apparatus.

    [0098] The second scrambling circuit 802 is configured to perform the following steps:

    performing data calculation on a second data block in the data stream and a first parameter according to the first scrambling factor, to obtain a data calculation result generated by the second scrambling circuit, where the second data block is a data block that is located after the first data block and that is adjacent to the first data block in the data stream during serial transmission, the second data block belongs to a second sub-data stream, the second sub-data stream belongs to the data stream, when the second sub-data stream and the first sub-data stream are a same sub-data stream, the first parameter is the data calculation result generated by the first scrambling circuit, and when the second sub-data stream and the first sub-data stream are two different sub-data streams, the first parameter is zero;

    performing, according to a second scrambling factor, feedback calculation on feedback data provided by a third scrambling circuit, to obtain a feedback calculation result generated by the second scrambling circuit, where the third scrambling circuit is a scrambling circuit among the multiple scrambling circuits, multiple data blocks in the second sub-data stream are obtained by the multiple scrambling circuits in one clock cycle, the last data block among the multiple data blocks in the second sub-data stream is obtained by the third scrambling circuit, the last data block is the last data block that is transmitted during serial transmission of the multiple data blocks, the second scrambling factor is a scrambling factor determined by the scrambling polynomial and a location of the second data block in the second sub-data stream, and the feedback data includes data that is obtained after scrambled data generated by the third scrambling circuit is registered for one clock cycle, or the feedback data includes a result that is obtained after exclusive OR calculation is performed on a first result and a data calculation result that is generated by the third scrambling circuit, where the first result is obtained after feedback calculation is performed on feedback data that is provided by the third scrambling circuit and that is registered for one clock cycle;

    performing exclusive OR calculation on the data calculation result generated by the second scrambling circuit and the feedback calculation result generated by the second scrambling circuit, to obtain scrambled data generated by the second scrambling circuit; and

    outputting the scrambled data generated by the second scrambling circuit.



    [0099] In some embodiments of the present invention, the second scrambling circuit 802 is specifically configured to perform the following steps:

    multiplying a first scrambling parametric value in the first scrambling factor by the first parameter, to obtain a first multiplication result generated by the second scrambling circuit;

    multiplying a second scrambling parametric value in the first scrambling factor by the second data block, to obtain a second multiplication result generated by the second scrambling circuit; and

    performing exclusive OR calculation on the first multiplication result and the second multiplication result, to obtain the data calculation result generated by the second scrambling circuit.



    [0100] In some embodiments of the present invention, the second scrambling circuit is specifically configured to perform the following steps:

    performing, according to a constant matrix in the second scrambling factor and a power exponent of the constant matrix, exclusive OR calculation on the feedback data provided by the third scrambling circuit, to obtain an exclusive OR result generated by the second scrambling circuit, where the power exponent is determined according to the location of the second data block in the second sub-data stream; and

    performing a shift operation on the exclusive OR result according to the location of the second data block in the second sub-data stream, to obtain the feedback calculation result generated by the second scrambling circuit.



    [0101] In some embodiments of the present invention, the second scrambling circuit is specifically configured to perform the following steps:

    if each data block in the data stream has n bits, the second data block is the jth data block in the data stream, and the first data block is the j-1th data block in the data stream,

    where


    is the data calculation result generated by the second scrambling circuit, Dn,j is the second data block, Nj-1 is the first parameter, M is the first scrambling parametric value in the first scrambling factor, and F is the second scrambling parametric value in the first scrambling factor, where





    where
    Pnext is a status value of a status register in the scrambling apparatus in a next clock cycle, Pcurr is a status value of the status register in a current clock cycle, d is scrambled data corresponding to di in the data stream, and di is the ith bit in the data stream;





    where
    J is an order-reversing calculation parametric value;

    where


    is the feedback calculation result generated by the second scrambling circuit, pre is the scrambled data generated by the third scrambling circuit, and Mj is a third scrambling parametric value in the second scrambling factor;

    feedback calculation is performed, in the following manner, on the feedback data generated by the third scrambling circuit:

    where


    is the feedback calculation result generated by the second scrambling circuit, pre is the scrambled data generated by the third scrambling circuit, and Mj is a third scrambling parametric value in the second scrambling factor; and

    exclusive OR calculation is performed, in the following manner, on the data calculation result generated by the second scrambling circuit and the feedback calculation result generated by the second scrambling circuit:

    where
    n,j is the scrambled data generated by the second scrambling circuit,

    is the data calculation result generated by the second scrambling circuit, and

    is the feedback calculation result generated by the second scrambling circuit.



    [0102] In some embodiments of the present invention, the second scrambling circuit is specifically configured to perform the following steps:

    if each data block in the data stream has n bits, the second data block is the jth data block in the data stream, and the first data block is the j - 1th data block in the data stream,

    where




    is the data calculation result generated by the second scrambling circuit, Dn,i is a data block in the second sub-data stream, G = T-1 × F, and F is the second scrambling parametric value in the first scrambling factor;



    where
    Pnext is a status value of a status register in a next clock cycle, Pcurr is a status value of the status register in a current clock cycle, i is scrambled data corresponding to di in the data stream, and di is the ith bit in the data stream;





    t satisfies the following relationship: t = n - m, m is an order of A,

    b = [1 0 L 0]T,





    Ta = Om×b, Ib is a bth-order unit matrix, and





    where
    J is an order-reversing calculation parametric value;

    where




    is the feedback calculation result generated by the second scrambling circuit, pre = T-1 × pre, D̃pre is the scrambled data generated by the third scrambling circuit, and

    is a fourth scrambling parametric value in the second scrambling factor; and

    the performing, by the second scrambling circuit, exclusive OR calculation on the data calculation result generated by the second scrambling circuit and the feedback calculation result generated by the second scrambling circuit, to obtain scrambled data generated by the second scrambling circuit includes:

    where
    n,j = T-1 × Dn,j,



    n,j is the scrambled data generated by the second scrambling circuit,

    is the data calculation result generated by the second scrambling circuit, and

    is the feedback calculation result generated by the second scrambling circuit.



    [0103] As can be known from the description of this embodiment of the present invention, a scrambling apparatus may scramble a data stream including a first data block and a second data block. The first data block and the second data block may belong to a same sub-data stream, or may belong to different sub-data streams. A specification of the data stream when the first data block and the second data block belong to a same sub-data stream is different from a specification of the data stream when the first data block and the second data block belong to different sub-data streams. Therefore, the scrambling apparatus can scramble data streams of different specifications. Therefore, the foregoing technical solution expands an application scenario of the scrambling apparatus.

    [0104] In addition, it should be noted that the described apparatus embodiment is merely exemplary. The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one position, or may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the objectives of the solutions of the embodiments. In addition, in the accompanying drawings of the apparatus embodiments provided in the present invention, connection relationships between modules indicate that the modules have communication connections with each other, which may be specifically implemented as one or more communications buses or signal cables. Persons of ordinary skill in the art may understand and implement the embodiments of the present invention without creative efforts.

    [0105] Based on the foregoing descriptions of the embodiments, persons skilled in the art may clearly understand that the present invention may be implemented by hardware, by software in addition to necessary universal hardware, or certainly by dedicated hardware, including a dedicated integrated circuit, a dedicated CPU, a dedicated memory, a dedicated component and the like. Generally, any functions that can be performed by a computer program can be easily implemented by using corresponding hardware. Moreover, a specific hardware structure used to achieve a same function may be of various forms, for example, in a form of an analog circuit, a digital circuit, a dedicated circuit, or the like. However, as for the present invention, digital circuit implementation is a better implementation manner in most cases. Based on such an understanding, the technical solutions in the present invention essentially or the part contributing to the prior art may be implemented in a form related to hardware, such as an application-specific integrated circuit (ASIC, Application Specific Integrated Circuit) or a field programmable gate array (FPGA, Field Programmable Gate Array), including several hardware structure modules for enabling a computer device (which may be a personal computer, a server, a network device, or the like) to execute the methods described in the embodiments of the present invention.

    [0106] In conclusion, the foregoing embodiments are merely intended for describing the technical solutions of the present invention but not for limiting the present invention. Although the present invention is described in detail with reference to the foregoing embodiments, persons of ordinary skill in the art should understand that they may still make modifications to the technical solutions described in the foregoing embodiments.


    Claims

    1. A data scrambling method, wherein the method is executed by a scrambling apparatus (800), the scrambling apparatus (800) comprises multiple scrambling circuits, the multiple scrambling circuits comprise a first scrambling circuit (801) and a second scrambling circuit (802), and the method comprises:

    performing (101), by the first scrambling circuit (801), data calculation on a first data block according to a first scrambling factor, to obtain a data calculation result generated by the first scrambling circuit (801), wherein the first scrambling factor is a scrambling factor determined by a scrambling polynomial, the first data block belongs to a first sub-data stream, and the first sub-data stream belongs to a data stream transmitted to the scrambling apparatus (800);

    performing (102), by the second scrambling circuit (802), data calculation on a second data block in the data stream and a first parameter according to the first scrambling factor, to obtain a data calculation result generated by the second scrambling circuit (802), wherein the second data block is a data block that is located after the first data block and that is adjacent to the first data block in the data stream during serial transmission, the second data block belongs to a second sub-data stream, the second sub-data stream belongs to the data stream, when the second sub-data stream and the first sub-data stream are a same sub-data stream, the first parameter is the data calculation result generated by the first scrambling circuit (801), and when the second sub-data stream and the first sub-data stream are two different sub-data streams, the first parameter is zero;

    performing (103), by the second scrambling circuit (802) according to a second scrambling factor, feedback calculation on feedback data provided by a third scrambling circuit, to obtain a feedback calculation result generated by the second scrambling circuit (802), wherein the third scrambling circuit is a scrambling circuit among the multiple scrambling circuits, multiple data blocks in the second sub-data stream are obtained by the multiple scrambling circuits in one clock cycle, a last data block among the multiple data blocks in the second sub-data stream is obtained by the third scrambling circuit, the last data block is the data block that is transmitted last during serial transmission of the multiple data blocks, the second scrambling factor is a scrambling factor determined by the scrambling polynomial and a location of the second data block in the second sub-data stream, and the feedback data comprises data that is obtained after scrambled data generated by the third scrambling circuit in a previous clock cycle has been delayed for one clock cycle, or the feedback data comprises a result that is obtained after exclusive OR calculation is performed on a first result and a data calculation result that is generated by the third scrambling circuit, wherein the first result is obtained after feedback calculation is performed on feedback data that is provided by the third scrambling circuit in a previous clock cycle and that has been delayed for one clock cycle; and

    performing (104), by the second scrambling circuit (802), exclusive OR calculation on the data calculation result generated by the second scrambling circuit (802) and the feedback calculation result generated by the second scrambling circuit (802), to obtain scrambled data generated by the second scrambling circuit (802), and outputting, by the second scrambling circuit (802), the scrambled data generated by the second scrambling circuit (802).


     
    2. The method according to claim 1, wherein the performing (102), by the second scrambling circuit, (802) data calculation on a second data block in the data stream and a first parameter according to the first scrambling factor, to obtain a data calculation result generated by the second scrambling circuit (802) comprises:

    multiplying, by the second scrambling circuit (802), a first scrambling parametric value in the first scrambling factor by the first parameter, to obtain a first multiplication result generated by the second scrambling circuit (802);

    multiplying, by the second scrambling circuit (802), a second scrambling parametric value in the first scrambling factor by the second data block, to obtain a second multiplication result generated by the second scrambling circuit (802); and

    performing, by the second scrambling circuit (802), exclusive OR calculation on the first multiplication result and the second multiplication result, to obtain the data calculation result generated by the second scrambling circuit (802).


     
    3. The method according to claim 2, wherein the performing (102), by the second scrambling circuit (802), data calculation on a second data block in the data stream and a first parameter according to the first scrambling factor, to obtain a data calculation result generated by the second scrambling circuit (802) comprises:

    if each data block in the data stream has n bits, the second data block is the jth data block in the data stream, and the first data block is the j - 1th data block in the data stream,

    wherein


    is the data calculation result generated by the second scrambling circuit (802), Dn,j is the second data block, Nj-1 is the first parameter, M is the first scrambling parametric value in the first scrambling factor, and F is the second scrambling parametric value in the first scrambling factor, wherein





    wherein
    Pnext is a status value of a status register in the scrambling apparatus (800) in a next clock cycle, Pcurr is a status value of the status register in a current clock cycle, i is scrambled data corresponding to di in the data stream, and di is the ith bit in the data stream;



    and

    wherein
    J is an order-reversing calculation parametric value;

    the performing, by the second scrambling circuit (802) according to a second scrambling factor, feedback calculation on feedback data provided by a third scrambling circuit, to obtain a feedback calculation result generated by the second scrambling circuit (802) comprises:

    wherein


    is the feedback calculation result generated by the second scrambling circuit (802), pre is the scrambled data generated by the third scrambling circuit, and Mj is a third scrambling parametric value in the second scrambling factor; and

    the performing, by the second scrambling circuit (802), exclusive OR calculation on the data calculation result generated by the second scrambling circuit (802) and the feedback calculation result generated by the second scrambling circuit (802), to obtain scrambled data generated by the second scrambling circuit (802) comprises:

    wherein
    n,j is the scrambled data generated by the second scrambling circuit (802),

    is the data calculation result generated by the second scrambling circuit (802), and

    is the feedback calculation result generated by the second scrambling circuit (802).


     
    4. The method according to claim 2, wherein the performing (102), by the second scrambling circuit (802), data calculation on a second data block in the data stream and a first parameter according to the first scrambling factor, to obtain a data calculation result generated by the second scrambling circuit (802) comprises:

    if each data block in the data stream has n bits, the second data block is the jth data block in the data stream, and the first data block is the j - 1th data block in the data stream,

    wherein




    is the data calculation result generated by the second scrambling circuit (802), Dn,i is a data block in the second sub-data stream, G = T-1 × F, and F is the second scrambling parametric value in the first scrambling factor;



    wherein
    Pnext is a status value of a status register in the scrambling apparatus (800) in a next clock cycle, Pcurr is a status value of the status register in a current clock cycle, i is scrambled data corresponding to di in the data stream, and di is the ith bit in the data stream;





    t satisfies the following relationship: t = n - m, m is an order of A,

    b = [1 0 ··· 0]T,





    Ta = Om×b, Ib is a bth-order unit matrix, and



    and

    wherein
    J is an order-reversing calculation parametric value;

    the performing (103), by the second scrambling circuit (802) according to a second scrambling factor, feedback calculation on feedback data provided by a third scrambling circuit, to obtain a feedback calculation result generated by the second scrambling circuit (802) comprises:

    wherein




    is the feedback calculation result generated by the second scrambling circuit (802), pre = T-1 × pre, D̃pre is the scrambled data generated by the third scrambling circuit, and

    is a fourth scrambling parametric value in the second scrambling factor; and

    the performing (104), by the second scrambling circuit (802), exclusive OR calculation on the data calculation result generated by the second scrambling circuit (802) and the feedback calculation result generated by the second scrambling circuit (802), to obtain scrambled data generated by the second scrambling circuit (802) comprises:

    wherein
    n,j = T-1 × n,j,



    n,j is the scrambled data generated by the second scrambling circuit (802),

    is the data calculation result generated by the second scrambling circuit (802), and

    is the feedback calculation result generated by the second scrambling circuit (802).


     
    5. The method according to any one of claims 1 to 4, wherein the performing (103), by the second scrambling circuit (802) according to a second scrambling factor, feedback calculation on feedback data provided by a third scrambling circuit, to obtain a feedback calculation result generated by the second scrambling circuit (802) comprises:

    performing, by the second scrambling circuit (802) according to a constant matrix in the second scrambling factor and a power exponent of the constant matrix, exclusive OR calculation on the feedback data provided by the third scrambling circuit, to obtain an exclusive OR result generated by the second scrambling circuit (802), wherein the power exponent is determined according to the location of the second data block in the second sub-data stream; and

    performing, by the second scrambling circuit (802), a shift operation on the exclusive OR result according to the location of the second data block in the second sub-data stream, to obtain the feedback calculation result generated by the second scrambling circuit (802).


     
    6. A scrambling apparatus (800), wherein the scrambling apparatus (800) comprises multiple scrambling circuits, and the multiple scrambling circuits comprise a first scrambling circuit (801) and a second scrambling circuit (802), wherein
    the first scrambling circuit (801) is configured to perform the following step:

    performing (101) data calculation on a first data block according to a first scrambling factor, to obtain a data calculation result generated by the first scrambling circuit (801), wherein the first scrambling factor is a scrambling factor determined by a scrambling polynomial, the first data block belongs to a first sub-data stream, and the first sub-data stream belongs to a data stream transmitted to the scrambling apparatus (800); and

    the second scrambling circuit (802) is configured to perform the following steps:

    performing (102) data calculation on a second data block in the data stream and a first parameter according to the first scrambling factor, to obtain a data calculation result generated by the second scrambling circuit (802), wherein the second data block is a data block that is located after the first data block and that is adjacent to the first data block in the data stream during serial transmission, the second data block belongs to a second sub-data stream, the second sub-data stream belongs to the data stream, when the second sub-data stream and the first sub-data stream are a same sub-data stream, the first parameter is the data calculation result generated by the first scrambling circuit (801), and when the second sub-data stream and the first sub-data stream are two different sub-data streams, the first parameter is zero;

    performing (103), according to a second scrambling factor, feedback calculation on feedback data provided by a third scrambling circuit, to obtain a feedback calculation result generated by the second scrambling circuit (802), wherein the third scrambling circuit is a scrambling circuit among the multiple scrambling circuits, multiple data blocks in the second sub-data stream are obtained by the multiple scrambling circuits in one clock cycle, a last data block among the multiple data blocks in the second sub-data stream is obtained by the third scrambling circuit, the last data block is the data block that is transmitted last during serial transmission of the multiple data blocks, the second scrambling factor is a scrambling factor determined by the scrambling polynomial and a location of the second data block in the second sub-data stream, and the feedback data comprises data that is obtained after scrambled data generated by the third scrambling circuit in a previous clock cycle has been delayed for one clock cycle, or the feedback data comprises a result that is obtained after exclusive OR calculation is performed on a first result and a data calculation result that is generated by the third scrambling circuit, wherein the first result is obtained after feedback calculation is performed on feedback data that is provided by the third scrambling circuit in a previous clock cycle and that has been delayed for one clock cycle;

    performing (104) exclusive OR calculation on the data calculation result generated by the second scrambling circuit (802) and the feedback calculation result generated by the second scrambling circuit (802), to obtain scrambled data generated by the second scrambling circuit (802); and

    outputting the scrambled data generated by the second scrambling circuit (802).


     
    7. The scrambling apparatus (800) according to claim 6, wherein the second scrambling circuit (802) is specifically configured to perform the following steps:

    multiplying a first scrambling parametric value in the first scrambling factor by the first parameter, to obtain a first multiplication result generated by the second scrambling circuit (802);

    multiplying a second scrambling parametric value in the first scrambling factor by the second data block, to obtain a second multiplication result generated by the second scrambling circuit (802); and

    performing exclusive OR calculation on the first multiplication result and the second multiplication result, to obtain the data calculation result generated by the second scrambling circuit (802).


     
    8. The scrambling apparatus (800) according to claim 7, wherein
    if each data block in the data stream has n bits, the second data block is the jth data block in the data stream, and the first data block is the j - 1th data block in the data stream,

    wherein


    is the data calculation result generated by the second scrambling circuit (802), Dn,j is the second data block, Nj-1 is the first parameter, M is the first scrambling parametric value in the first scrambling factor, and F is the second scrambling parametric value in the first scrambling factor, wherein





    wherein
    Pnext is a status value of a status register in the scrambling apparatus (800) in a next clock cycle, Pcurr is a status value of the status register in a current clock cycle, i is scrambled data corresponding to di in the data stream, and di is the ith bit in the data stream;





    wherein
    J is an order-reversing calculation parametric value;
    feedback calculation is performed, in the following manner, on the feedback data generated by the third scrambling circuit:

    wherein


    is the feedback calculation result generated by the second scrambling circuit (802), pre is the scrambled data generated by the third scrambling circuit, and Mj is a third scrambling parametric value in the second scrambling factor; and
    exclusive OR calculation is performed, in the following manner, on the data calculation result generated by the second scrambling circuit (802) and the feedback calculation result generated by the second scrambling circuit (802):

    wherein
    n,j is the scrambled data generated by the second scrambling circuit (802),

    is the data calculation result generated by the second scrambling circuit (802), and

    is the feedback calculation result generated by the second scrambling circuit (802).
     
    9. The scrambling apparatus (800) according to claim 7, wherein the second scrambling circuit (802) is specifically configured to perform the following steps:

    if each data block in the data stream has n bits, the second data block is the jth data block in the data stream, and the first data block is the j - 1th data block in the data stream,

    wherein




    is the data calculation result generated by the second scrambling circuit (802), Dn,i is a data block in the second sub-data stream, G = T-1 × F, and F is the second scrambling parametric value in the first scrambling factor;



    wherein
    Pnext is a status value of a status register in a next clock cycle, Pcurr is a status value of the status register in a current clock cycle, i is scrambled data corresponding to di in the data stream, and di is the ith bit in the data stream;






    t satisfies the following relationship: t = n - m , m is an order of A,

    b = [1 0 ··· 0]T,





    Ta = Om×b, Ib is a bth-order unit matrix, and





    wherein
    J is an order-reversing calculation parametric value;

    wherein




    is the feedback calculation result generated by the second scrambling circuit (802), pre = T-1 × pre, D̃pre is the scrambled data generated by the third scrambling circuit, and

    is a fourth scrambling parametric value in the second scrambling factor; and

    the performing (104), by the second scrambling circuit (802), exclusive OR calculation on the data calculation result generated by the second scrambling circuit (802) and the feedback calculation result generated by the second scrambling circuit (802), to obtain scrambled data generated by the second scrambling circuit (802) comprises:

    wherein
    n,j = T-1 × n,j,



    n,j is the scrambled data generated by the second scrambling circuit (802),

    is the data calculation result generated by the second scrambling circuit (802), and

    is the feedback calculation result generated by the second scrambling circuit (802).


     
    10. The scrambling apparatus (800) according to any one of claims 6 to 9, wherein the second scrambling circuit (802) is specifically configured to perform the following steps:

    performing, according to a constant matrix in the second scrambling factor and a power exponent of the constant matrix, exclusive OR calculation on the feedback data provided by the third scrambling circuit, to obtain an exclusive OR result generated by the second scrambling circuit (802), wherein the power exponent is determined according to the location of the second data block in the second sub-data stream; and

    performing a shift operation on the exclusive OR result according to the location of the second data block in the second sub-data stream, to obtain the feedback calculation result generated by the second scrambling circuit (802).


     


    Ansprüche

    1. Datenverschlüsselungsverfahren, wobei das Verfahren von einer Verschlüsselungsvorrichtung (800) ausgeführt wird, wobei die Verschlüsselungsvorrichtung (800) mehrere Verschlüsselungsschaltkreise umfasst, wobei die mehreren Verschlüsselungsschaltkreise einen ersten Verschlüsselungsschaltkreis (801) und einen zweiten Verschlüsselungsschaltkreis (802) umfassen, und wobei das Verfahren umfasst:

    Ausführen (101), durch den ersten Verschlüsselungsschaltkreis (801), einer Datenberechnung an einem ersten Datenblock gemäß einem ersten Verschlüsselungsfaktor, um ein Datenberechnungsergebnis zu erhalten, das von dem ersten Verschlüsselungsschaltkreis (801) erzeugt wird, wobei der erste Verschlüsselungsfaktor ein Verschlüsselungsfaktor ist, der durch ein Verschlüsselungspolynom ermittelt wird, wobei der erste Datenblock zu einem ersten Teildatenstrom gehört, und wobei der erste Teildatenstrom zu einem Datenstrom gehört, der an die Verschlüsselungsvorrichtung (800) gesendet wird;

    Ausführen (102), durch den zweiten Verschlüsselungsschaltkreis (802), einer Datenberechnung an einem zweiten Datenblock in dem Datenstrom und an einem ersten Parameter gemäß dem ersten Verschlüsselungsfaktor, um ein Datenberechnungsergebnis zu erhalten, das von dem zweiten Verschlüsselungsschaltkreis (802) erzeugt wird, wobei der zweite Datenblock ein Datenblock ist, der hinter dem ersten Datenblock angeordnet ist und der sich während einer seriellen Übertragung in der Nähe des ersten Datenblocks in dem Datenstrom befindet, wobei der zweite Datenblock zu einem zweiten Teildatenstrom gehört, wobei der zweite Teildatenstrom zu dem Datenstrom gehört, wobei, wenn der zweite Teildatenstrom und der erste Teildatenstrom ein gleicher Teildatenstrom sind, der erste Parameter das Datenberechnungsergebnis ist, das durch den ersten Verschlüsselungsschaltkreis (801) erzeugt wird, und wenn der zweite Teildatenstrom und der erste Teildatenstrom zwei unterschiedliche Teildatenströme sind, der erste Parameter Null ist;

    Ausführen (103), durch den zweiten Verschlüsselungsschaltkreis (802), gemäß einem zweiten Verschlüsselungsfaktor, einer Rückmeldungsberechnung an Rückmeldungsdaten, die von einem dritten Verschlüsselungsschaltkreis bereitgestellt werden, um ein Rückmeldungsberechnungsergebnis zu erhalten, das von dem zweiten Verschlüsselungsschaltkreis (802) erzeugt wird, wobei der dritte Verschlüsselungsschaltkreis ein Verschlüsselungsschaltkreis aus den mehreren Verschlüsselungsschaltkreisen ist, wobei in einem Taktzyklus mehrere Datenblöcke in dem zweiten Teildatenstrom durch die mehreren Verschlüsselungsschaltkreise erhalten werden, wobei ein letzter Datenblock von den mehreren Datenblöcken in dem zweiten Teildatenstrom durch den dritten Verschlüsselungsschaltkreis erhalten werden, wobei der letzte Datenblock der Datenblock ist, der als letzter während der seriellen Übertragung der mehreren Datenblöcke gesendet wird, wobei der zweite Verschlüsselungsfaktor ein Verschlüsselungsfaktor ist, der mithilfe des Verschlüsselungspolynoms und eines Orts des zweiten Datenblocks in dem zweiten Teildatenstrom ermittelt wird, und wobei die Rückmeldungsdaten Daten umfassen, die erhalten werden, nachdem verschlüsselte Daten, die durch den dritten Verschlüsselungsschaltkreis in einem vorherigen Taktzyklus erzeugt wurden, um einen Taktzyklus verzögert wurden, oder wobei die Rückmeldungsdaten ein Ergebnis umfassen, das erhalten wird, nachdem eine Exklusiv-Oder-Berechnung an einem ersten Ergebnis ausgeführt wurde, und ein Datenberechnungsergebnis umfassen, das durch den dritten Verschlüsselungsschaltkreis erzeugt wird, wobei das erste Ergebnis erhalten wird, nachdem die Rückmeldungsberechnung an Rückmeldungsdaten ausgeführt wird, die durch den dritten Verschlüsselungsschaltkreis in einem vorherigen Taktzyklus bereitgestellt wurden und die um einen Taktzyklus verzögert wurden; und

    Ausführen (104), durch den zweiten Verschlüsselungsschaltkreis (802), einer Exklusiv-Oder-Berechnung an dem Datenberechnungsergebnis, das durch den zweiten Verschlüsselungsschaltkreis (802) erzeugt wird, und an dem Rückmeldungsberechnungsergebnis, das durch den zweiten Verschlüsselungsschaltkreis (802) erzeugt wird, um verschlüsselte Daten zu erhalten, die durch den zweiten Verschlüsselungsschaltkreis (802) erzeugt werden, und Ausgeben, durch den zweiten Verschlüsselungsschaltkreis (802), der verschlüsselten Daten, die durch den zweiten Verschlüsselungsschaltkreis (802) erzeugt werden.


     
    2. Verfahren nach Anspruch 1, wobei das Ausführen (102), durch den zweiten Verschlüsselungsschaltkreis (802), einer Datenberechnung an einem zweiten Datenblock in dem Datenstrom und eines ersten Parameters gemäß dem ersten Verschlüsselungsfaktor, um ein Datenberechnungsergebnis zu erhalten, das von dem zweiten Verschlüsselungsschaltkreis (802) erzeugt wird, umfasst:

    Multiplizieren, durch den zweiten Verschlüsselungsschaltkreis (802), eines ersten Verschlüsselungsparameterwerts in dem ersten Verschlüsselungsfaktor mit dem ersten Parameter, um ein erstes Multiplikationsergebnis zu erhalten, das von dem zweiten Verschlüsselungsschaltkreis (802) erzeugt wird;

    Multiplizieren, durch den zweiten Verschlüsselungsschaltkreis (802), eines zweiten Verschlüsselungsparameterwerts in dem ersten Verschlüsselungsfaktor mit dem zweiten Datenblock, um ein zweites Multiplikationsergebnis zu erhalten, das von dem zweiten Verschlüsselungsschaltkreis (802) erzeugt wird; und

    Ausführen, durch den zweiten Verschlüsselungsschaltkreis (802), einer Exklusiv-Oder-Berechnung an dem ersten Multiplikationsergebnis und an dem zweiten Multiplikationsergebnis, um das Datenberechnungsergebnis zu erhalten, das von dem zweiten Verschlüsselungsschaltkreis (802) erzeugt wird.


     
    3. Verfahren nach Anspruch 2, wobei das Ausführen (102), durch den zweiten Verschlüsselungsschaltkreis (802), einer Datenberechnung an einem zweiten Datenblock in dem Datenstrom und an einem ersten Parameter gemäß dem ersten Verschlüsselungsfaktor, um ein Datenberechnungsergebnis zu erhalten, das von dem zweiten Verschlüsselungsschaltkreis (802) erzeugt wird, umfasst:

    wenn jeder Datenblock in dem Datenstrom n Bits aufweist, der zweite Datenblock der j-te Datenblock in dem Datenstrom ist, und der erste Datenblock der (j-1)-te Datenblock in dem Datenstrom ist,

    ist, wobei:
    D'n,j das Datenberechnungsergebnis ist, das von dem zweiten Verschlüsselungsschaltkreis (802) erzeugt wird, Dn,j der zweite Datenblock ist, Nj-1 der erste Parameter ist, M der erste Verschlüsselungsparameterwert in dem ersten Verschlüsselungsfaktor ist, und F der zweite Verschlüsselungsparameterwert in dem ersten Verschlüsselungsfaktor ist, und wobei:





    ist, wobei:
    Pnext ein Zustandswert eines Zustandsregisters in der Verschlüsselungsvorrichtung (800) in einem nächsten Taktzyklus ist, Pcurr ein Zustandswert eines Zustandsregisters in einem aktuellen Taktzyklus ist, i verschlüsselte Daten sind, die di in dem Datenstrom entsprechen, und di das i-te Bit in dem Datenstrom ist;



    und

    ist, wobei:
    J ein ordungsumkehrender Berechnungsparameterwert ist;

    wobei das Ausführen, durch den zweiten Verschlüsselungsschaltkreis (802), gemäß einem zweiten Verschlüsselungsfaktor, einer Rückmeldungsberechnung an den Rückmeldungsdaten, die von einem dritten Verschlüsselungsschaltkreis bereitgestellt werden, um ein Rückmeldungsberechnungsergebnis zu erhalten, das von dem zweiten Verschlüsselungsschaltkreis (802) erzeugt wird, umfasst:

    wobei:


    das Rückmeldungsberechnungsergebnis ist, das von dem zweiten Verschlüsselungsschaltkreis (802) erzeugt wird, pre die verschlüsselten Daten sind, die von dem dritten Verschlüsselungsschaltkreis erzeugt werden, und Mj ein dritter Verschlüsselungsparameterwert in dem zweiten Verschlüsselungsfaktor ist; und

    wobei das Ausführen, durch den zweiten Verschlüsselungsschaltkreis (802), einer Exklusiv-Oder-Berechnung an dem Datenberechnungsergebnis, das durch den zweiten Verschlüsselungsschaltkreis (802) erzeugt wird, und an dem Rückmeldungsberechnungsergebnis, das durch den zweiten Verschlüsselungsschaltkreis (802) erzeugt wird, um verschlüsselte Daten zu erhalten, die durch den zweiten Verschlüsselungsschaltkreis (802) erzeugt werden, umfasst:

    n,j wobei:
    n,j die verschlüsselten Daten sind, die von dem zweiten Verschlüsselungsschaltkreis (802) erzeugt werden,

    das Datenberechnungsergebnis ist, das von dem zweiten Verschlüsselungsschaltkreis (802) erzeugt wird, und

    das Rückmeldungsberechnungsergebnis ist, das von dem zweiten Verschlüsselungsschaltkreis (802) erzeugt wird.


     
    4. Verfahren nach Anspruch 2, wobei das Ausführen (102), durch den zweiten Verschlüsselungsschaltkreis (802), einer Datenberechnung an einem zweiten Datenblock in dem Datenstrom und an einem ersten Parameter gemäß dem ersten Verschlüsselungsfaktor, um ein Datenberechnungsergebnis zu erhalten, das von dem zweiten Verschlüsselungsschaltkreis (802) erzeugt wird, umfasst:

    wenn jeder Datenblock in dem Datenstrom n Bits aufweist, der zweite Datenblock der j-te Datenblock in dem Datenstrom ist, und der erste Datenblock der (j-1)-te Datenblock in dem Datenstrom ist, und

    wobei:


    ist,

    das Datenberechnungsergebnis ist, das von dem zweiten Verschlüsselungsschaltkreis (802) erzeugt wird, Dn,i ein Datenblock in dem zweiten Teildatenstrom ist, G = T-1 × F ist, und F der zweite Verschlüsselungsparameterwert in dem ersten Verschlüsselungsfaktor ist;



    wobei:
    Pnext ein Zustandswert eines Zustandsregisters in der Verschlüsselungsvorrichtung (800) in einem nächsten Taktzyklus ist, Pcurr ein Zustandswert des Zustandsregisters in einem aktuellen Taktzyklus ist, i verschlüsselte Daten sind, die di in dem Datenstrom entsprechen, und di das i-te Bit in dem Datenstrom ist;





    t die folgende Beziehung erfüllt: t = n - m, wobei m eine Ordnung von A ist,

    b = [1 0 ··· 0]T, Tm =





    Ta = Om×b, Ib eine Einheitsmatrix b-ter Ordnung ist, und



    und

    ist, wobei:
    J ein ordungsumkehrender Berechnungsparameterwert ist;

    wobei das Ausführen (103), durch den zweiten Verschlüsselungsschaltkreis (802), gemäß einem zweiten Verschlüsselungsfaktor, einer Rückmeldungsberechnung an den Rückmeldungsdaten, die von einem dritten Verschlüsselungsschaltkreis bereitgestellt werden, um ein Rückmeldungsberechnungsergebnis zu erhalten, das von dem zweiten Verschlüsselungsschaltkreis (802) erzeugt wird, umfasst:

    wobei:


    ist,

    das Rückmeldungsberechnungsergebnis ist, das von dem zweiten Verschlüsselungsschaltkreis (802) erzeugt wird, pre = T-1 × pre ist, pre die verschlüsselten Daten sind, die von dem dritten Verschlüsselungsschaltkreis erzeugt werden, und

    ein vierter Verschlüsselungsparameterwert in dem zweiten Verschlüsselungsfaktor ist; und

    wobei das Ausführen (104), durch den zweiten Verschlüsselungsschaltkreis (802), einer Exklusiv-Oder-Berechnung an dem Datenberechnungsergebnis, das durch den zweiten Verschlüsselungsschaltkreis (802) erzeugt wird, und an dem Rückmeldungsberechnungsergebnis, das durch den zweiten Verschlüsselungsschaltkreis (802) erzeugt wird, um verschlüsselte Daten zu erhalten, die durch den zweiten Verschlüsselungsschaltkreis (802) erzeugt werden, umfasst:

    wobei:
    n,j = T-1 × n,j,





    n,j die verschlüsselten Daten sind, die von dem zweiten Verschlüsselungsschaltkreis (802) erzeugt werden,

    das Datenberechnungsergebnis ist, das von dem zweiten Verschlüsselungsschaltkreis (802) erzeugt wird, und

    das Rückmeldungsberechnungsergebnis ist, das von dem zweiten Verschlüsselungsschaltkreis (802) erzeugt wird.


     
    5. Verfahren nach einem der Ansprüche 1 bis 4, wobei das Ausrühren (103), durch den zweiten Verschlüsselungsschaltkreis (802), gemäß einem zweiten Verschlüsselungsfaktor, einer Rückmeldungsberechnung an den Rückmeldungsdaten, die von einem dritten Verschlüsselungsschaltkreis bereitgestellt werden, um ein Rückmeldungsberechnungsergebnis zu erhalten, das von dem zweiten Verschlüsselungsschaltkreis (802) erzeugt wird, umfasst:
    Ausführen, durch den zweiten Verschlüsselungsschaltkreis (802) gemäß einer konstanten Matrix in dem zweiten Verschlüsselungsfaktor und einem Potenzexponenten der konstanten Matrix, einer Exklusiv-Oder-Berechnung an den Rückmeldungsdaten, die von dem dritten Verschlüsselungsschaltkreis bereitgestellt werden, um ein Exklusiv-Oder-Ergebnis zu erhalten, das von dem zweiten Verschlüsselungsschaltkreis (802) erzeugt wird, wobei der Potenzexponent gemäß dem Ort des zweiten Datenblocks in dem zweiten Teildatenstrom ermittelt wird, und Ausführen, durch den zweiten Verschlüsselungsschaltkreis (802), einer Verschiebungsoperation an dem Exklusiv-Oder-Ergebnis gemäß dem Ort des zweiten Datenblocks in dem zweiten Teildatenstrom, um das Rückmeldungsberechnungsergebnis zu erhalten, das von dem zweiten Verschlüsselungsschaltkreis (802) erzeugt wird.
     
    6. Verschlüsselungsvorrichtung (800), wobei die Verschlüsselungsvorrichtung (800) mehrere Verschlüsselungsschaltkreise umfasst, und wobei die mehreren Verschlüsselungsschaltkreise einen ersten Verschlüsselungsschaltkreis (801) und einen zweiten Verschlüsselungsschaltkreis (802) umfassen, wobei:
    der erste Verschlüsselungsschaltkreis (801) konfiguriert ist zum Ausführen des folgenden Schritts:

    Ausführen (101) einer Datenberechnung an einem ersten Datenblock gemäß einem ersten Verschlüsselungsfaktor, um ein Datenberechnungsergebnis zu erhalten, das von dem ersten Verschlüsselungsschaltkreis (801) erzeugt wird, wobei der erste Verschlüsselungsfaktor ein Verschlüsselungsfaktor ist, der durch ein Verschlüsselungspolynom ermittelt wird, wobei der erste Datenblock zu einem ersten Teildatenstrom gehört, und wobei der erste Teildatenstrom zu einem Datenstrom gehört, der an die Verschlüsselungsvorrichtung (800) gesendet wird; und

    der zweite Verschlüsselungsschaltkreis (802) konfiguriert ist zum Ausführen der folgenden Schritte:

    Ausführen (102) einer Datenberechnung an einem zweiten Datenblock in dem Datenstrom und an einem ersten Parameter gemäß dem ersten Verschlüsselungsfaktor, um ein Datenberechnungsergebnis zu erhalten, das von dem zweiten Verschlüsselungsschaltkreis (802) erzeugt wird, wobei der zweite Datenblock ein Datenblock ist, der hinter dem ersten Datenblock angeordnet ist und der sich während einer seriellen Übertragung in der Nähe des ersten Datenblocks in dem Datenstrom befindet, wobei der zweite Datenblock zu einem zweiten Teildatenstrom gehört, wobei der zweite Teildatenstrom zu dem Datenstrom gehört, wobei, wenn der zweite Teildatenstrom und der erste Teildatenstrom ein gleicher Teildatenstrom sind, der erste Parameter das Datenberechnungsergebnis ist, das durch den ersten Verschlüsselungsschaltkreis (801) erzeugt wird, und wenn der zweite Teildatenstrom und der erste Teildatenstrom zwei unterschiedliche Teildatenströme sind, der erste Parameter Null ist;

    Ausführen (103) gemäß einem zweiten Verschlüsselungsfaktor einer Rückmeldungsberechnung an Rückmeldungsdaten, die von einem dritten Verschlüsselungsschaltkreis bereitgestellt werden, um ein Rückmeldungsberechnungsergebnis zu erhalten, das von dem zweiten Verschlüsselungsschaltkreis (802) erzeugt wird, wobei der dritte Verschlüsselungsschaltkreis ein Verschlüsselungsschaltkreis aus den mehreren Verschlüsselungsschaltkreisen ist, wobei in einem Taktzyklus mehrere Datenblöcke in dem zweiten Teildatenstrom durch die mehreren Verschlüsselungsschaltkreise erhalten werden, wobei ein letzter Datenblock von den mehreren Datenblöcken in dem zweiten Teildatenstrom durch den dritten Verschlüsselungsschaltkreis erhalten werden, wobei der letzte Datenblock der Datenblock ist, der als letzter während der seriellen Übertragung der mehreren Datenblöcke gesendet wird, wobei der zweite Verschlüsselungsfaktor ein Verschlüsselungsfaktor ist, der mithilfe des Verschlüsselungspolynoms und eines Orts des zweiten Datenblocks in dem zweiten Teildatenstrom ermittelt wird, und wobei die Rückmeldungsdaten Daten umfassen, die erhalten werden, nachdem verschlüsselte Daten, die durch den dritten Verschlüsselungsschaltkreis in einem vorherigen Taktzyklus erzeugt wurden, um einen Taktzyklus verzögert wurden, oder wobei die Rückmeldungsdaten ein Ergebnis umfassen, das erhalten wird, nachdem eine Exklusiv-Oder-Berechnung an einem ersten Ergebnis ausgeführt wurde, und ein Datenberechnungsergebnis umfassen, das durch den dritten Verschlüsselungsschaltkreis erzeugt wird, wobei das erste Ergebnis erhalten wird, nachdem die Rückmeldungsberechnung an Rückmeldungsdaten ausgeführt wird, die durch den dritten Verschlüsselungsschaltkreis in einem vorherigen Taktzyklus bereitgestellt wurden und die um einen Taktzyklus verzögert wurden;

    Ausführen (104) einer Exklusiv-Oder-Berechnung an dem Datenberechnungsergebnis, das durch den zweiten Verschlüsselungsschaltkreis (802) erzeugt wird, und an dem Rückmeldungsberechnungsergebnis, das durch den zweiten Verschlüsselungsschaltkreis (802) erzeugt wird, um verschlüsselte Daten zu erhalten, die durch den zweiten Verschlüsselungsschaltkreis (802) erzeugt werden, und

    Ausgeben der verschlüsselten Daten, die von dem zweiten Verschlüsselungsschaltkreis (802) erzeugt werden.


     
    7. Verschlüsselungsvorrichtung (800) nach Anspruch 6, wobei der zweite Verschlüsselungsschaltkreis (802) insbesondere konfiguriert ist zum Ausführen der folgenden Schritte:

    Multiplizieren eines ersten Verschlüsselungsparameterwerts in dem ersten Verschlüsselungsfaktor mit dem ersten Parameter, um ein erstes Multiplikationsergebnis zu erhalten, das von dem zweiten Verschlüsselungsschaltkreis (802) erzeugt wird;

    Multiplizieren eines zweiten Verschlüsselungsparameterwerts in dem ersten Verschlüsselungsfaktor mit dem zweiten Datenblock, um ein zweites Multiplikationsergebnis zu erhalten, das von dem zweiten Verschlüsselungsschaltkreis (802) erzeugt wird; und

    Ausführen einer Exklusiv-Oder-Berechnung an dem ersten Multiplikationsergebnis und an dem zweiten Multiplikationsergebnis, um das Datenberechnungsergebnis zu erhalten, das von dem zweiten Verschlüsselungsschaltkreis (802) erzeugt wird.


     
    8. Verschlüsselungsvorrichtung (800) nach Anspruch 7, wobei:

    wenn jeder Datenblock in dem Datenstrom n Bits aufweist, der zweite Datenblock der j-te Datenblock in dem Datenstrom ist, und der erste Datenblock der (j-1)-te Datenblock in dem Datenstrom ist,

    ist, wobei:


    das Datenberechnungsergebnis ist, das von dem zweiten Verschlüsselungsschaltkreis (802) erzeugt wird, Dn,j der zweite Datenblock ist, Nj-1 der erste Parameter ist, M der erste Verschlüsselungsparameterwert in dem ersten Verschlüsselungsfaktor ist, und F der zweite Verschlüsselungsparameterwert in dem ersten Verschlüsselungsfaktor ist, wobei:





    ist, wobei:
    Pnext ein Zustandswert eines Zustandsregisters in der Verschlüsselungsvorrichtung (800) in einem nächsten Taktzyklus ist, Pcurr ein Zustandswert eines Zustandsregisters in einem aktuellen Taktzyklus ist, i verschlüsselte Daten sind, die di in dem Datenstrom entsprechen, und di das i-te Bit in dem Datenstrom ist;





    ist, wobei:
    J ein ordungsumkehrender Berechnungsparameterwert ist;

    die Rückmeldungsberechnung in der folgenden Weise an den Rückmeldungsdaten ausgeführt wird, die durch den dritten Verschlüsselungsschaltkreis erzeugt werden:

    wobei:


    das Rückmeldungsberechnungsergebnis ist, das von dem zweiten Verschlüsselungsschaltkreis (802) erzeugt wird, pre die verschlüsselten Daten sind, die von dem dritten Verschlüsselungsschaltkreis erzeugt werden, und Mj ein dritter Verschlüsselungsparameterwert in dem zweiten Verschlüsselungsfaktor ist; und

    eine Exklusiv-Oder-Berechnung in der folgenden Weise an dem Datenberechnungsergebnis, das von dem zweiten Verschlüsselungsschaltkreis (802) erzeugt wird, und an dem Rückmeldungsberechnungsergebnis ausgeführt wird, das von dem zweiten Verschlüsselungsschaltkreis (802) erzeugt wird,

    wobei:
    n,j die verschlüsselten Daten sind, die von dem zweiten Verschlüsselungsschaltkreis (802) erzeugt werden,

    das Datenberechnungsergebnis ist, das von dem zweiten Verschlüsselungsschaltkreis (802) erzeugt wird, und

    das Rückmeldungsberechnungsergebnis ist, das von dem zweiten Verschlüsselungsschaltkreis (802) erzeugt wird.


     
    9. Verschlüsselungsvorrichtung (800) nach Anspruch 7, wobei der zweite Verschlüsselungsschaltkreis (802) insbesondere konfiguriert ist zum Ausführen der folgenden Schritte:

    wenn jeder Datenblock in dem Datenstrom n Bits aufweist, der zweite Datenblock der j-te Datenblock in dem Datenstrom ist, und der erste Datenblock der (j-1)-te Datenblock in dem Datenstrom ist,

    wobei:




    das Datenberechnungsergebnis ist, das von dem zweiten Verschlüsselungsschaltkreis (802) erzeugt wird, Dn,i ein Datenblock in dem zweiten Teildatenstrom ist, G = T-1 × F, und F der zweite Verschlüsselungsparameterwert in dem ersten Verschlüsselungsfaktor ist;



    wobei:
    Pnext ein Zustandswert eines Zustandsregisters in einem nächsten Taktzyklus ist, Pcurr ein Zustandswert des Zustandsregisters in einem aktuellen Taktzyklus ist, i verschlüsselte Daten sind, die di in dem Datenstrom entsprechen, und di das i-te Bit in dem Datenstrom ist;





    t die folgende Beziehung erfüllt: t = n - m, wobei m eine Ordnung von A ist,

    b = [1 0 ··· 0]T,





    Ta = Om×b, Ib eine Einheitsmatrix b-ter Ordnung ist, und





    ist, wobei:
    J ein ordungsumkehrender Berechnungsparameterwert ist;

    ist, wobei:




    das Rückmeldungsberechnungsergebnis ist, das von dem zweiten Verschlüsselungsschaltkreis (802) erzeugt wird, pre = T-1 × pre ist, pre die verschlüsselten Daten sind, die von dem dritten Verschlüsselungsschaltkreis erzeugt werden, und

    ein vierter Verschlüsselungsparameterwert in dem zweiten Verschlüsselungsfaktor ist; und

    wobei das Ausführen (104), durch den zweiten Verschlüsselungsschaltkreis (802), einer Exklusiv-Oder-Berechnung an dem Datenberechnungsergebnis, das durch den zweiten Verschlüsselungsschaltkreis (802) erzeugt wird, und an dem Rückmeldungsberechnungsergebnis, das durch den zweiten Verschlüsselungsschaltkreis (802) erzeugt wird, um verschlüsselte Daten zu erhalten, die durch den zweiten Verschlüsselungsschaltkreis (802) erzeugt werden, umfasst:

    wobei:
    n,j = T-1 × n,j,



    n,j die verschlüsselten Daten sind, die von dem zweiten Verschlüsselungsschaltkreis (802) erzeugt werden,

    das Datenberechnungsergebnis ist, das von dem zweiten Verschlüsselungsschaltkreis (802) erzeugt wird, und

    das Rückmeldungsberechnungsergebnis ist, das von dem zweiten Verschlüsselungsschaltkreis (802) erzeugt wird.


     
    10. Verschlüsselungsvorrichtung (800) nach einem der Ansprüche 6 bis 9, wobei der zweite Verschlüsselungsschaltkreis (802) insbesondere konfiguriert ist zum Ausführen der folgenden Schritte:

    Ausführen, gemäß einer konstanten Matrix in dem zweiten Verschlüsselungsfaktor und einem Potenzexponenten der konstanten Matrix, einer Exklusiv-Oder-Berechnung an den Rückmeldungsdaten, die von dem dritten Verschlüsselungsschaltkreis bereitgestellt werden, um ein Exklusiv-Oder-Ergebnis zu erhalten, das von dem zweiten Verschlüsselungsschaltkreis (802) erzeugt wird, wobei der Potenzexponent gemäß dem Ort des zweiten Datenblocks in dem zweiten Teildatenstrom ermittelt wird; und

    Ausführen einer Verschiebungsoperation an dem Exklusiv-Oder-Ergebnis gemäß dem Ort des zweiten Datenblocks in dem zweiten Teildatenstrom, um das Rückmeldungsberechnungsergebnis zu erhalten, das von dem zweiten Verschlüsselungsschaltkreis (802) erzeugt wird.


     


    Revendications

    1. Procédé d'embrouillage de données, le procédé étant exécuté par un appareil d'embrouillage (800), l'appareil d'embrouillage (800) comprenant de multiples circuits d'embrouillage, les multiples circuits d'embrouillage comprenant un premier circuit d'embrouillage (801) et un deuxième circuit d'embrouillage (802), et le procédé consistant à :

    réaliser (101), par le premier circuit d'embrouillage (801), un calcul de données sur un premier bloc de données selon un premier facteur d'embrouillage, pour obtenir un résultat de calcul de données généré par le premier circuit d'embrouillage (801), le premier facteur d'embrouillage étant un facteur d'embrouillage déterminé par un polynôme d'embrouillage, le premier bloc de données appartenant à un premier sous-flux de données et le premier sous-flux de données appartenant à un flux de données transmis à l'appareil d'embrouillage (800) ;

    réaliser (102), par le deuxième circuit d'embrouillage (802), un calcul de données sur un second bloc de données dans le flux de données et un premier paramètre selon le premier facteur d'embrouillage, pour obtenir un résultat de calcul de données généré par le deuxième circuit d'embrouillage (802), le second bloc de données étant un bloc de données qui est localisé après le premier bloc de données et qui est adjacent au premier bloc de données dans le flux de données pendant une transmission série, le second bloc de données appartenant à un second sous-flux de données, le second sous-flux de données appartenant au flux de données, le premier paramètre étant le résultat de calcul de données généré par le premier circuit d'embrouillage (801) quand le second sous-flux de données et le premier sous-flux de données sont un même sous-flux de données, et le premier paramètre étant nul quand le second sous-flux de données et le premier sous-flux de données sont deux sous-flux de données différents ; réaliser (103), par le deuxième circuit d'embrouillage (802) selon un second facteur d'embrouillage, un calcul de retour sur des données de retour fournies par un troisième circuit d'embrouillage, pour obtenir un résultat de calcul de retour généré par le deuxième circuit d'embrouillage (802), le troisième circuit d'embrouillage étant un circuit d'embrouillage parmi les multiples circuits d'embrouillage, de multiples blocs de données dans le second sous-flux de données étant obtenus par les multiples circuits d'embrouillage en un cycle d'horloge, un dernier bloc de données parmi les multiples blocs de données dans le second sous-flux de données étant obtenu par le troisième circuit d'embrouillage, le dernier bloc de données étant le bloc de données qui est transmis en dernier pendant la transmission série des multiples blocs de données, le second facteur d'embrouillage étant un facteur d'embrouillage déterminé par le polynôme d'embrouillage et une localisation du second bloc de données dans le second sous-flux de données, et les données de retour comprenant des données qui sont obtenues après que des données embrouillées, générées par le troisième circuit d'embrouillage dans un cycle d'horloge précédent, ont été retardées pendant un cycle d'horloge, ou les données de retour comprenant un résultat qui est obtenu après la réalisation d'un calcul OU exclusif sur un premier résultat et un résultat de calcul de données qui est généré par le troisième circuit d'embrouillage, le premier résultat étant obtenu après la réalisation d'un calcul de retour sur des données de retour qui sont fournies par le troisième circuit d'embrouillage dans un cycle d'horloge précédent et qui ont été retardées pendant un cycle d'horloge ; et

    réaliser (104), par le deuxième circuit d'embrouillage (802), un calcul OU exclusif sur le résultat de calcul de données généré par le deuxième circuit d'embrouillage (802) et le résultat de calcul de retour généré par le deuxième circuit d'embrouillage (802), pour obtenir des données embrouillées générées par le deuxième circuit d'embrouillage (802), et émettre, par le deuxième circuit d'embrouillage (802), les données embrouillées générées par le deuxième circuit d'embrouillage (802).


     
    2. Procédé selon la revendication 1, dans lequel la réalisation (102), par le deuxième circuit d'embrouillage (802), d'un calcul de données sur un second bloc de données dans le flux de données et un premier paramètre selon le premier facteur d'embrouillage, pour obtenir un résultat de calcul de données généré par le deuxième circuit d'embrouillage (802), consiste à :

    multiplier, par le deuxième circuit d'embrouillage (802), une première valeur paramétrique d'embrouillage dans le premier facteur d'embrouillage par le premier paramètre, pour obtenir un premier résultat de multiplication généré par le deuxième circuit d'embrouillage (802) ;

    multiplier, par le deuxième circuit d'embrouillage (802), une deuxième valeur paramétrique d'embrouillage dans le premier facteur d'embrouillage par le second bloc de données, pour obtenir un second résultat de multiplication généré par le deuxième circuit d'embrouillage (802) ; et

    réaliser, par le deuxième circuit d'embrouillage (802), un calcul OU exclusif sur le premier résultat de multiplication et le second résultat de multiplication, pour obtenir le résultat de calcul de données généré par le deuxième circuit d'embrouillage (802).


     
    3. Procédé selon la revendication 2, dans lequel la réalisation (102), par le deuxième circuit d'embrouillage (802), d'un calcul de données sur un second bloc de données dans le flux de données et un premier paramètre selon le premier facteur d'embrouillage, pour obtenir un résultat de calcul de données généré par le deuxième circuit d'embrouillage (802), comprend :

    si chaque bloc de données dans le flux de données a n bits, le second bloc de données est le jème bloc de données dans le flux de données, et le premier bloc de données est le j-1ième bloc de données dans le flux de données,



    est le résultat de calcul de données généré par le deuxième circuit d'embrouillage (802), Dn,j est le second bloc de données, Nj-1 est le premier paramètre, M est la première valeur paramétrique d'embrouillage dans le premier facteur d'embrouillage, et F est la deuxième valeur paramétrique d'embrouillage dans le premier facteur d'embrouillage, où :





    Pnext est une valeur de statut d'un registre de statut dans l'appareil d'embrouillage (800) dans un cycle d'horloge suivant, Pcurr est une valeur de statut du registre de statut dans un cycle d'horloge actuel, i est des données embrouillées correspondant à di dans le flux de données et di est le ième bit dans le flux de données ;



    et

    J est une valeur paramétrique de calcul en ordre inverse ;

    la réalisation, par le deuxième circuit d'embrouillage (802) selon un second facteur d'embrouillage, d'un calcul de retour sur des données de retour fournies par un troisième circuit d'embrouillage, pour obtenir un résultat de calcul de retour généré par le deuxième circuit d'embrouillage (802) comprend :



    est le résultat de calcul de retour généré par le deuxième circuit d'embrouillage (802), pre est les données embrouillées générées par le troisième circuit d'embrouillage, et Mj est une troisième valeur paramétrique d'embrouillage dans le second facteur d'embrouillage ; et

    la réalisation, par le deuxième circuit d'embrouillage (802), d'un calcul OU exclusif sur le résultat de calcul de données généré par le deuxième circuit d'embrouillage (802) et le résultat de calcul de retour généré par le deuxième circuit d'embrouillage (802), pour obtenir des données embrouillées générées par le deuxième circuit d'embrouillage (802), comprend :

    n,j est les données embrouillées générées par le deuxième circuit d'embrouillage (802),

    est le résultat de calcul de données généré par le deuxième circuit d'embrouillage (802), et

    est le résultat de calcul de retour généré par le deuxième circuit d'embrouillage (802).


     
    4. Procédé selon la revendication 2, dans lequel la réalisation (102), par le deuxième circuit d'embrouillage (802), d'un calcul de données sur un second bloc de données dans le flux de données et un premier paramètre selon le premier facteur d'embrouillage, pour obtenir un résultat de calcul de données généré par le deuxième circuit d'embrouillage (802), comprend :

    si chaque bloc de données dans le flux de données a n bits, le second bloc de données est le jème bloc de données dans le flux de données, et le premier bloc de données est le j-1ième bloc de données dans le flux de données,





    est le résultat de calcul de données généré par le deuxième circuit d'embrouillage (802), Dn,i est un bloc de données dans le second sous-flux de données, G = T-1 × F, et F est la deuxième valeur paramétrique d'embrouillage dans le premier facteur d'embrouillage ;



    Pnext est une valeur de statut d'un registre de statut dans l'appareil d'embrouillage (800) dans un cycle d'horloge suivant, Pcurr est une valeur de statut du registre de statut dans un cycle d'horloge actuel, i est des données embrouillées correspondant à di dans le flux de données, et di est le ième bit dans le flux de données ;





    t satisfait à la relation suivante : t = n - m m est un ordre de A,

    b = [1 0 ··· 0]r,





    Ta = Om×b, Ib est une matrice unité du bième ordre, et



    et

    J est une valeur paramétrique de calcul en ordre inverse ;

    la réalisation (103), par le deuxième circuit d'embrouillage (802) selon un second facteur d'embrouillage, d'un calcul de retour sur des données de retour fournies par un troisième circuit d'embrouillage, pour obtenir un résultat de calcul de retour généré par le deuxième circuit d'embrouillage (802) comprend :





    est le résultat de calcul de retour généré par le deuxième circuit d'embrouillage (802), pre = T-1 × pre, D̃pre est les données embrouillées générées par le troisième circuit d'embrouillage, et

    est une quatrième valeur paramétrique d'embrouillage dans le second facteur d'embrouillage ; et

    la réalisation (104), par le deuxième circuit d'embrouillage (802), d'un calcul OU exclusif sur le résultat de calcul de données généré par le deuxième circuit d'embrouillage (802) et le résultat de calcul de retour généré par le deuxième circuit d'embrouillage (802), pour obtenir des données embrouillées générées par le deuxième circuit d'embrouillage (802), comprend :

    n,j = T-1 × n,j,



    n,j est les données embrouillées générées par le deuxième circuit d'embrouillage (802),

    est le résultat de calcul de données généré par le deuxième circuit d'embrouillage (802), et

    est le résultat de calcul de retour généré par le deuxième circuit d'embrouillage (802).


     
    5. Procédé selon l'une quelconque des revendications 1 à 4, dans lequel la réalisation (103), par le deuxième circuit d'embrouillage (802) selon un second facteur d'embrouillage, d'un calcul de retour sur des données de retour fournies par un troisième circuit d'embrouillage, pour obtenir un résultat de calcul de retour généré par le deuxième circuit d'embrouillage (802), consiste à :

    réaliser, par le deuxième circuit d'embrouillage (802) selon une matrice constante dans le second facteur d'embrouillage et un exposant de puissance de la matrice constante, un calcul OU exclusif sur les données de retour fournies par le troisième circuit d'embrouillage, pour obtenir un résultat OU exclusif généré par le deuxième circuit d'embrouillage (802), l'exposant de puissance étant déterminé selon la localisation du second bloc de données dans le second sous-flux de données ; et

    réaliser, par le deuxième circuit d'embrouillage (802), une opération de décalage sur le résultat OU exclusif selon la localisation du second bloc de données dans le second sous-flux de données, pour obtenir le résultat de calcul de retour généré par le deuxième circuit d'embrouillage (802).


     
    6. Appareil d'embrouillage (800), l'appareil d'embrouillage (800) comprenant de multiples circuits d'embrouillage, les multiples circuits d'embrouillage comprenant un premier circuit d'embrouillage (801) et un deuxième circuit d'embrouillage (802), le premier circuit d'embrouillage (801) étant configuré pour réaliser l'étape suivante :

    réaliser (101) un calcul de données sur un premier bloc de données selon un premier facteur d'embrouillage, pour obtenir un résultat de calcul de données généré par le premier circuit d'embrouillage (801), le premier facteur d'embrouillage étant un facteur d'embrouillage déterminé par un polynôme d'embrouillage, le premier bloc de données appartenant à un premier sous-flux de données et le premier sous-flux de données appartenant à un flux de données transmis à l'appareil d'embrouillage (800) ; et

    le deuxième circuit d'embrouillage (802) étant configuré pour réaliser les étapes suivantes :

    réaliser (102) un calcul de données sur un second bloc de données dans le flux de données et un premier paramètre selon le premier facteur d'embrouillage, pour obtenir un résultat de calcul de données généré par le deuxième circuit d'embrouillage (802), le second bloc de données étant un bloc de données qui est localisé après le premier bloc de données et qui est adjacent au premier bloc de données dans le flux de données pendant une transmission série, le second bloc de données appartenant à un second sous-flux de données, le second sous-flux de données appartenant au flux de données, le premier paramètre étant le résultat de calcul de données généré par le premier circuit d'embrouillage (801) quand le second sous-flux de données et le premier sous-flux de données sont un même sous-flux de données, et le premier paramètre étant nul quand le second sous-flux de données et le premier sous-flux de données sont deux sous-flux de données différents ;

    réaliser (103), selon un second facteur d'embrouillage, un calcul de retour sur des données de retour fournies par un troisième circuit d'embrouillage, pour obtenir un résultat de calcul de retour généré par le deuxième circuit d'embrouillage (802), le troisième circuit d'embrouillage étant un circuit d'embrouillage parmi les multiples circuits d'embrouillage, de multiples blocs de données dans le second sous-flux de données étant obtenus par les multiples circuits d'embrouillage en un cycle d'horloge, un dernier bloc de données parmi les multiples blocs de données dans le second sous-flux de données étant obtenu par le troisième circuit d'embrouillage, le dernier bloc de données étant le bloc de données qui est transmis en dernier pendant la transmission série des multiples blocs de données, le second facteur d'embrouillage étant un facteur d'embrouillage déterminé par le polynôme d'embrouillage et une localisation du second bloc de données dans le second sous-flux de données, et les données de retour comprenant des données qui sont obtenues après que des données embrouillées, générées par le troisième circuit d'embrouillage dans un cycle d'horloge précédent, ont été retardées pendant un cycle d'horloge, ou les données de retour comprenant un résultat qui est obtenu après la réalisation d'un calcul OU exclusif sur un premier résultat et un résultat de calcul de données qui est généré par le troisième circuit d'embrouillage, le premier résultat étant obtenu après la réalisation d'un calcul de retour sur des données de retour qui sont fournies par le troisième circuit d'embrouillage dans un cycle d'horloge précédent et qui ont été retardées pendant un cycle d'horloge ;

    réaliser (104) un calcul OU exclusif sur le résultat de calcul de données généré par le deuxième circuit d'embrouillage (802) et le résultat de calcul de retour généré par le deuxième circuit d'embrouillage (802), pour obtenir des données embrouillées générées par le deuxième circuit d'embrouillage (802) ; et

    émettre les données embrouillées générées par le deuxième circuit d'embrouillage (802).


     
    7. Appareil d'embrouillage (800) selon la revendication 6, dans lequel le deuxième circuit d'embrouillage (802) est spécifiquement configuré pour réaliser les étapes suivantes :

    multiplier une première valeur paramétrique d'embrouillage dans le premier facteur d'embrouillage par le premier paramètre, pour obtenir un premier résultat de multiplication généré par le deuxième circuit d'embrouillage (802) ;

    multiplier une deuxième valeur paramétrique d'embrouillage dans le premier facteur d'embrouillage par le second bloc de données, pour obtenir un second résultat de multiplication généré par le deuxième circuit d'embrouillage (802) ; et

    réaliser un calcul OU exclusif sur le premier résultat de multiplication et le second résultat de multiplication, pour obtenir le résultat de calcul de données généré par le deuxième circuit d'embrouillage (802).


     
    8. Appareil d'embrouillage (800) selon la revendication 7, dans lequel :

    si chaque bloc de données dans le flux de données a n bits, le second bloc de données est le jème bloc de données dans le flux de données, et le premier bloc de données est le j-1ième bloc de données dans le flux de données,



    est le résultat de calcul de données généré par le deuxième circuit d'embrouillage (802), Dn,j est le second bloc de données, Nj-1 est le premier paramètre, M est la première valeur paramétrique d'embrouillage dans le premier facteur d'embrouillage, et F est la deuxième valeur paramétrique d'embrouillage dans le premier facteur d'embrouillage, où :





    Pnext est une valeur de statut d'un registre de statut dans l'appareil d'embrouillage (800) dans un cycle d'horloge suivant, Pcurr est une valeur de statut du registre de statut dans un cycle d'horloge actuel, i est des données embrouillées correspondant à di dans le flux de données, et di est le ième bit dans le flux de données ;



    et

    J est une valeur paramétrique de calcul en ordre inverse ;

    un calcul de retour est réalisé, de la manière suivante, sur les données de retour générées par le troisième circuit d'embrouillage :



    est le résultat de calcul de retour généré par le deuxième circuit d'embrouillage (802), pre est les données embrouillées générées par le troisième circuit d'embrouillage, et Mj est une troisième valeur paramétrique d'embrouillage dans le second facteur d'embrouillage ; et

    un calcul OU exclusif est réalisé, de la manière suivante, sur le résultat de calcul de données généré par le deuxième circuit d'embrouillage (802) et le résultat de calcul de retour généré par le deuxième circuit d'embrouillage (802) :

    n,j est les données embrouillées générées par le deuxième circuit d'embrouillage (802),

    est le résultat de calcul de données généré par le deuxième circuit d'embrouillage (802), et

    est le résultat de calcul de retour généré par le deuxième circuit d'embrouillage (802).


     
    9. Appareil d'embrouillage (800) selon la revendication 7, dans lequel le deuxième circuit d'embrouillage (802) est spécifiquement configuré pour réaliser les étapes suivantes :

    si chaque bloc de données dans le flux de données a n bits, le second bloc de données est le jème bloc de données dans le flux de données, et le premier bloc de données est le j-1ième bloc de données dans le flux de données,





    est le résultat de calcul de données généré par le deuxième circuit d'embrouillage (802), Dn,i est un bloc de données dans le second sous-flux de données, G = T-1 × F, et F est la deuxième valeur paramétrique d'embrouillage dans le premier facteur d'embrouillage ;



    Pnext est une valeur de statut d'un registre de statut dans un cycle d'horloge suivant, Pcurr est une valeur de statut du registre de statut dans un cycle d'horloge actuel, i est des données embrouillées correspondant à di dans le flux de données, et di est le ième bit dans le flux de données ;





    t satisfait à la relation suivante : t = n - m, m est un ordre de A,

    b = [1 0 ... 0]r,





    Ta = Om×b, Ib est une matrice unité du bième ordre, et





    J est une valeur paramétrique de calcul en ordre inverse ;





    est le résultat de calcul de retour généré par le deuxième circuit d'embrouillage (802), pre = T-1 × pre, D̃pre est les données embrouillées générées par le troisième circuit d'embrouillage, et

    est une quatrième valeur paramétrique d'embrouillage dans le second facteur d'embrouillage ; et

    la réalisation (104), par le deuxième circuit d'embrouillage (802), d'un calcul OU exclusif sur le résultat de calcul de données généré par le deuxième circuit d'embrouillage (802) et le résultat de calcul de retour généré par le deuxième circuit d'embrouillage (802), pour obtenir des données embrouillées générées par le deuxième circuit d'embrouillage (802), comprend :

    n,j = T-1 × n,j,



    n,j est les données embrouillées générées par le deuxième circuit d'embrouillage (802),

    est le résultat de calcul de données généré par le deuxième circuit d'embrouillage (802), et

    est le résultat de calcul de retour généré par le deuxième circuit d'embrouillage (802).


     
    10. Appareil d'embrouillage (800) selon l'une quelconque des revendications 6 à 9, dans lequel le deuxième circuit d'embrouillage (802) est spécifiquement configuré pour réaliser les étapes suivantes :

    réaliser, selon une matrice constante dans le second facteur d'embrouillage et un exposant de puissance de la matrice constante, un calcul OU exclusif sur les données de retour fournies par le troisième circuit d'embrouillage, pour obtenir un résultat OU exclusif généré par le deuxième circuit d'embrouillage (802), l'exposant de puissance étant déterminé selon la localisation du second bloc de données dans le second sous-flux de données ; et

    réaliser une opération de décalage sur le résultat OU exclusif selon la localisation du second bloc de données dans le second sous-flux de données, pour obtenir le résultat de calcul de retour généré par le deuxième circuit d'embrouillage (802).


     




    Drawing


























    Cited references

    REFERENCES CITED IN THE DESCRIPTION



    This list of references cited by the applicant is for the reader's convenience only. It does not form part of the European patent document. Even though great care has been taken in compiling the references, errors or omissions cannot be excluded and the EPO disclaims all liability in this regard.

    Patent documents cited in the description