This application claims priority of Taiwanese Application No. 098106652, filed on Mar. 2, 2009.
1. Field of the Invention
The invention relates to a signal transmission technique, more particularly to a communication system, and an encoding device and a decoding device thereof.
2. Description of the Related Art
As shown in
However, the conventional communication system 900 is only capable of ensuring, to a certain degree, accuracy of signal transmission, but cannot protect the message from unauthorized access. In other words, the conventional communication system 900 does not provide an encryption method such that any receiver in an open transmission environment may possibly intercept the message, resulting in a high safety uncertainty.
Therefore, the object of the present invention is to provide a communication system that can alleviate the aforesaid drawbacks of the prior art.
According to the present invention, there is provided a communication system that includes an encoding device and a decoding device. The encoding device includes an encrypting module adapted for encrypting an original signal into an encrypted signal, and an error correction encoding module coupled to the encrypting module for receiving the encrypted signal therefrom, and generating an output signal by performing error correction encoding on the encrypted signal. The decoding device includes an error correction decoding module and a decrypting module. The error correction decoding module is adapted for receiving an input signal via a transmission channel. The input signal is the output signal generated by the error correction encoding module as affected by noise during transmission via the transmission channel. The error correction decoding module generates a recovery signal from the input signal by performing error correction decoding on the input signal. The decrypting module is coupled to the error correction decoding module for receiving the recovery signal therefrom, and generates a decrypted signal that corresponds to the original signal by decrypting a portion of the recovery signal.
According to another aspect of the present invention, there is provided the aforesaid encoding device.
According to yet another aspect of the present invention, there is provided the aforesaid decoding device.
Other features and advantages of the present invention will become apparent in the following detailed description of the preferred embodiment with reference to the accompanying drawings, of which:
With reference to
The encrypting module 1 is adapted for encrypting an original signal into an encrypted signal. The error correct ion encoding module 2 is coupled to the encrypting module 1 for receiving the encrypted signal therefrom, and generates an output signal by performing error correction encoding on the encrypted signal. Therefore, the output signal is not only protected by encryption, but also has better anti-noise ability during transmission.
The error correction decoding module 3 of the decoding device 200 receives an input signal via a transmission channel 8, and generates a recovery signal from the input signal by performing error correction decoding on the input signal. The input signal is the output signal generated by the error correction encoding module 2 as affected by noise during transmission via the transmission channel 8. The decrypting module 4 is coupled to the error correction decoding module 3 for receiving the recovery signal therefrom, and generates a decrypted signal that corresponds to the original signal by decrypting the recovery signal.
With reference to
C=MemodN (Formula 1)
where “mod” denotes the mathematical operation of finding a remainder after a division operation, (C) denotes a modulus signal, and (M) denotes the original signal.
The encrypting module 1 includes a computing unit 11, a controller 12, and a first multiplexer 13. The computing unit 11 is adapted for receiving the original signal, the public key (N), and a multiplexer output signal. The controller 12 is coupled electrically to the computing unit 11, and is adapted for receiving the bits (eh-1, eh-2, . . . , e1, e0) of the encryption key (e) in sequence from the most significant bit (eh-1) to the least significant bit (e0). The first multiplexer 13 is coupled electrically to the controller 12 and the computing unit 11, is adapted for receiving the original signal and the modulus signal, and is controlled by the controller 12 to output the multiplexer output signal.
For each bit received by the controller 12 and determined by the controller 12 to be a bit other than the most significant bit (eh-1), the controller 12 controls the computing unit 11 to perform modulus computation processing for generating the modulus signal with reference to the original signal, the public key (N), and the multiplexer output signal. To carry out encryption according to Formula 1, the modulus computation processing is computed according to at least one of the following Formulae 2 and 3:
C=C×CmodN (Formula 2)
C=C×MmodN (Formula 3)
where (C) represents the modulus signal, and (M) represents the original signal.
When the bit received is a second most significant bit (eh-2) of the encryption key (e), the controller 12 controls the first multiplexer 13 to output one of the original signal and a predetermined signal as the multiplexer output signal according to a value of the most significant bit (eh-1) of the encryption key (e), and controls the computing unit 11 to perform the modulus computation processing according to a first modulus computation for generating the modulus signal with reference to the multiplexer output signal and the public key (N). The predetermined signal is a signal representing “binary 1” in this embodiment. The first modulus computation is conducted according to the abovementioned Formula 2.
When the bit received is the second most significant bit (eh-2) and when a value of the second most significant bit (eh-1) matches a predetermined value, which is “binary 1” in this embodiment, the controller 12 further controls the first multiplexer 13 to output the modulus signal generated according to the first modulus computation as the multiplexer output signal, and further controls the computing unit 11 to perform the modulus computation processing according to a second modulus computation for generating the modulus signal with reference to the original signal, the public key (N), and the multiplexer output signal. The second modulus computation is conducted according to the abovementioned Formula 3.
When the bit received is a bit other than the most significant bit (eh-1) and the second most significant bit (eh-2) of the encryption key (e), the controller 12 controls the first multiplexer 13 to output the modulus signal as the multiplexer output signal, controls the computing unit 11 to perform the modulus computation processing according to the first modulus computation with reference to the multiplexer output signal and the public key (N), and further controls the computing unit to perform the modulus computation processing according to the second modulus computation for generating the modulus signal with reference to the original signal, the public key (N), and the multiplexer output signal when a value of the bit matches the predetermined value and after the modulus computation processing according to the first modulus computation is completed.
Upon determining that the bit received is the least significant bit (e0) of the encryption key (e), the controller 12 enables the computing unit 11 to output the modulus signal as the encrypted signal upon completion of the modulus computation processing according to the first modulus computation when a value of the least significant bit (e0) does not match the predetermined value, and upon completion of the modulus computation processing according to the second modulus computation when the value of the least significant bit (e0) matches the predetermined value.
For purpose of illustration, it is assumed that the original message is decimal “13”, the encryption key (e) is binary “1011”, and the public key (N) is decimal “35”. The process of encrypting the original signal into the encryption signal according to the preferred embodiment of the present invention is tabulated in Table 1.
In this embodiment, the computing unit 11 includes a second multiplexer 111, a multiplier 112, and a modulus signal computing sub-unit 113.
The second multiplexer 111 is adapted for receiving the original signal, is coupled electrically to the first multiplexer 13 for receiving the multiplexer output signal therefrom, and is further coupled electrically to the controller 12. The second multiplexer 111 is controlled by the controller 12 to output the multiplexer output signal as a multiplier input signal during the first modulus computation, and to output the original signal as the multiplier input signal during the second modulus computation.
The multiplier 112 is coupled electrically to the first and second multiplexers 13, 111 for respectively receiving the multiplexer output signal and the multiplier input signal therefrom, and provides a multiplier output corresponding to a product of the multiplexer output signal and the multiplier input signal.
The modulus signal computing sub-unit 113 is coupled electrically to the multiplier 112 for receiving the multiplier output therefrom, and computes the modulus signal with reference to the multiplier output thus received and the public key (N). In this embodiment, the modulus signal computing sub-unit 113 includes a shift register 114, a comparator 115 and a subtracter 116. The shift register 114 includes a first half 117 and a second half 118. Each of the first and second halves 117, 118 includes (R) number of cascaded storage members 119, where (R) is a positive integer. An output of an (N)th one of the storage members 119 is coupled electrically to an input of an (N+1)th one of the storage members 119, where (N) is a positive integer ranging between 1 and (R−1). An output of the (R)th one of the storage members 119 of the first half 117 is coupled electrically to an input of the first one of the storage members 119 of the second half 118. The first half 117 is coupled electrically to the multiplier 112 for receiving the multiplier output therefrom in a first period during the modulus computation processing. The multiplier output is expressed in (R) number of bits, and each bit of the multiplier output is stored in a corresponding one of the storage members 119. Content in each of the storage members 119 is outputted to a subsequent one of the storage members 119 in each of a second period to a (R+1)th period during the modulus computation processing. The comparator 115 is coupled electrically to the second half 118 of the shift register 114 for extracting content in the second half 118 during each of the second period to the (R+1)th period, and determines whether the content is smaller than the public key (N). The subtracter 116 is coupled electrically to the second half 118 of the shift register 114 for extracting the content in the second half 118, and is further coupled electrically to the comparator 115. The subtracter 116 is enabled to subtract the content by the public key (N) and to update the content with result of the subtraction when it is determined by the comparator 115 that the content is not smaller than the public key (N). The second half 118 of the shift register 114 is coupled electrically to the first multiplexer 13, and outputs the content therein as the modulus signal to the first multiplexer 13 when the (R+1)th period has elapsed upon completion of the modulus computation processing.
With reference to
In particular, the error correction encoding module 2 generates the output signal according to the following Formulae 4 and 5.
p(x)=xn-k·C(x)modg(x) (Formula 4)
TX(x)=p(x)+xn-k·C(x) (Formula 5)
where p(x) denotes an encoding modulus polynomial, xn-k denotes a first predetermined polynomial, C(x) denotes an encrypted polynomial that is representative of the encrypted signal, g(x) denotes a second predetermined polynomial, and TX(x) denotes an output polynomial that is representative of the output signal. The second predetermined polynomial g(x) is also referred to as a Reed-Solomon generator polynomial, is defined in a finite field (or Galois Field) of order 2m, which is denoted by GF(2m), and which has 2m number of elements, namely, 0, α0, α1, α2, . . . , αn-1. The second predetermined polynomial g(x) has (n-k) number of roots, namely α1, α2, . . . , αn-k, and is defined as g(x)=(x+α1)(x+α2) . . . (x+αn-k).
The multiplier 21 is coupled electrically to the encrypting module 1 for receiving the encrypted signal therefrom. The multiplier 21 multiplies the encrypted polynomial C(x) with the first predetermined polynomial xn-k so as to generate a multiplication polynomial xn-kC(x). 7
The modulus computing unit 22 is coupled electrically to the multiplier 21 for receiving the multiplication polynomial xn-kC(x) therefrom, and determines a remainder of the multiplication polynomial xn-kC(x) divided by the second predetermined polynomial g(x) so as to generate the encoding modulus polynomial p(x)
The combining unit 23 is coupled electrically to the multiplier 21 and the modulus computing unit 22 for respectively receiving the multiplication polynomial xn-kC(x) and the encoding modulus polynomial p(x) therefrom, and combines the multiplication polynomial xn-kC(x) with the encoding modulus polynomial p(x) so as to generate the output polynomial TX(x).
Computation of the encoding modulus polynomial p(x) will now be described. In this embodiment, the modulus computing unit 22 includes a dividing sub-unit 221, a lookup table 222, and a combining sub-unit 223. The dividing sub-unit 221 is coupled electrically to the multiplier 21 for receiving the multiplication polynomial xn-kC(x) therefrom, and determines a quotient of the multiplication polynomial xn-kC(x) divided by the second predetermined polynomial g(x) so as to generate an encoding quotient polynomial q(x). The lookup table 222 is coupled electrically to the dividing sub-unit 221 for receiving the encoding quotient polynomial q(x) therefrom, and outputs a multiple polynomial q(x)g(x) that is representative of a product of the encoding quotient polynomial q(x) and the second predetermined polynomial g(x). The combining sub-unit 223 is coupled electrically to the multiplier 21 and the lookup table 222 for respectively receiving the multiplication polynomial xn-kC(x) and the multiple polynomial q(x)g(x) therefrom, and generates the encoding modulus polynomial p(x) by subtracting the multiple polynomial q(x)g(x) from the multiplication polynomial xn-kC(x). In this embodiment, the combining sub-unit 223 is a logic XOR gate.
For purpose of illustration, assuming that the encrypted signal is (0001, 0001, 0001, 0001, 0001, 0001, 0001, 0001, 0001) with nine 4-bit symbols (i.e., k=9, and m=4), then n=2m−1=24−1=15, and the finite field is GF(24). The encrypted polynomial C(x) representative of the encrypted signal is defined as C(x)=α0x8+α0x7+α0x6+α0x5+α0x4+α0x3+α0x2+α0x1+α0. The first predetermined polynomial xn-k is x6, and the second predetermined polynomial g(x) has n-k=15−9=6 number of roots, namely α1, α2, . . . , α6, and is g(x)=(x+α1)(x+α2) . . . (x+α6)=α0x6+α10x5+α14x4+α4x3+α6x2+α9x1+α6.
Then, the process of encoding the encrypted signal into the output signal is as follows. First, the multiplier 21 multiplies the encrypted polynomial C(x) with the first predetermined polynomial x6 so as to generate the multiplication polynomial xn-kC(x)=x6C(x)=α0x14+α0x13+α0x12+α0x11+α0x10+α0x9+α0x8+6α0x7+α0x. Second, the modulus computing unit 22 determines the remainder of the multiplication polynomial x6C(x) divided by the second predetermined polynomial g(x) so as to generate the encoding modulus polynomial p(x)=α0x5+α0x4+α0x3+α0x2+α0x1+α0x0. Lastly, the combining unit 23 combines the multiplication polynomial x6C(x) with the encoding modulus polynomial p(x) so as to generate the output polynomial TX(x)=α0x14+α0x13+α0x12+α0x11+α0x10+α0x9+α0x8+α0x7+α0x6+α0x5+α0x4+α0x3+α0x2+α0x1+α0. The output signal represented by the output polynomial is (0001, 0001, 0001, 0001, 0001, 0001, 0001, 0001, 0001, 0001, 0001, 0001, 0001, 0001, 0001) with fifteen 4-bit symbols.
With reference to
The syndrome determining unit 30 receives the input signal which is the output signal generated by the error correction encoding module 2 as affected by noise during transmission via the transmission channel 8 (as shown in
With further reference to
Each syndrome term is generated by substituting the Corresponding one of the (n-k) number of roots α1, α2, . . . , αn-k of the second predetermined polynomial g(x) into the input polynomial RX(x), and the syndrome terms can be denoted by RX(α1), RX(α2), . . . , RX(αn-k). In particular, the syndrome term generator 32 includes a power generator 35, a lookup table 36, and a combining sub-unit 37. The power generator 35 is coupled electrically to the first shift register 31 for receiving in sequence the (n) number of terms of the input polynomial RX(x), and generates, for each of the (n) number of terms of the input polynomial RX(x), a power signal corresponding to each of the (n-k) number of roots α1, α2, . . . , αn-k of the second predetermined polynomial g(x) with reference to power numbers of the corresponding one of the roots of the second predetermined polynomial g(x) and the corresponding one of the terms of the input polynomial RX(x). The power signal represents the power number of the corresponding term of the input polynomial RX(x) as substituted by the corresponding root αβ of the second predetermined polynomial g(x) and having a base a identical to that of the roots α1, α2, . . . , αn-k of the second predetermined polynomial g(x), where 1≦β≦(n-k). The lookup table 36 is coupled electrically to the first shift register 31 for receiving in sequence the (n) number of terms of the input polynomial RX(x), is further coupled electrically to the power generator 35 for receiving the power signal therefrom, and outputs, for each of the (n) number of terms of the input polynomial RX(x), an intermediate term signal representative of a corresponding one of the (n) number of terms of the input polynomial RX(x) as substituted by a corresponding one of the (n-k) number of roots α1, α2, . . . , αn-k of the second predetermined polynomial g(x). The combining sub-unit 37 is coupled electrically to the lookup table 36 for combining the intermediate term signals for all of the (n) number of terms of the input polynomial RX(x) and corresponding to the same one of the (n-k) number of roots α1, α2, . . . , αn-k so as to result in the syndrome term RX(α1), RX(α2), . . . , RX(αn-k) for the corresponding one of the (n-k) number of roots α1, α2, . . . , αn-k to be stored in a corresponding one of the (n-k) number of cascaded storage members 330 of the second shift register 33.
Furthermore, the power generator 35 includes a root power detector 351, an input polynomial term power detector 352 coupled electrically to the first shift register 31 for receiving in sequence the (n) number of terms of the input polynomial RX(x), and a multiplier 353 coupled electrically to the root power detector 351 and the input polynomial term power detector 352. During computation of each power signal, the root power detector 351 detects the power number of the corresponding one of the roots α1, α2, . . . , αn-k of the second predetermined polynomial g(x), the input polynomial term power detector 352 detects the power number of the corresponding one of the terms of the input polynomial RX(x), and the multiplier 353 multiplies these two power numbers together so as to generate the power signal.
For purpose of illustration, the previous example is used for the following description, where the output signal represented by the output polynomial is (0001, 0001, 0001, 0001, 0001, 0001, 0001, 0001, 0001, 0001, 0001, 0001, 0001, 0001, 0001) with fifteen 4-bit symbols. Due to noise interference during transmission via the transmission channel 8 (shown in
The process of determining the syndrome polynomial S(x) is as follows. First, the storage members 310 of the first shift register 31 respectively store the terms α0, α11, α0, α0, α0, α0, α0, α0, α8, α3, α0, α0, α0, α0, α0 of the input polynomial RX(x). The syndrome term generator 32 generates in sequence the syndrome terms respectively corresponding to the (n-k) number of roots α1, α2, . . . , αn-k of the second predetermined polynomial g(x). In this embodiment, each syndrome term is generated in a loop with cycles equal in number to the terms of the input polynomial RX(x), where a corresponding term of the input polynomial RX(x) as substituted by the root αβ (1≦β≦(n-k)) of the second predetermined polynomial g(x) corresponding to the syndrome term is computed during each cycle, and the results of all the terms of the input polynomial RX(x) as substituted by the same root αβ of the second predetermined polynomial g(x) are summed to result in the syndrome term, which is subsequently stored in the corresponding storage member 330 of the second shift register 33 upon completion of last cycle of the loop.
As mentioned previously, the second predetermined polynomial g(x) in this example has n-k=15−9=6 number of roots, namely α1, α2, . . . , α6. Therefore, there are six syndrome terms in total, respectively being RX(α1)=α0, RX(α2)=α5, RX(α3)=α4, RX(α4)=α11, RX(α5)=α9, and RX(α6)=α13. These syndrome terms are respectively stored in the storage members 330 of the second shift register 33. The second shift register 33 outputs the syndrome terms when it is determined by the controller 34 that all of the roots of the second predetermined polynomial g(x) have been used for computing the syndrome terms. The syndrome terms cooperate to define the syndrome polynomial S(x), which is S(x)=RX(α1)+RX(α2)x1+RX(α3)x2+RX(α4)x3+RX(α5)x4+RX(α6)x5=α13x5+α9x4+α11x3+α4x2+α5x1+α0 in this example.
Referring back to
Z
−1(x)=xn-k (Formula 7)
Z
0(x)=S(x) (Formula 8)
V
−1(x)=0 (Formula 9)
V
0(x)=1 (Formula 10)
Z
i-2(x)=qi(x)·Zi-1(x)+Zi(x) (Formula 11)
V
1(x)=Vi-2(x)−qi(x)·Vi-1(x) (Formula 12)
With further reference to
The first register 51 initially stores the reference polynomial xn-k as the first polynomial Zi-2(x), and is coupled electrically to the second register 52 for updating the first polynomial Zi-2(x) with the second polynomial Zi-1(x).
The second register 52 is coupled electrically to the syndrome determining unit 30 for receiving and initially storing the syndrome polynomial S(x) as the second polynomial Zi-1(x), and is coupled electrically to the dividing sub-unit 53 for updating the second polynomial Zi-1(x) with the location modulus polynomial Zi(x). The second polynomial Zi-1(x) is outputted as the error value polynomial Zi(x) when an order of the second polynomial Zi-1(x) is smaller than (n-k)/2.
The dividing sub-unit 53 further determines a quotient of the first polynomial Zi-2(x) divided by the second polynomial Zi-1(x) so as to generate a location quotient polynomial qi(x). The error information determining unit 40 further includes an error location polynomial generator 60 that includes a third register 61, a fourth register 62, a lookup table 63, and a combining sub-unit 64. The combining sub-unit combines a third polynomial Vi-2(x) stored in the third register 61 with a location multiple polynomial so as to result in a sum polynomial Vi(x).
The lookup table 63 is coupled electrically to the dividing sub-unit 53 of the error value polynomial generator 50 for receiving the location quotient polynomial qi(x) therefrom, generates the location multiple polynomial that is representative of the product of a fourth polynomial Vi-1(x) stored in the fourth register 62 and the location quotient polynomial qi(x) and that is to be outputted to the combining sub-unit 64. In other words, the location multiple polynomial is denoted by qi(x)·Vi-1(x). The third register 61 initially stores zero as the third polynomial Vi-2(x), and is coupled electrically to the fourth register 62 for updating the third polynomial Vi-2(x) with the fourth polynomial Vi-1(x).
The fourth register 62 initially stores one as the fourth polynomial Vi-1(x), and is coupled electrically to the combining sub-unit 69 for updating the fourth polynomial Vi-1(x) with the sum polynomial V(x). The fourth polynomial Vi-1(x) is outputted as the error location polynomial Vi(x) when an order of the fourth polynomial is smaller than (n-k)/2.
Continuing with the previous example, where the syndrome polynomial S(x) is S(x)=α13x5+α9x4+α11x3+α4x2+α5x1+α0. The process of determining the error location polynomial Vi(x) and the error value polynomial Zi(x) according to the preferred embodiment of the present invention is tabulated in Table 2.
With reference back to
With further reference to
The root determining sub-unit 72 is coupled electrically to the dividing sub-unit 71 for receiving the location intermediate polynomial or(x) therefrom, and generates a test result for each of the (n) number of nonzero elements α0, α1, α2, . . . αn-1 of the finite field GF(2m) by substituting a corresponding one of the (n) number of nonzero elements α0, α1, α2, . . . , αn-1 into the location intermediate polynomial σ(x). In other words, the test result is σ(αβ) where 0≦β≦(n-1). The root determining sub-unit 72 outputs the corresponding nonzero element αβ as a corresponding error location reversal element when the test result σ(αβ) is zero. The error location reversal element is representative of a corresponding one of the at least one error location.
In this embodiment, the error location determining unit 70 further includes an error location element generator 73 coupled electrically to the root determining sub-unit 72 for receiving the error location reversal element therefrom. The error location element generator 73 generates an error location element representative of the corresponding one of the at least one error location such that power numbers of the error location element and the error location reversal element have a sum of (n).
The root determining sub-unit 72 includes a first shift register 721, a power generator 722, a lookup table 723, a combining member 724, a determining member 725, and a second shift register 726.
The first shift register 721 is coupled electrically to the dividing unit 71 for receiving the location intermediate polynomial σ(x) therefrom, and includes a plurality of cascaded storage members for respectively storing a plurality of terms of the location intermediate polynomial σ(x).
The power generator 722 is coupled electrically to the first shift register 721 for receiving in sequence the terms of the location intermediate polynomial σ(x), and generates, for each of the terms of the location intermediate polynomial σ(x), a power signal corresponding to each of the nonzero elements α0, α1, α2, . . . , αn-1 of the finite field GF(2m) with reference to power numbers of the corresponding one of the nonzero elements α0, α1, α2, . . . αn-1 of the finite field GF(2m) and the corresponding one of the terms of the location intermediate polynomial σ(x). The power signal represents the power number of the corresponding term of the location intermediate polynomial σ(x) as substituted by the corresponding nonzero element αβ of the finite field GF(2m) and having a base a identical to that of the nonzero elements α0, α1, α2, . . . , αn-1 of the finite field GF(2m), where 0≦β≦(n-1). Since operation of the power generator 722 of the root determining sub-unit 72 is similar to that of the power generator 35 of the syndrome determining unit 30, further details of the same are omitted herein for the sake of brevity.
The lookup table 723 is coupled electrically to the first shift register 721 for receiving in sequence the terms of the location intermediate polynomial σ(x). The lookup table 723 is further coupled electrically to the power generator 722 for receiving the power signal therefrom, and outputs, for each of the terms of the location intermediate polynomial σ(x), an intermediate term signal representative of a corresponding one of the terms of the location intermediate polynomial σ(x) as substituted by a corresponding one of the (n) number of nonzero elements α0, α1, α2, . . . , αn-1 of the finite field GF(2m).
The combining member 724 is coupled electrically to the lookup table 723 for combining the intermediate term signals for all of the terms of the location intermediate polynomial σ(x) and corresponding to the same one of the (n) number of nonzero elements α0, α1, α2, . . . , αn-1 so as to result in the test result for the corresponding one of the (n) number of nonzero elements α0, α1, α2, . . . , αn-1.
The determining member 725 is coupled electrically to the combining member 724 for receiving the test result therefrom, and determines whether the test result is zero. The determining member 725 outputs the nonzero element αβ corresponding to the test result as a corresponding error location reversal element upon determining that the test result σ(αβ) is zero.
The second shift register 726 is coupled electrically to the determining member 725 for receiving the error location reversal element (s) therefrom, and includes a plurality of cascaded storage members for respectively storing the error location reversal element (s).
The error location determining unit 70 further includes a third shift register 74 coupled electrically to the error location element generator 73 for receiving the error location element (s) therefrom, and includes a plurality of cascaded storage members for respectively storing the error location element (s).
Continuing with the previous example, where the error location polynomial V1(x) is V1(x)=α3x3+α2x2+α4x1+α9. The dividing sub-unit 71 computes the location intermediate polynomial σ(x) to be
The storage members of the first shift register 721 respectively store the terms α3, α2, α4, α9 of the location intermediate polynomial σ(x). The power generator 722, the lookup table 723, and the combining member 724 cooperate to generate in sequence the test results respectively corresponding to the (n) number of nonzero elements α0, α1, α2, . . . , αn-1 of the finite field GF(2m). In this embodiment, each test result is generated in a loop with cycles equal in number to the terms of the location intermediate polynomial σ(x), where a corresponding term of the location intermediate polynomial σ(x) as substituted by the nonzero element αβ(0≦β≦(n-1)) of the finite field GF(2m) corresponding to the test result is computed during each cycle, and the results of all the terms of the location intermediate polynomial σ(x) as substituted by the same nonzero element αβ of the finite field GF(2m) are summed to generate the test result, which is subsequently outputted to the determining member 725 upon completion of the last cycle of the loop.
As mentioned previously, the finite field GF(2m) in this example is GF(24), which has 2m=214=16 number of elements, namely 0, α0, α1, α2, . . . , α14, with α0, α1, α2, . . . , α14 being the nonzero elements. Therefore, there are fifteen test results in total, respectively being σ(α0)=α14, σ(α1)=α10, σ(α2)=0, σ(α3)=α13, σ(α4)=α5, σ(α5)=α1, σ(α6)=α9, σ(α7)=α12, σ(α8)=α7, σ(α9)=0, σ(α10)=0, σ(α11)=α4, σ(α12)=α12, σ(α13)=α12, and σ(α14)=α7. These test results are outputted to the determining member 725 in sequence, which determines that the test results σ(α2), σ(α9) and σ(α10) are zero, and outputs the corresponding nonzero elements α2, α9 and a10 as the error location reversal elements to be stored in the second shift register 726. The error location element generator 73 receives the error location reversal elements α2, α9 and α10 from the determining member 725, and generates the corresponding error location elements by subtracting the power numbers of the error location reversal elements α2, α9 and α10 from n=2n−1=15. In this example, the error location elements include α13, α6 and α5.
With reference to
The error value determining unit 80 includes a first dividing sub-unit 81, a first shift register 82, a first determining sub-unit 83, a differentiating sub-unit 84, a second shift register 85, a second determining sub-unit 86, a second dividing sub-unit 87, and a third shift register 88.
The first dividing sub-unit 81 is coupled electrically to the error information determining unit 40 for respectively receiving the error value polynomial Zi(x) and the error location polynomial Vi(x) therefrom, and performs division of the error value polynomial Zi(x) by the constant term Vi(0) of the error location polynomial Vi(x) so as to generate an error quotient polynomial W(x). In other words, the error quotient polynomial W(x) is equal to
The first shift register 82 is coupled electrically to the first dividing sub-unit 81 for receiving the error quotient polynomial W(x) therefrom, and includes a plurality of cascaded storage members for respectively storing a plurality of terms of the error quotient polynomial W(x).
The first determining sub-unit 83 is coupled electrically to the first shift register 82 and the second shift register 726 of the root determining sub-unit 72 for respectively receiving the error quotient polynomial W(x) and the error location reversal element(s) therefrom, and generates, for each error location reversal element, a first result by substituting the error location reversal element into the error quotient polynomial W(x). Since operation of the first determining sub-unit 83 is similar to that of the syndrome term generator 32, further details of the same are omitted herein for the sake of brevity.
The differentiating sub-unit 84 is coupled electrically to the dividing sub-unit 71 of the error location determining unit 70 for receiving the location intermediate polynomial σ(x) therefrom, and generates a differential polynomial of the location intermediate polynomial, i.e., σ′(x). In this embodiment, the differentiating sub-unit 84 is a binary shifter.
The second shift register 85 is coupled electrically to the differentiating sub-unit 84 for receiving the differential polynomial σ′(x) therefrom, and includes a plurality of cascaded storage members for respectively storing a plurality of terms of the differential polynomial σ′(x).
The second determining sub-unit 86 is coupled electrically to the second shift register 85 and the second shift register 726 of the root determining sub-unit 72 for respectively receiving the differential polynomial σ′(x) and the error location reversal element(s) therefrom, and generates a second result, for each error location reversal element, by substituting the error location reversal element into the differential polynomial σ′(x). Since operation of the second determining sub-unit 86 is similar to that of the syndrome term generator 32, further details of the same are omitted herein for the sake of brevity.
The second dividing sub-unit 87 is coupled electrically to the first and second determining sub-units 83, 86 for receiving the first and second results therefrom, and performs division of the first result by the second result so as to generate the error value for the error location representative of the corresponding error location reversal element.
Continuing with the previous example, where the error value polynomial Zi(x) is Zi(x)=α4x2+α9x1+α9 and the location intermediate polynomial σ(x) is σ(x)=α9x3+α8x2+α10x1+α0.
The first dividing sub-unit 81 computes the error quotient polynomial W(x) to be
The storage members of the first shift register 82 respectively store the terms α10, α0, α0 of the error quotient polynomial W(x). The differentiating sub-unit 84 computes the differential polynomial σ′(x) to be 3α9x2+2α8x1+α10. The storage members of the second shift register 85 respectively store the terms 3α9, 2α8, α10 of the differential polynomial σ′(x). For each of the error location reversal elements, which include α2, α9 and α10 in this example, the first determining sub-unit 83 generates the corresponding first result, and the second determining sub-unit 86 generates the corresponding second result. The first results corresponding to the error location reversal elements α2, α9, α10 are respectively W(α2)=α14+α2+α0, W(α9)=α13+α9+α0, and W(α10)=α0+α10+α0. The second results corresponding to the error location reversal elements α2, α9, α10 are respectively σ′(α2)=α13+α10, σ′(α9)=α12+α10, and σ′(α10)=α14+α10. Upon receiving the first and second results corresponding to the same error location reversal element, the second dividing sub-unit 87 generates the corresponding error value by dividing the first result by the second result. In this example, the error value corresponding to error location reversal element α2 is
the error value corresponding to the error location reversal element α9 is
and the error value corresponding to the error location reversal element a10 is
These error values are respectively stored in the storage elements of the third shift register 88.
With reference back to
With further reference to
The previous example is used for illustrating operation of the syndrome correcting unit 90, where the error values corresponding to the error location reversal elements α2, α9, α10 are α12, α2 and α14, and the error location reversal elements α2, α9, α10 correspond respectively to the error location elements α13, α6 and α5, and are representative of the corresponding error locations. The correction polynomial generator 91 generates the correction polynomial R(x) to be R(x)=α14x5+α2x6+α12x13. The combining sub-unit 92 combines the correction polynomial R(x) with the input polynomial RX(x)=α0x14+α11x13+α0x12+α0x11+α0x10+α0x9+α0x8+α0x7+α8x6+α3x5+α0x4+α0x3+α0x2°α0x1+α0 so as to result in the recovery polynomial B(x) that is equal to B(x)=α0x14+α0x13+α0x12+α0x11+α0x10+α0x9+α0x8+α0x7+α0x6+α0x5+α0x4+α0x3+α0x2+α0x1+α0. Therefore, the recovery signal has the terms in binary format of (0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000) from the least significant symbol to the most significant symbol.
With reference to
D=B4modN (Formula 13)
where “mod” denotes the mathematical operation of finding a remainder after a division operation, (D) denotes a modulus signal, and (B) denotes the portion of the recovery signal, which is hereinafter referred to as the “object signal”. Using the previous example, where the recovery signal is (0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000) with fifteen 4-bit symbols, the object signal would be the last nine symbols of the recovery signal, and is therefore (0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000).
The decrypting module 4 includes a computing unit 41, a controller 42, and a first multiplexer 43. The computing unit 41 is adapted for receiving the object signal, the public key (N), and a multiplexer output signal. The controller 42 is coupled electrically to the computing unit 41, and is adapted for receiving the bits (dh-1, dh-2, . . . , d1, d0) of the decryption key (d) in sequence from the most significant bit (dh-1) to the least significant bit (d0). The first multiplexer 43 is coupled electrically to the controller 42 and the computing unit 41, is adapted for receiving the object signal and the modulus signal, and is controlled by the controller 42 to output the multiplexer output signal.
For each bit received by the controller 42 and determined by the controller 42 to be a bit other than the most significant bit (dh-1), the controller 42 controls the computing unit 41 to perform modulus computation processing for generating the modulus signal with reference to the object signal, the public key (N), and the multiplexer output signal. To carry out decryption according to Formula 13, the modulus computation processing is computed according to at least one of the following Formulae 14 and 15:
D=D×DmodN (Formula 14)
D=D×BmodN (Formula 15)
where (D) represents the modulus signal, and (B) represents the object signal.
When the bit received is a second most significant bit (dh-2) of the decryption key (d), the controller 42 controls the first multiplexer 43 to output one of the object signal and a predetermined signal as the multiplexer output signal according to a value of the most significant bit (dh-1) of the decryption key (d), and controls the computing unit 41 to perform the modulus computation processing according to a first modulus computation for generating the modulus signal with reference to the multiplexer output signal and the public key (N). The predetermined signal is a signal representing “binary 1” in this embodiment. The first modulus computation is conducted according to the abovementioned Formula 14.
When the bit received is the second most significant bit (dh-2) and when a value of the second most significant bit (dh-1) matches a predetermined value, which is “binary 1” in this embodiment, the controller 42 further controls the first multiplexer 43 to output the modulus signal generated according to the first modulus computation as the multiplexer output signal, and further controls the computing unit 41 to perform the modulus computation processing according to a second modulus computation for generating the modulus signal with reference to the object signal, the public key (N), and the multiplexer output signal. The second modulus computation is conducted according to the abovementioned Formula 15.
When the bit received is a bit other than the most significant bit (dh-1) and the second most significant bit (dh-2) of the decryption key (d), the controller 42 controls the first multiplexer 43 to output the modulus signal as the multiplexer output signal, controls the computing unit 41 to perform the modulus computation processing according to the first modulus computation with reference to the multiplexer output signal and the public key (N), and further controls the computing unit 41 to perform the modulus computation processing according to the second modulus computation for generating the modulus signal with reference to the object signal, the public key (N), and the multiplexer output signal when a value of the bit matches the predetermined value and after the modulus computation processing according to the first modulus computation is completed.
Upon determining that the bit received is the least significant bit (d0) of the decryption key (d), the controller 42 enables the computing unit 41 to output the modulus signal as the decrypted signal upon completion of the modulus computation processing according to the first modulus computation when a value of the least significant bit (d0) does not match the predetermined value, and upon completion of the modulus computation processing according to the second modulus computation when the value of the least significant bit (d0) matches the predetermined value.
For purpose of illustration, it is assumed that the object signal is decimal “27”, the encryption key (e) is binary “1011”, and the public key (N) is decimal “35”. The process of decrypting the object signal into the decrypted signal according to the preferred embodiment of the present invention is tabulated in Table 3.
In this embodiment, the computing unit 41 includes a second multiplexer 411, a multiplier 412, and a modulus signal computing sub-unit 413.
The second multiplexer 411 is adapted for receiving the object signal, is coupled electrically to the first multiplexer 43 for receiving the multiplexer output signal therefrom, and is further coupled electrically to the controller 42. The second multiplexer 411 is controlled by the controller 42 to output the multiplexer output signal as a multiplier input signal during the first modulus computation, and to output the object signal as the multiplier input signal during the second modulus computation.
The multiplier 412 is coupled electrically to the first and second multiplexers 43, 411 for respectively receiving the multiplexer output signal and the multiplier input signal therefrom, and provides a multiplier output corresponding to a product of the multiplexer output signal and the multiplier input signal.
The modulus signal computing sub-unit 413 is coupled electrically to the multiplier 412 for receiving the multiplier output therefrom, and computes the modulus signal with reference to the multiplier output thus received and the public key (N) In this embodiment, the modulus signal computing sub-unit 413 includes a shift register 414, a comparator 415 and a subtracter 416. The shift register 414 includes a first half 417 and a second half 418. Each of the first and second halves 417, 418 includes (R) number of cascaded storage members 419, where (R) is a positive integer. An output of an (N)th one of the storage members 419 is coupled electrically to an input of an (N+1)th one of the storage members 419, where (N) is a positive integer ranging between 1 and (R−1). An output of the (R)th one of the storage members 419 of the first half 417 is coupled electrically to an input of the first one of the storage members 419 of the second half 418. The first half 417 is coupled electrically to the multiplier 412 for receiving the multiplier output therefrom in a first period during the modulus computation processing. The multiplier output is expressed in (R) number of bits, and each bit of the multiplier output is stored in a corresponding one of the storage members 419. Content in each of the storage members 419 is outputted to a subsequent one of the storage members 419 in each of a second period to a (R+1)th period during the modulus computation processing. The comparator 415 is coupled electrically to the second half 418 of the shift register 414 for extracting content in the second half 418 during each of the second period to the (R+1)th period, and determines whether the content is smaller than the public key (N). The subtracter 416 is coupled electrically to the second half 418 of the shift register 414 for extracting the content in the second half 418, and is further coupled electrically to the comparator 415. The subtracter 416 is enabled to subtract the content by the public key (N) and to update the content with result of the subtraction when it is determined by the comparator 415 that the content is not smaller than the public key (N). The second half 418 of the shift register 414 is coupled electrically to the first multiplexer 43, and outputs the content therein as the modulus signal to the first multiplexer 43 when the (R+1)th period has elapsed upon completion of the modulus computation processing.
It should be noted herein that for convenience of description, the lookup tables 222, 36, 63, 723 are arranged in their respective functional blocks, e.g., the lookup table 222 is arranged in the modulus computing unit 22. However, in actual applications, the lookup tables 222, 36, 63, 723 may be concentrated in one hardware block.
In addition, the dividing sub-units 221, 53, 71, and the first and second dividing sub-units 81, 87 can share resources in actual implementations as long as there are no conflicts in timing sequences. Similar principles also apply to the combining unit 23, the combining sub-units 223, 37, 64, 92, and the combining member 724 as well as, to the registers 114, 31, 33, 51, 52, 61, 62, 721, 726, 74, 82, 85, 88.
It should be further noted herein that the encoding device 100 and the decoding device 200 may be implemented as separate modules according to the present invention.
In sum, by incorporating both cryptography and encoding/decoding, the present invention is able to ensure accurate signal transmission and prevent unauthorized access to protected information. In addition, by suitably adopting lookup tables, the present invention simplifies the circuit designs of the error correction encoding module 2 and the error correction decoding module 3.
While the present invention has been described in connection with what is considered the most practical and preferred embodiment, it is understood that this invention is not limited to the disclosed embodiment but is intended to cover various arrangements included within the spirit and scope of the broadest interpretation so as to encompass all such modifications and equivalent arrangements.
Number | Date | Country | Kind |
---|---|---|---|
098106652 | Mar 2009 | TW | national |