Abstract:
In this invention, a new authenticated encryption and decryption technique has been proposed. In general, conventional encryption modes like (CTR, CBC, and CFB etc.) cannot provide integrity support and in order to ensure both the privacy and integrity, they require two passes and additional support like MAC, CRC etc. However, this new authenticated encryption technique can ensure both the privacy and integrity in single pass without any MAC or CRC support. Most importantly, this new technique can easy be incorporated with the existing encryption modes. As a consequence of the integration, the existing encryption modes can resolve several security issues related to integrity, without impairing their existing security properties.

Description:
CROSS-REFERENCE TO RELATED APPLICATION 
       [0001]    This application claims the benefit of Taiwan Patent Application No. 102123966, filed on Jul. 4, 2013, in the Taiwan Intellectual Property Office, the disclosure of which is incorporated herein in its entirety by reference. 
       BACKGROUND OF THE INVENTION 
       [0002]    1. Field of the Invention 
         [0003]    The present disclosure is related to a method for authenticated encryption and decryption, particularly, to method for authenticated encryption and decryption capable of being integrated with other encryption and decryption algorithms. 
         [0004]    2. Description of the Related Art 
         [0005]    Due to the growing popularity of computer systems and the Internet, using the Internet to transmitting computer data becomes one of the indispensable parts of people&#39;s lives. Therefore, how to ensure that others are not being spied on or changed the computer data during data transmission becomes an extremely important area of research. 
         [0006]    In general, the privacy and the authentication are two most important issues in the field of data transmission. The privacy can be achieved by encrypting data blocks of the data to be transmitted. The authentication can utilize the message authentication code or the checksum verification inserted in the data to ensure the correctness of data. For integrating the two issues, in the prior art, attaching the message authentication code or utilizing the hashing function is employed to achieve the purpose of the authentication. However, such method requires additional transmission space or additional computation cost to transmit data. 
         [0007]    Accordingly, the inventor of this invention designs a method for authenticated encryption and decryption capable of encrypting a binary plain text block and being integrated with both of the privacy and the authentication. The drawbacks of the current studies can be improved by integrating the method into these studies, so as to enhance the usage of the encryption and decryption for the data transmission. 
       SUMMARY OF THE INVENTION 
       [0008]    Based on the purpose of the present invention, a method for authenticated encryption and decryption is proposed. The method comprises following steps: receiving a binary plain text at an encryption end; performing an encryption process according to the binary plain text data, the encryption process comprising following steps: providing n encryption paths, wherein n is a positive integer; providing a first input encryption parameter A t  to the t-th path of the n encryption paths correspondingly, wherein t is an integer, 1≦t≦n, 0≦r&lt;t, r is an integer, and A t+r  is a function f(M t ) with an input parameter of a binary plain text M t ; performing a first encryption logic computation for the first input encryption parameter A t  of the t-th path correspondingly so as to generate a first middle encryption value B t ; performing an encryption computation for the first middle encryption value B t  of the t-th path and an encryption kernel correspondingly so as to generate a second middle encryption value F t ; providing a second input encryption parameter G t  to the t-th path of the n encryption paths correspondingly, wherein 0≦s&lt;t, s is an integer, and G t+s  is a function f(M t ) with an input parameter of the binary plain text M n ; performing a second encryption logic computation for the second middle encryption value F t  in the t-th path and the second input encryption parameter G t  so as to generate a cipher text C t ; providing p encryption/authentication paths, wherein p is a positive integer; providing a first encryption/authentication parameter AV j  to a j-th path of p encryption/authentication paths correspondingly, wherein 1≦j≦p; performing a first encryption/authentication logic computation for the first encryption/authentication parameter AV j  of the j-th encryption/authentication path correspondingly so as to generate a first middle encryption/authentication value BV j ; performing an encryption computation for the first middle encryption/authentication value BV j  of the j-th encryption/authentication path and the encryption kernel correspondingly so as to generate a second middle encryption/authentication value FV j  of the j-th encryption/authentication path; providing a second encryption/authentication data GV j  to the j-th path; performing a second encryption/authentication logic computation for the second middle encryption/authentication value FV j  of the j-th encryption/authentication path and the second encryption/authentication data GV j  correspondingly so as to generate a cipher text C n+j ; receiving the cipher text C n+j  at a decryption end and performing a decryption process, the decryption process comprising following steps: providing n decryption paths; providing a first input decryption parameter J t  to a t-th path of the n decryption paths correspondingly, wherein 1≦t≦n; performing a first decryption logic computation for the first input decryption parameter J t  of the t-th path correspondingly so as to generate a first middle decryption value K t ; performing a decryption computation for the first middle decryption value K t  of the t-th path and a decryption kernel correspondingly so as to generate a second middle decryption value L t ; performing a second logic decryption computation for the second middle decryption value L t  of the t-th path and a second input decryption parameter N t  so as to generate a decrypted binary plain text M t ′; providing p decryption/authentication paths, wherein p is a positive integer; providing a first decryption-authentication parameter JV j  to a j-th decryption/authentication path of the p decryption/authentication paths correspondingly, wherein 1≦j≦p; performing a first logic decryption/authentication computation for the first decryption-authentication parameter JV j  of the j-th decryption/authentication path correspondingly so as to generate a first middle decryption/authentication value KV j ; performing a decryption computation for the first middle decryption value KV j  of the j-th decryption/authentication path and the decryption kernel correspondingly so as to generate a second middle decryption/authentication value LV j  of the j-th decryption/authentication path; and performing a second logic decryption/authentication computation for the second middle decryption/authentication value LV j  of the j-th decryption/authentication path and second decryption/authentication data NV j  so as to generate a plain text of decryption an authentication MV j . 
         [0009]    Preferably, in the encryption process, r=0 and s=1; the first input encryption parameter A t  of the t-th path of the n encryption paths further comprises a t-th output ctr t  of a counter, 1≦t≦n; the first encryption logic computation is an Exclusive OR logic computation and it is performed for the first input encryption parameter A t  so as to generate the first middle encryption value B t ; the encryption kernel is a block encryption E K  controlled by a positive integer K; the second input encryption parameter G 1  of the first path of the n encryption paths is a first output ctr 1  of the counter; the second encryption logic computation is another Exclusive OR logic computation; p=1; the first encryption/authentication logic computation and the second encryption/authentication logic computation are an Exclusive OR logic computation correspondingly; the first encryption/authentication parameter AV p  is a default EV (Ending Vector) and a (n+1)-th output ctr n+1  of the counter; the second encryption/authentication data GV p  comprises the function f(M n ) with an input parameter of the binary plain text M n ; in the decryption process, s=1; the first input decryption parameter J 1  of the first path of the n decryption paths comprises the first output ctr 1  of the counter; the first input decryption parameter J t+s  comprises the function f(M t ′) with an input parameter of the decrypted binary plain text M t ′, 1≦t≦n; the first decryption logic computation is an Exclusive OR logic computation and it is performed for the cipher text C t  and the first input decryption parameter J t  so as to generate the first middle decryption value K t ; the decryption kernel is a block decryption D K  controlled by a positive integer K; the second logic decryption computation is an Exclusive OR logic computation; the second input decryption parameter N t  of the t-th path of the n decryption paths is a t-th output ctr t  of the counter; p=1; the first logic decryption/authentication computation is an Exclusive OR logic computation; the cipher text C n+p  and the first decryption-authentication parameter JV p  comprises the function f(M n ′) with an input parameter of the decrypted binary plain text M n ′ so as to perform the first logic decryption/authentication computation, the second logic decryption/authentication computation is an Exclusive OR logic computation, and the second decryption/authentication data NV p  is a (n+p)-th output ctr n+p  of the counter. 
         [0010]    Preferably, in the encryption process, r=0 and s=1; the first input encryption parameter A t  of the t-th path of the n encryption paths further comprises an incrementing function Δ t , 1≦t≦n and Δ 1 ≠Δ 2 ≠ . . . ≠Δ n ; the first encryption logic computation is an Exclusive OR logic computation and it is performed for the first input encryption parameter A t  so as to generate the first middle encryption value B t ; the encryption kernel is a block encryption E K  controlled by a positive integer K; the second input encryption parameter G 1  of a first path of the n encryption paths is the incrementing function Δ 1 ; the second encryption logic computation is an Exclusive OR logic computation; an Exclusive OR logic computation is performed for the cipher text C h  and the incrementing function Δ h  so as to generate a cipher text C h ′, s&lt;h≦n; p=1; the first encryption/authentication logic computation and the second encryption/authentication logic computation are an Exclusive OR logic computation correspondingly; the first encryption/authentication parameter AV p  comprises a default EV (Ending Vector) and the incrementing function Δ n+p ; the second encryption/authentication data GV p  comprises a function f(M n ) with an input parameter of the binary plain text M n ; an Exclusive OR logic computation is further performed for the cipher text C n+p  and an incrementing function Δn +p  so as to generate a cipher text C n+p ′; in the decryption process, s=1; the first input decryption parameter J 1  of the first path of the n decryption paths comprises the incrementing function Δ 1 ; the first input decryption parameter J t+s  is a result of an Exclusive OR logic computation performed for the function f(M t ) with an input parameter of the binary plain text M t  and an incrementing function Δ t+s , 1≦t≦n; the first decryption logic computation is an Exclusive OR logic computation and it is performed for the cipher text C t ′ and the first input decryption parameter J t  so as to generate the first middle decryption value K t ; the decryption kernel is a block decryption D K  controlled by a positive integer K; the second input decryption parameter N t  of the t-th path of the n decryption paths is the incrementing function Δ t ; p=1; the first logic decryption/authentication computation is an Exclusive OR logic computation; the first decryption-authentication parameter JV p  is a result of an Exclusive OR logic computation performed for the function f(M n ′) with an input parameter of the binary plain text M n ′ and the incrementing function Δ n+p ; the second logic decryption/authentication computation is an Exclusive OR logic computation; the second decryption/authentication data NV p  is the incrementing function Δ n+p . 
         [0011]    Preferably, in the encryption process, s=0, r=p, and 2≦p; the first encryption logic computation is not provided to the top p paths of the n encryption paths; in the last (n−p) paths of the n encryption paths and the p encryption/authentication paths, the first encryption logic computation and the first encryption/authentication logic computation comprises an Exclusive OR logic computation; the encryption kernel is a block encryption E K  controlled by a positive integer K; the second encryption logic computation of the n encryption paths comprises a computation of shift register and an Exclusive OR logic computation sequentially, the computation of shift register outputs an input value after shifting the input value by g bits, and g is a positive integer; the second encryption logic computation of the p encryption paths comprises a computation of shift register, and the computation of shift register outputs an input value after shifting the input value by g bits; from the first encryption path to the top p encryption paths, the first input encryption parameter A c  of a c-th path comprises a c-th output ctr c  of the counter, 1≦c≦p; the first input encryption parameter A d  of the d-th path of the last (n−p) encryption paths further comprises a d-th output ctr d , wherein p+1≦d≦n; the first encryption/authentication parameter AVj of the p encryption/authentication paths comprises the function f(M n+j−p ) with the input parameter of the binary plain text M n+j−p  and the (n+j)-th output ctr n+j  of the counter, wherein 1≦j≦p; the second encryption/authentication data GV j  is not provided to the p encryption/authentication paths; in the decryption process, s=0; the first decryption logic computation is not provided to the top p paths of the n decryption paths; in the last (n−p) paths of the n encryption paths and the p encryption/authentication paths, the first decryption logic computation and the first logic decryption/authentication computation comprises an Exclusive OR logic computation; the decryption kernel is the block encryption E K , K is a positive integer; the second logic decryption computation of the n decryption paths comprises a computation of shift register and an Exclusive OR logic computation sequentially, and the computation of shift register outputs an input value after shifting the input value by g bits; the second logic decryption computation of the p encryption paths comprises a computation of shift register, and the computation of shift register outputs an input value after shifting the input value by g bits; from the first decryption path to the top p decryption paths, the first input decryption parameter J c  of a c-th path comprises a c-th output ctr c  of the counter, wherein 1≦c≦p; the first input decryption parameter J d  of a d-th path in the last (n−p) decryption paths further comprises a d-th output ctr d  of the counter and the function f(M d−p ′) with an input parameter of the decrypted binary plain text M d−p ′, wherein p+1≦d≦n; the second input decryption parameter N t  of the n decryption paths is the cipher text C t , 1≦t≦n; the first decryption-authentication parameter JV j  of the p decryption/authentication paths comprises the (n+j) output ctr n+j  of the counter and the function f(M n+j−p ′) with an input parameter of the decrypted binary plain text M n+j−p ′: , 1≦j≦p; and the second decryption/authentication data NV j  is not provided to the p decryption/authentication paths. 
         [0012]    Preferably, in the encryption process, s=0, r=p, and 2≦p; the first encryption logic computation is not provided to the top p paths of the n encryption paths; in the last (n−p) paths of the n encryption paths and the p encryption/authentication paths, the first encryption logic computation and the first encryption/authentication logic computation comprise an Exclusive OR logic computation; the encryption kernel is a block encryption E K  controlled by a positive integer K; the second encryption logic computation of the n decryption paths comprises a computation of shift register and an Exclusive OR logic computation sequentially, wherein the computation of shift register outputs an input value after shifting g bits of the input value; the second encryption/authentication logic computation of the p encryption/authentication paths comprises an Exclusive OR logic computation and a computation of shift register, wherein the computation of shift register outputs an input value after shifting the input value by g bits; from the first encryption path to the top p encryption paths, the first input encryption parameter A c  of a c-th path comprises an incrementing function Δ c , 1≦c≦p, and Δ 1 ≠ Δ 2 ≠ . . . ≠ Δ p ; the first input encryption parameter A d  of a d-th encryption path within the last (n−p) encryption paths further comprises the incrementing function Δ d , p +1≦d≦n, and Δ p+1 ≠ Δ p+2 ≠ . . . ≠ Δ n ; an Exclusive OR logic computation is performed for the second middle encryption value F t  and an incrementing function Δ t  so as to generate another second middle encryption value F t ′, wherein Δ 1 ≠ Δ 2 ≠ . . . ≠ Δ n ; the first encryption/authentication parameter AV j  of the p encryption/authentication paths comprises the function f(M n+j−p ′) with the input parameter of the binary plain text M n+j−p ′ and the incrementing function Δ n+j , wherein 1≦j≦p; the second encryption/authentication data GV j  of the p encryption/authentication paths comprises an incrementing function Δ n+j ; in the decryption process, s=0; the first decryption logic computation is not provided to the top p paths of the n decryption paths; in the last (n−p) paths of the n encryption paths and the p encryption/authentication paths, the first decryption logic computation and the first logic decryption/authentication computation comprise an Exclusive OR logic computation; the decryption kernel is the block encryption E K , K is a positive integer; the second logic decryption computation of the n decryption paths comprises a computation of shift register and an Exclusive OR logic computation sequentially, wherein the computation of shift register outputs an input value after shifting g bits of the input value; the second encryption/authentication logic computation of the p encryption/authentication paths comprises an Exclusive OR logic computation and a computation of shift register, wherein the computation of shift register outputs an input value after shifting the input value by g bits; from the first decryption path to the top p decryption paths, the first input decryption parameter J c  of a c-th path comprises the incrementing function Δ c , wherein 1≦c≦p; the first input decryption parameter J d  of a d-th path in last (n−p) decryption paths further comprises the incrementing function Δ d  and the function f(M d−p ′) with the input parameter of the decrypted binary plain text M d−p ′, wherein p+1≦d≦n; an Exclusive OR logic computation is performed for the second middle decryption value L t  and the incrementing function Δ t  so as to generate another second middle decryption value L t ′, 1≦t≦n; the second input decryption parameter N t  of the n decryption paths comprises the cipher text C t ; the first decryption-authentication parameter JV j  of the p decryption/authentication paths comprises the incrementing function Δ n+j  and the function f(M n+j−p ′) with the input parameter of the decrypted binary plain text M n+j−p ′, wherein 1≦j≦p; and the second decryption/authentication data NV j  of the p decryption/authentication paths comprises an incrementing function Δ n+j . 
         [0013]    According to the above description, the method for authenticated encryption and decryption in the invention can be integrated into the existing prior arts to achieve a good privacy. Furthermore, the method for authenticated encryption and decryption is simple and in wide use by using the Exclusion OR logic computation to lower the cost of authenticating the correctness of encryption and decryption. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0014]    The detailed structure, operating principle and effects of the present disclosure will now be described in more details hereinafter with reference to the accompanying drawings that show various embodiments of the present disclosure as follows. 
           [0015]      FIG. 1  is a schematic view of the method for authenticated encryption and decryption according to a first embodiment of the present application. 
           [0016]      FIG. 2  is a schematic view of the method for authenticated encryption and decryption according to a second embodiment of the present application. 
           [0017]      FIG. 3  is a schematic view of the method for authenticated encryption and decryption according to a third embodiment of the present application. 
           [0018]      FIG. 4  is a schematic view of the method for authenticated encryption and decryption according to a fourth embodiment of the present application. 
       
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS 
       [0019]    Reference will now be made in detail to the exemplary embodiments of the present disclosure, examples of which are illustrated in the accompanying drawings. Therefore, it is to be understood that the foregoing is illustrative of exemplary embodiments and is not to be construed as limited to the specific embodiments disclosed, and that modifications to the disclosed exemplary embodiments, as well as other exemplary embodiments, are intended to be included within the scope of the appended claims. These embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the inventive concept to those skilled in the art. The relative proportions and ratios of elements in the drawings may be exaggerated or diminished in size for the sake of clarity and convenience in the drawings, and such arbitrary proportions are only illustrative and not limiting in any way. The same reference numbers are used in the drawings and the description to refer to the same or like parts. 
         [0020]    It will be understood that, although the terms ‘first’, ‘second’, ‘third’, etc., may be used herein to describe various elements, these elements should not be limited by these terms. The terms are used only for the purpose of distinguishing one component from another component. Thus, a first element discussed below could be termed a second element without departing from the teachings of embodiments. As used herein, the term “or” includes any and all combinations of one or more of the associated listed items. 
         [0021]    Referring to  FIG. 1 , it is a schematic view of the method for authenticated encryption and decryption according to a first embodiment of the present application. As shown in part (a) of the  FIG. 1 , the first input encryption parameter of the t-th path of the n encryption paths comprises a t-th output ctr t  of a counter, 1≦t≦n. An Exclusive OR logic computation is performed for the first input encryption parameter ctr t  and a t-th plain text M t  so as to generate a first middle encryption value B t . Using a block encryption E K  to encrypt the first middle encryption value B t  so as to generate a second middle encryption value F t . Next, the second input encryption parameter G t  is proved to the t-th path of the n encryption paths, wherein G 1  is the first output ctr 1  of the counter, G 2 ˜Gn are the function f(M 1 )˜f(M n−1 ) with an input parameter of binary plain text M 1 ˜M n−1 , respectively. The function f(M 1 )˜f(M n−1 ) may include the original binary plain text M 1 ˜M n−1 . Performing an Exclusive OR logic computation for the second middle encryption value F t  and G t  so as to generate a cipher text C t . In addition, further providing an encryption/authentication path to n encryption paths. The Exclusive OR logic computation is performed for the (n+1)-th output ctr n+1  of the counter in the encryption/authentication path and an ending vector EV, so as to generate a first middle encryption/authentication value BV. Using an encryption kernel E K  to encrypt the first middle encryption/authentication value BV, so as to generate second middle encryption/authentication value FV. Next, the Exclusive OR logic computation is performed for the second middle encryption/authentication value FV and the function f(M n ) with the input parameter of the plain text M n , so as to generate a cipher text C n+1 . 
         [0022]    As shown in part (b) of the  FIG. 1 , a first input decryption parameter J t  is proved to a t-th path of n decryption paths, J 1  is a first output ctr 1  of a counter and J 2 ˜J n  indicate the function f(M 1 )˜f(M n−1 ) with the input parameter of decrypted plain text M 1 ˜M n−1 , wherein f(M 1 )˜f(M n−1 ) may comprise the decrypted plain text M 1 ˜M n−1 . The Exclusive OR logic computation is performed for the first input decryption parameter J t  and the t-th cipher text C t , so as to generate first middle decryption value K t . Next, the first middle decryption value K t  is decrypted by a decryption kernel D K , so as to generate a second middle decryption value L t . Next, the Exclusive OR logic computation is performed for the second middle decryption value L t  and a second input decryption parameter ctr t , so as to generate a decrypted plain text M t . Besides, further providing a decryption/authentication path to the n encryption paths. The function f(M n ) with the input parameter of the decrypted plain text M n  is provided to the decryption/authentication path. The Exclusive OR logic computation is performed for the function f(M n ) and a cipher text C n+1 , so as to generate a first middle decryption/authentication value KV. Using a decryption kernel DK to decrypt the first middle decryption/authentication value KV, so as to generate second middle decryption/authentication value LV. The Exclusive OR logic computation is performed for the second middle decryption/authentication value LV and the (n+ 1 )-th output ctr n+1  of a counter, so as to generate a second ending vector EV′. The process of the encryption and the decryption is correct if the second ending vector EV′ is equal to the first ending vector EV. The method can be used in the Counter Mode (CTR) of the traditional Block cipher mode. 
         [0023]    Referring to  FIG. 2 , it is a schematic view of the method for authenticated encryption and decryption according to a second embodiment of the present application. As shown in part (a) of the  FIG. 2 , a first input encryption parameter A t  of the t-th path of the n encryption paths comprises an incrementing function Δ t . The Exclusive OR logic computation is performed for the first input encryption parameter A t  and the t-th plain text M t , so as to generate a first middle encryption value B t . Next, using a block encryption E K  to encrypt B t  so as to generate a second middle encryption value F t . Next, a second input encryption parameter G t  is provided to the t-th path of the n encryption paths correspondingly, G 1  comprises an incrementing function Δ 1 , G 2 ˜G n  are the results of performing the Exclusive OR logic computation for the function f(M 1 )˜f(M n−1 ) with the input parameter of binary plain text M 1 ˜M n−1  and the incrementing function Δ 2 ˜Δ n , correspondingly, wherein the function f(M 1 )˜f(M n−1 ) may include the binary plain text M 1 ˜M n−1 . The Exclusive OR logic computation is performed for the second middle encryption value B t  and the second input encryption parameter G t , so as to generate the cipher text C t . The incrementing function A n+1  is provided to an encryption/authentication path. The Exclusive OR logic computation is performed for the incrementing function A n+1  and a first ending vector EV, so as to generate a first middle encryption/authentication value BV. Using an encryption kernel EK to encrypt the first middle encryption/authentication value BV so as to generate a second middle encryption/authentication value FV. Next, the Exclusive OR logic computation is performed for the second middle encryption/authentication value FV, the function f(M n ) with the input parameter of the plain text M n , and an incrementing function Δ n+1 , so as to generate a cipher text C n+1 . 
         [0024]    As shown in part (b) of the  FIG. 2 , providing an input data of decryption Jt of the t-th path of the n encryption paths. J 1  is an incrementing function Δ 1 , J 2 ˜J n  indicate the function f(M 1 )˜f(M n−1 ) with the input parameter of decrypted plain text M 1 ˜M n−1 , respectively, wherein f(M 1 )˜f(M n−1 ) may comprise decrypted plain text M 1 ˜M n−1 . The Exclusive OR logic computation is performed for the first input decryption parameter J t  and the t-th cipher text C t , so as to generate first middle decryption value K t . Next, the Exclusive OR logic computation is performed for the first middle decryption value K r  and the incrementing function Δ r , so as to generate a second middle decryption value L r , 2≦r≦n. Next, decrypting the first middle decryption value K 1  and the second middle decryption value L r  by a decryption kernel DK, so as to generate a third middle decryption value S t . The Exclusive OR logic computation is performed for third middle decryption value S t  and an incrementing function Δ t , so as to generate a decrypted plain text M t , 1≦t≦n. Besides, providing the function f(M n ) with the input parameter of the decrypted plain text M n  to the decryption/authentication path. The Exclusive OR logic computation is performed for the function f(M n ) and a cipher text C n+1 , so as to generate a first middle decryption/authentication value KV. The Exclusive OR logic computation is performed for the first middle decryption/authentication value KV and an incrementing function Δ n+1 , so as to generate a second middle decryption/authentication value LV. Using a decryption kernel DK to decrypt the second middle decryption/authentication value LV so as to generate a third middle decryption/authentication value TV. The Exclusive OR logic computation is performed for the third middle decryption/authentication value TV and the incrementing function Δ n+1  so as to generate a second ending vector EV′. The process of the encryption and the decryption is correct if the first ending vector EV is equal to the second ending vector EV′. 
         [0025]    Referring to  FIG. 3 , it is a schematic view of the method for authenticated encryption and decryption according to a third embodiment of the present application. As shown in part (a) of the  FIG. 3 , the first input encryption parameter A i  of the i-th path of the n encryption paths and the p encryption/authentication paths comprises the i-th output ctr, of a counter, 1≦i≦n+p, and 2≦p. In the last (n−p) paths of the n encryption paths, the Exclusive OR logic computation is performed for the first input encryption parameter A p+d  and the function f(M d ) with the input parameter of the plain text M d , so as to generate a first middle encryption value B p+d , wherein f(M d ) may comprise the plain text M d  and 1≦d≦(n−p). Using a block encryption EK to encrypt B t  so as to generate a second middle encryption value F t , 1≦t≦n. The computation of shift register is performed for the second middle encryption value F t  of the n encryption paths, so as to generate a third middle encryption value O t . The Exclusive OR logic computation is performed for the third middle encryption value O t  of the n encryption paths and the binary plain text M t , so as to generate the cipher text C t . In the p encryption/authentication paths, the Exclusive OR logic computation is performed for the first encryption/authentication parameter A n+j  and the function f(M n−p+j ) with the input parameter of the plain text M n−p+j , so as to generate the first middle encryption/authentication value BV j , wherein f(M n−p+j ) may comprise the plain text M n−p+j , 1≦j≦p. Using a block encryption EK to encrypt the first middle encryption/authentication value BV j  so as to generate a second middle encryption/authentication value FV j . A shift logic computation is performed for the second middle encryption/authentication value FV j  so as to generate the cipher text C n+j . 
         [0026]    As shown in part (b) of the  FIG. 3 , the t-th output of a counter is provided to the t-th path of the n decryption paths, 1≦t≦n. In the last (n−p) paths of the n decryption paths, the Exclusive OR logic computation is performed for the first input decryption parameter ctr p+d  and the function f(M d ) with the input parameter of decrypted plain text M d , so as to generate a first middle decryption value K p+d , wherein f(M d ) may comprise the decrypted plain text M d , 1≦d≦(n−p). Next, using a block encryption EK to decrypt a first middle decryption value K t  so as to generate a second middle decryption value L t . The computation of shift register is performed for the second middle decryption value L t  so as to generate the third middle decryption value S t . The Exclusive OR logic computation is performed for the third middle decryption value S t  and the cipher text C t  so as to generate the decrypted plain text M t . The (n+j)-th output ctr n+j  of the counter is provided to the j-th path of the p decryption/authentication paths, 1≦j≦p. The Exclusive OR logic computation is performed for the ctr n+j  and the function f(M n−p+j ) with the input parameter of the decrypted plain text M n−p+j , so as to generate the first middle decryption/authentication value KV j , wherein f(M n−p+j ) may comprise the plain text M n−p+j . Next, using a block encryption EK to decrypt the first middle decryption value KV j  so as to generate a second middle decryption/authentication value LV j . A computation of shift register is perform for the second middle decryption/authentication value LV j  so as to generate the authenticated cipher text C n+j ′, 1≦j≦p. The process of the encryption and the decryption is correct if the cipher text C n+j  is equal to the authenticated cipher text C n+j ′. In the method for authenticated encryption and decryption, the value p may determine the maximum scale of parallel processing of a processor to achieve the effect for authenticated encryption and decryption in real-time streams. 
         [0027]    Referring to  FIG. 4 , it is a schematic view of the method for authenticated encryption and decryption according to a fourth embodiment of the present application. As shown in part (a) of the  FIG. 4 , the first input encryption parameter of the n encryption paths and the i-th path of the p encryption/authentication paths comprises an incrementing function Δ i , 1≦i≦n+p and 2≦p. In the last (n−p) paths of the n decryption paths, the Exclusive OR logic computation is performed for the incrementing function Δ p+d  and the function f(M d ) with the input parameter of the plain text M d  so as to generate a first middle encryption value B p+d , wherein f(M d ) may comprise the plain text M d , 1≦d≦(n−p). Using a block encryption EK to encrypt B t  so as to generate a second middle encryption value F t , 1≦t≦n. The Exclusive OR logic computation is performed for the second middle encryption value F t  and the incrementing function Δ t  so as to generate a third middle encryption value O t . The computation of shift register is performed for the third middle encryption value O t  so as to generate the fourth middle encryption value E t . The Exclusive OR logic computation is performed for the fourth middle encryption value E t  and a plain text M t  so as to generate the cipher text C t . In the p encryption/authentication paths, the Exclusive OR logic computation is performed for the incrementing function Δ n+j  and the function f(M n-31 p+j ) with the input parameter of the plain text M n−p+j  so as to generate the first middle encryption/authentication value BV j , wherein f(M n−p+j ) may comprise the plain text M n−p+j , 1≦j≦p. Using a block encryption EK to encrypt the first middle encryption/authentication value BV j  so as to generate a second middle encryption/authentication value FV j . The Exclusive OR logic computation is performed for the second middle encryption/authentication value FV j  and an incrementing function Δ n+j , so as to generate a third middle encryption/authentication value UV j . A computation of shift register is performed for the third middle encryption/authentication value UV j  so as to generate the cipher text C n+j . 
         [0028]    As shown in part (b) of the  FIG. 4 , an incrementing function Δ t  is provided to the t-th path of the n decryption paths, 1≦t≦n. In the last (n−p) paths of the n decryption paths, the Exclusive OR logic computation is performed for the incrementing function Δ p+d  and the function f(M d ) with the input parameter of the plain text M d  so as to generate a first middle decryption value K p+d , wherein f(M d ) may comprise the plain text M d , 1≦d≦(n−p). Using a block encryption EK to decrypt K t  so as to generate a second middle decryption value L t . The Exclusive OR logic computation is performed for the second middle decryption value L t  and the incrementing function Δ t  so as to generate a third middle decryption value S t . Performing the computation of shift register for the third middle decryption value S t  so as to generate the fourth middle decryption value F t . The Exclusive OR logic computation is performed for the fourth middle decryption value Ft and the cipher text C t  so as to generate the decrypted plain text M t . In the p encryption/authentication paths, the Exclusive OR logic computation is performed for the incrementing function Δ n+j  of a first input decryption/authentication parameter and the function f(M n−p+j ) with the input parameter of the decrypted plain text M n−p+j  so as to generate the first middle decryption/authentication value KV j , wherein f(M n−p+j ) may comprise the decrypted plain text M n−p+j . Next, using a block encryption EK to decrypt KV j  so as to generate a second middle decryption/authentication value LV j . The Exclusive OR logic computation is performed for the second middle decryption/authentication value LV j  and an incrementing function Δn+j, so as to generate a third middle encryption/authentication value MV n+j , 1≦j≦p. The computation of shift register is perform for the third middle decryption/authentication value MV n+j , so as to generate the authenticated cipher text C n+j ′. The process of the encryption and the decryption is correct if the cipher text C n+j  is equal to the authenticated cipher text C n+j ′, 1≦j≦p. In the method for authenticated encryption and decryption the value p may determine the maximum scale of parallel processing of a processor to achieve the effect for authenticated encryption and decryption in real-time streams. 
         [0029]    The above-mentioned descriptions represent merely the exemplary embodiment of the present disclosure, without any intention to limit the scope of the present disclosure thereto. Various equivalent changes, alternations or modifications based on the claims of present disclosure are all consequently viewed as being embraced by the scope of the present disclosure.