Abstract:
This invention discloses a symmetric encryption/decryption method with asymmetric keys processed by diffusion algebra, and more particularly to a multiplication method using one-dimensional matrix displacement and addition to generate a ciphertext by multiplying a public (or private) key with a plaintext or obtain the plaintext by multiplying the private (or public) key with the ciphertext.

Description:
BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     The present invention relates to a symmetric encryption/decryption method with asymmetric keys processed by diffusion algebra, and more particularly to a multiplication method using one-dimensional matrix displacement and addition to generate a ciphertext by multiplying a public (or private) key with a plaintext or obtain the plaintext by multiplying the private (or public) key with the ciphertext. 
     2. Description of the Related Art 
     A prior art asymmetric encryption/decryption method generates a public key and a private key by two large prime numbers, so as to generate a ciphertext by taking the power of a public (or private) key and obtain the plaintext from the power of the ciphertext. The key safety point of the prior art emphasizes on the product of two large prime numbers, because such value cannot be decoded or restored to prime numbers within a short time, so as to enhance the safety for matching the public and private keys. 
     SUMMARY OF THE INVENTION 
     The prior art adopts a power operation, and an increase of the power value of the plaintext varies exponentially with the processing time. Therefore, it is necessary to increase the power value in order to improve the safety, and the length of the plaintext cannot be too long, and it takes even longer time to complete processing the plaintext with an increase of length. 
     The technical measures taken by the present invention for solving the issues are described as follows: 
     The operations of diffusion algebra are used to select a matched pair of public key and private key, and the public (or private) key is multiplied with a plaintext to generate a ciphertext, and the private (or public) key is multiplied with the ciphertext to obtain the plaintext. 
     Compared with the prior art, the differences of the present invention from the prior art reside on that: 
     1. Prime Number: The prime number used in the prior art is defined as an integer indivisible by any other integer smaller than that integer and requires some time to obtain the value, and the prime number used in the present invention is easily to obtain. For example, if the length of the prime number is equal to 2 to the power of at least one, the prime number will have an odd number of 1s. 
     2. Modulus: The prior art includes the operation of a modulus to restrict the content of the plaintext not greater than the modulus, and the present invention does not use the operation of modulus, and thus has no such limitation. 
     3. Operation: The prior art adopts a power operation or a multi-multiplication, and the present invention directly adopts the multiplication operation, which takes only one multiplication to provide a quick processing. 
    
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         FIG. 1  is a flow chart of a public key and a private key according to the present invention; and 
         FIG. 2  is a flow chart of an encryption and a decryption according to the present invention. 
     
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     The asymmetric encryption/decryption method of the present invention directly uses the multiplication of diffusion algebra comprising: 
     Symbols and Definition of Diffusion Algebra: 
     S indicates a one-dimensional binary matrix having n positions, where n&gt;0. The position label is shown below: 
     
       
         
               
               
               
               
               
               
               
             
           
               
                   
                   
               
             
             
               
                   
                 n − 1 
                 n − 2 
                 n − 3 
                 . . . 
                 1 
                 0 
               
               
                   
                   
               
             
          
         
       
     
     e i  indicates an element, and the value at the i-th position label of S is 1, and the rest are 0. 
     For example, (a) e 0 : [0 0 0 . . . 0 1] (b) e n−1 : [1 0 0 . . . 0 0] 
     ● indicates a null element, and the values of S are all 1 or all 0. 
     For example, (a) ●: [0 0 0 . . . 0 0] (b) ●: [1 1 1 . . . 1 1]
         ⊕ indicates an addition: Two matrixes are added by diffusion.   For example, (a) e i ⊕e i =*(b) S⊕●=S   {circle around (x)} indicates a multiplication: Two matrixes are multiplied by diffusion.   For example, (a) e i {circle around (x)}e j =e i+j  (b) S{circle around (x)}●=●
 
(c) ( e   i   ⊕e   j ){circle around (x)} e   k   =e   i+k   ⊕e   j+k  (d)  e   i   =e   i mod n   ,i≧n  
   S i  indicates S to the power of i.
           For example, (a) S 0 =S (b) S 1 =S{circle around (x)}S (c) S i {circle around (x)}S j =S i+j+1  
 
(d) ( S   i ) j   =S   (i+1)×(j+1)−1  
   
           T indicates a recurring period, S T =S   For example, (a) e 0   1 =e 0 , (b) e n−1   n =e n−1      indicates a prime number, S T−1 =e 0      For example, (a) e i ∈P (b) e i {circle around (x)}e j ∈P (c) e i ⊕e j ∉P       

     Public Key and Private Key: 
     The length of a matched pair of public key (e) and private key (d) is n, and assumed T=n, its generation comprises the following steps as shown in  FIG. 1 .
 
p,q∈P, and p≠q, and p 2 ≠p, q 2 ≠q;  (1)
 
 e{circle around (x)}d= ( p{circle around (x)}q ) n−1 ;  (2)
 
 e=p{circle around (x)}q   n−2   , d=p   n−2   {circle around (x)}q;   (3)
 
     Encryption and Decryption: 
     In the structure of diffusion algebra, the product of two numbers cannot be divided by one of the two numbers and must be factorized by multiplying a corresponding third number, which corresponds to the matched pair of public and private keys as shown in  FIG. 2 :
 
 C=M{circle around (x)}e ; (Plaintext Encryption)  1
 
 M=C{circle around (x)}d ; (Ciphertext Decryption)  2.
 
     Examples of Encryption and Decryption: 
     To make it easier for our examiner to understand the content of the present invention, the following diffusion multiplication, public key and private key, encryption and decryption, 128-bits and 240-bit embodiments are described in details. 
     Let a one-dimensional 8-bit matrix be p=[10011101], q=[11011010]: 
     By Diffusion Multiplication:
 
 p{circle around (x)}q=p{circle around (x)} ( e   7   ⊕e   6   ⊕e   4   ⊕e   3   {circle around (+)}e   1 )= p{circle around (x)}e   7   ⊕p{circle around (x)}e   6   ⊕p⊕e   4   ⊕p{circle around (x)}e   3   ⊕p{circle around (x)}e   1 =[11001110]⊕[1100111]⊕[11011001]⊕[11101100]⊕[00111011]=[10100111]
 
     Public Key and Private Key:
 
 e=p{circle around (x)}q   n−2   =p{circle around (x)}q   6 =[10011101]{circle around (x)}[11000001]=[00110100]
 
 d=p   n−2   {circle around (x)}q=p   6   {circle around (x)}q=[ 11011001]{circle around (x)}[11011010]=[01111010]
 
     Encryption and Decryption:
 
 M=[ 00110111]
 
 C=M{circle around (x)}e=[ 00110111]{circle around (x)}[00110100]=[01001001]
 
 M=C{circle around (x)}d=[ 01001001]{circle around (x)}[01111010]=[00110111]
 
     In the 128-bit Embodiment, Public Key and Private Key: 
     The length of 128 bits is equal to 2 to the power 8, and the prime number (P) is selected to have an odd number of is to comply with the conditions, and it is easy to obtain. The recurring period (T) is set directly to the length of 128 bits. 
     p: Prime Number
         1110000011110100001110111001010101100111 0001111001110000001010101011100000011100 1110110110010000011001111111011101011010 00110110       

     q: Prime Number
         0111000111010000101101100001111000000100 111111101011011110111100001001101010111 1000100111011011100111110011000111110111 00100001       

     e: Public Key p{circle around (x)}q 128−2  
         1000100000100101001110001011111100101100 1001001010000001011001010001000101101010 1101100100110001001100100110011000000001 11111100       

     d: Private Key p 128−2 {circle around (x)}q
         0110000101011110001100101110011000010000 0000110000100000001100100110101101000010 1111110101100110111001110000001100000011 10101111       

     Encryption and Decryption: 
     M: Plaintext
         0011110110010110110101010111000100010010 1000001100001101001111000010101000010101 1010001101001001010000101111001011100101 11001100       

     C: Encrypt C=M{circle around (x)}e
         1110011011000101000101011100111011001011 1101100111010111110101010111010001010000 1100001111101010101010011101011011111001 01000011       

     M: Decrypt M=C{circle around (x)}d to obtain the plaintext. 
     For 240-bit embodiment, Public Key and Private Key: 
     The length of 240 bits is not in the form of a power of 2, and the prime number(P) is selected to have an odd number of 1s and S T−1 =e 0  and the prime number is searched. The recurring period (T) is set directly to the length of 240 bits. 
     p: Prime Number
         0010101010000001010110011010010000111011 1010011000001011011011000111000011111111 1000010111110011001000001101011011110110 0101001110010001110110110001100111110110 0111100100111111010111001110010000001001 1011000111010101111111101001111011011010       

     q: Prime Number
         0110110111110110010110110100101001010111 0000100001111111100110111001100111100011 1101010101110011111000101000001101010100 1111001011101101000110011001001010001011 0011101100001110011100011010010000101110 1010011111110100111010111100001011011101   e: Public Key p{circle around (x)}q 240−2      1011110011011011111101100000111110111010 0000111110000100110110010011011010111000 0101000100110000010010010011110000000001 0110000100100101011110011010010100001110 1101011101110110000111000111001111110011 0101101101000001000111010110000011010110       

     d: Private Key P 240−2 {circle around (x)}q
         1011001000011111001001011011010101010111 1011000010111001010111111111010101111011 1100010000000101111111001110101111010001 0011001010111010101000001011000000111001 0110100101110011101110001011010100100101 1110010111111101101101010001101101001111       

     Encryption and Decryption: 
     M: Plaintext
         1010100000010100110110110110100000100101 1000000011111101110100100110101001000000 1101001000110101100000111110101111100110 0101011000101000000001111111101110010111 0001101110110000111010100001001010001110 1100110011000001001111011001000111110000       

     C: Encrypt C=M{circle around (x)}e
         1011000011010010101100001101001100000111 0001100011011011101110001101011001000100 0100101010011010011001100011100110100101 0111111100100100111001101100011100110010 0010011001000111001010010011010010000110 0001001110001111010000110011110001101110       

     M: Decrypt M=C{circle around (x)}d to obtain the plaintext. 
     In this preferred embodiment, the applied multiplication of diffusion algebra is not reversible, and division does not exist in diffusion algebra. Once if a plaintext is multiplied by a key, then the plaintext cannot be restored. Further, a new prime number generated by taking the power of a prime number cannot be restored to the original prime number. In other words, a matched pair of keys, a key cannot be used to compute another key. Finally, two numbers are multiplied by displacement and addition to expedite the processing. With the risk of safety taken into consideration, we can easily increase the bit length of the keys. 
     While the invention has been described by means of specific embodiments, numerous modifications and variations could be made thereto by those skilled in the art without departing from the scope and spirit of the invention set forth in the claims.