Require to submit on September 11st, 2006, application number is the right of priority of the korean patent application of 10-2006-0087665, its theme is incorporated herein with for referencial use.
Summary of the invention
One aspect of the present invention provides the encryption processor of storage card, is used for storing ciphered data at storage chip.Described encryption processor comprises: first in first out (FIFO) storer is used for the predetermined data of order output in response to first signal; And encryption key generator, be used for generating predetermined encryption key, and be used for exporting described key in response to the 3rd signal sequence in response to secondary signal.Logical-arithmetic unit during data write operation to from the predetermined data of described FIFO storer output and from the key actuating logic computing of described encryption key generator output, so that order is encrypted described predetermined data.Described predetermined encrypted data is sent to memory interface.In addition, in response to write command with write the address and generate described first signal, secondary signal and the 3rd signal, described secondary signal and write command generate control circuit simultaneously during data write operation.
Described encryption processor can comprise error detect circuit, its be used for when with described predetermined encrypted data when described logical-arithmetic unit sends to described memory interface, detect the mistake in the described predetermined encrypted data.Described error detect circuit can use error correcting code (ECC).Encryption key generator can use data encryption standards (DES).In addition, logical-arithmetic unit can be carried out the XOR computing, and described key can be the XOR key.Encryption key generator also can comprise: register is used to store the described predetermined XOR key of having encrypted; And XOR key FIFO storer, be used for the described predetermined XOR key of having encrypted that interim storage receives from described register, and be used in response to the predetermined XOR key of having encrypted of described the 3rd signal sequence output.
Described encryption key generator can receive at least one initialization key in response to secondary signal, to generate the XOR key of having encrypted.When described initialization key was identical, described encryption key generator can generate the identical XOR key of having encrypted.In addition, the described initialization key that is used to the to encrypt tentation data described predetermined encrypted data that is used to decode.Described encryption key generator can initially receive initialization key in response to secondary signal, generating an XOR key, and can receive at least one described predetermined XOR key of having encrypted to generate XOR key subsequently.The described initialization key that is used for encrypting described predetermined data can be stored in storer.
Another aspect of the present invention provides the encryption processor of storage card, is used for recovering to be stored in the encrypted data of storage chip, and described encryption processor comprises encryption key generator, logical-arithmetic unit and control circuit.Described encryption key generator generates key in response to first signal, and exports described key in response to the secondary signal order.Logical-arithmetic unit utilizes the predetermined encrypted data actuating logic computing of described key to sending from memory interface from described encryption key generator output, with the described predetermined encrypted data of decoding in proper order during data read operation.Control circuit generates described first signal and secondary signal in response to reading order and data read address during described data read operation, described first signal and described reading order generate simultaneously.
Another aspect of the present invention provides the encryption processor of storage card, and described storage card is stored ciphered data in storage chip.Described encryption processor comprises: the FIFO storer is used in response to the predetermined data of first signal sequence output; Encryption key generator is used for generating predetermined encryption key in response to secondary signal, and is used for exporting described key in response to the 3rd signal sequence.Described encryption processor also comprises logical-arithmetic unit, be used for during data write operation, utilization is encrypted described predetermined data and is sent it to memory interface with order from the described predetermined data actuating logic computing of described key to exporting from described FIFO storer of described encryption key generator output.Described logical-arithmetic unit is also during data read operation, utilization also sends to described FIFO storer with described decoded data from the described encrypted data actuating logic computing of described key to receiving from described memory interface of described encryption key generator output with the described predetermined encrypted data of decoding in proper order.Control circuit during data write operation in response to write command with write the address and generate described first signal, secondary signal and the 3rd signal, and during described data read operation in response to reading order with read the address and generate described secondary signal and the 3rd signal.Described secondary signal and one of said write order or described reading order generate simultaneously.Described storage chip can comprise flash memory, and described storage card comprises subscriber identity module (SIM) card.
Another aspect of the present invention provides and has utilized encryption key to write data and from its method that reads, described encryption key is used for the Code And Decode data to the storage chip of storage card respectively.Described method comprises: the signal that generates the data write command simultaneously and be used to generate the XOR key, and generate the described predetermined XOR key of having encrypted in response to the signal that is generated at least; Utilize the described predetermined XOR cipher key sequence of having encrypted that data are carried out the XOR computing, to obtain encrypted data; And described predetermined encrypted data is stored in the storage chip.Described method also comprises: the signal that generates data read command simultaneously and be used to generate the described XOR key of having encrypted, and generate the described predetermined XOR key of having encrypted in response to the signal that is generated at least; Read the described encrypted data of having stored from described storage chip; Utilize the described predetermined XOR key of having encrypted that described predetermined encrypted data is carried out the XOR computing in proper order, to obtain decoded data corresponding to described data; And described decoded data are sent to the interior arrangement of storage card or send to external device (ED).
Can in described storage card, generate the data write command and write the address, can in described storage card, generate data read command and the predetermined XOR key of having encrypted.Described predetermined encrypted data is stored in step on the described storage chip can comprises the data write command, write the address and described predetermined encrypted data sends to described storage card, and the step that reads the described encrypted data of having stored can comprise data read command and data read address are sent to described storage card.Can on storage chip, store described predetermined encrypted data according to data cell
Described method also can comprise: receive the initialization key that can store from the CPU (central processing unit) of described storage card; And when receiving described data write command and data read command, generate the described predetermined XOR key of having encrypted based on described initialization key.The described XOR key of having encrypted is in response to identical initialization key and generates, and the described identical initialization key that is used to the to encrypt predetermined data described encrypted data of having stored that can be used to decode.Described encryption key generator can no longer receive described initialization key after an XOR key that generates the described predetermined XOR key of having encrypted, but can be used as input and receive other XOR key of the described predetermined XOR key of having encrypted, to generate the XOR key of having encrypted continuously.The described predetermined XOR key of having encrypted can be stored among the XOR key FIFO of described encryption key generator.
Described storage chip to storage card writes data and also can comprise in response to receiving data write command and said write address from the method for its reading of data and to generate first control signal and second control signal.The step of described execution XOR computing can comprise then: in response to described first control signal from described FIFO storer output data; And the XOR key of being scheduled to from the described predetermined XOR key FIFO storer of having encrypted output in response to described second control signal of having encrypted.Described method also can comprise: when described predetermined encrypted data is sent to described storage chip, detect error in data; And calculate and storage corresponding to the error correction values of described predetermined encrypted data.
Can use the 2nd XOR key on second data, to carry out described XOR computing, obtaining second encrypted data, and use first encrypted data of an XOR secret key encryption to be stored on the described storage chip by memory interface.In addition, the step of the predetermined XOR key of having encrypted of described generation also comprises: according to described data read command and described data read address, the storage chip from described memory interface reads described predetermined encrypted data; And when the described predetermined encrypted data that sends from described memory interface, come the correction of data error of transmission according to the error correction values of being stored.
The step that reads predetermined encrypted data from described storage chip also can comprise: generate the 3rd control signal in response to receiving data read command and data read address, make the step of carrying out described XOR computing comprise:, to export described predetermined encrypted data from described memory interface in response to described the 3rd control signal; And, export the described predetermined XOR key of having encrypted from the described predetermined XOR key FIFO storer of having encrypted in response to described second control signal.Described decoded data can be stored in the described FIFO storer.
Embodiment
The present invention, example embodiment of the present invention shown in the drawings will more intactly be described with reference to the accompanying drawings.Yet the present invention can implement with multiple different form, and should not be construed as and only be limited to illustrated embodiment.Be more suitable for ground, these embodiment provide as an example, in order to pass on design of the present invention to those skilled in the art.Correspondingly, some embodiments of the present invention are not described by known process, element and technology.In institute's drawings attached and the instructions write, identical Reference numeral will be used to indicate same or analogous element all the time.
Fig. 1 according to the present invention example embodiment, comprise the block diagram of the memory card system of encryption processor.Memory card system comprises storage card 10 and main frame 20.
Main frame 20 can be can with various device that storage card docks in any one, for example computer system, PDA, digital camera, mobile phone, card reader etc.Storage card 10 is electrically connected to main frame 20, and can be permanent connection or dismountable.Storage card 10 can be the storage card that has merged any type of flash memory, and for example, (CF) card, intelligent medium (SM) card, memory stick, multimedia card (MMC), secure digital (SD) card, subscriber identity module (SIM) card and analog are dodged in compression.Main frame 20 provides data to write, read and erase command to storage card 10, and according to the data address and the control signal of these orders.
Storage card 10 writes data to flash memory 200 in response to the correspondence order from main frame 20 or from its reading of data.With reference to figure 1, storage card 10 comprises control chip 100 and flash memory 200.Control chip 100 is controlled at Data Receiving and the transmission between main frame 20 and the flash memory 200.Control chip 100 comprises host interface 110, memory buffer 120, encryption processor 130, flash interface 140 and CPU (central processing unit) (CPU) 150.
Host interface 110 provides the interface between main frame 20 and the storage card 10.Host interface 110 receives order, address and control signal from main frame 20, and it is delivered to CPU 150.Described order can comprise and writes, reads and erase command.Host interface 110 can merge the interface with electrical connection according to multiple standards or standard, and such interface comprises for example personal computer memory card League of Nations (PCMCIA), USB (universal serial bus) (USB), gaming platform 2 (PS2) etc.
The data that memory buffer 120 storages will be written to flash memory 200 or read from flash memory 200.When writing data, memory buffer 120 receives from host interface 110 and writes data.For example, memory buffer 120 can be static RAM (SRAM).
Encryption processor 130 is encrypted the data that are stored in the memory buffer 120, and according to write operation predetermined encrypted data is delivered to flash interface 140.Encryption processor 130 is also deciphered the data that (decoding) reads from flash memory 200, and according to read operation with decrypted data delivery to memory buffer 120.
Dock between 140 pairs of control chips 100 of flash interface and the flash memory 200.Flash interface 140 sends to flash memory 200 with encryption processor 130 ciphered data during write operation.In addition, flash interface 140 will send to encryption processor 130 from the enciphered data that flash memory 200 reads during read operation.
CPU 150 is CPU (central processing unit), and the operation of control chip 100 is controlled.CPU150 comes main control system interface 110, memory buffer 120 and encryption processor 130 according to the order, address and the control signal that receive from host interface 110.
Fig. 2 is the block diagram of the encryption processor 130 of the example embodiment according to the present invention.With reference to figure 2, encryption processor 130 comprises control circuit 131, first in first out (FIFO) storer 132, encryption key generator 133, XOR (XOR) arithmetical unit 134 and error correction circuit (ECC) 135.
Control circuit 131 receives corresponding to data from CPU 150 and writes, reads order and address with erase operation, and generates control signal DFS, EES, XFS and FIS in response.Control circuit 131 is according to FIFO storer 132, encryption key generator 133 and the error correction circuit 135 of control signal DFS, EES, XFS and FIS control encryption processor 130, and flash interface 140.
FIFO storer 132 is memory devices, its be configured to with the identical order output data of input data (as, the data of input output earlier earlier).FIFO storer 132 is operated by the first in first out tabulation.
FIFO storer 132 comprises a plurality of m byte register (not shown).During write operation, FIFO storer 132 in response to from the control signal DFS of control circuit 131 and from buffering storer 120 receive continuously the m bytes data D1, D2 ....Then, FIFO storer 132 with data D1, the D2 of the m byte that received ... be sent to XOR arithmetical unit 134 continuously.During read operation, FIFO132 in response to from the control signal DFS of control circuit 131 from XOR arithmetical unit 134 receive continuously the m bytes data D1, D2 ..., and then with the m byte data D1, the D2 that are received ... send to memory buffer 120 continuously.Control circuit 131 from CPU 150 receive data to flash memory 200 write with data read command generating control signal DFS, and correspondingly control signal DFS is sent to FIFO storer 132.
Encryption key generator 133 is in response to the XOR key of control signal EES generation m byte, and it can be encrypted.More specifically, encryption key generator 133 from CPU 150 receive encryption key EK and main XOR key MK with generate a plurality of XOR key XK1, XK2 that encrypted ....When receiving identical encryption key EK from CPU 150 with identical main XOR key MK, encryption key generator 133 generate identical the XOR key XK1, the XK2 that have encrypted ....Encryption key generator 133 can comprise be used to store a plurality of XOR key XK1, XK2 ... the register (not shown).
Encryption key EK and main XOR key MK can generate by CPU 150 or additional initialization key (not shown).The encryption key EK and the main XOR key MK that are used to encrypt tentation data are used to decipher predetermined encrypted data with being equal to.In order to finish this, when encrypting described data, CPU 150 or the storage of initialization key maker (not shown) are delivered to the encryption key EK and the main XOR key MK of encryption key generator 133.When decoding the encrypted data of being scheduled to, CPU 150 or initialization key maker are sent encryption key EK in encryption key generator 133 and the main XOR key MK that is stored.In one embodiment, the initialization key maker can merge in the encryption key generator 133.
During data write operation, XOR arithmetical unit 134 utilize predetermined the XOR key XK1, the XK2 that have encrypted that encryption key generator 133 generates ..., predetermined data D1, the D2 that FIFO storer 132 is provided ... carry out the XOR computing continuously, with provide ciphered data ED1, ED2 ....XOR arithmetical unit 134 sends to flash interface 140 with the XOR operation result.Predetermined encrypted data ED1, the ED2 that causes by the XOR computing ... the equation 1 below satisfying, wherein " U " indicates the XOR computing:
D1?U?XK1=ED1
D2?U?XK2=ED2
...
Dm U XKm=EDm (equation 1)
During data read operation, XOR arithmetical unit 134 utilize predetermined the XOR key XK1, the XK2 that have encrypted that generate by encryption key generator 133 ..., to predetermined encrypted data ED1, the ED2 that provide by flash interface 140 ..., carry out the XOR computing.During data read operation, predetermined the XOR key XK1, the XK2 that have encrypted that generates from encryption key generator 133 ... with before be used for enciphered data D1, D2 ... predetermined the XOR key XK1, the XK2 that have encrypted ... identical.To be CPU 150 or initialization key maker send identical encryption key EK and main XOR key MK to reason during data write operation and data read operation.Correspondingly, the XOR operation result be decoded data D1, D2 ....According to the XOR computation performance, decoded data D1, D2 ... the equation 2 below satisfying:
ED1?U?XK1=(D1?U?XK1)U?XK1=D1
ED2?U?XK2=(D2?U?XK2)U?XK2=D2
...
EDm U XKm=(Dm U XKm) U XKm=Dm (equation 2)
Error correction circuit (ECC) 135 be connected between flash interface 140 and the XOR arithmetical unit 134 be corrected in transmit predetermined encrypted data ED1, ED2 ... the time contingent error of transmission.Error correction circuit 135 calculate predetermined encrypted data ED1, ED2 ... the error correction code value, and be stored to then in the flash interface 140.Error correction circuit 135 compares error correction code value and data during data read operation, with the correction of data error of transmission.
Yet, error correction circuit 135 can only detect when predetermined encrypted data ED1, ED2 ... the mistake when just being transmitted.In order to correct detected mistake, error correction circuit 135 memories predetermined encrypted data ED1, ED2 ... in error bit.Then, with predetermined the XOR key XK1, the XK2 that have encrypted ... to predetermined encrypted data ED1, ED2 ... carry out the XOR computing, with the decoding reading of data.Here, can determine decoded data D1 ', D2 ' ... (corresponding to initial data D1, D2 ...) have a mistake.In order to correct a mistake, CPU 150 receives to be designated from error correction circuit 135 has each wrong position, and be corrected in then decoded data D1 ', D2 ' ... in corresponding position.Corresponding position is carried out mistake according to the XOR computation performance and is changed from the logical zero to the logical one or from the logical one to the logical zero.
Encryption processor 130 provide simultaneously write with reading order and when write data to flash memory 200 and generate during from its reading of data the XOR key XK1, the XK2 that have encrypted that are scheduled to ....Predetermined the XOR key XK1, the XK2 that have encrypted that encryption processor 130 utilization generates during data write operation ... to predetermined data D1, D2 ... carry out the XOR computing, so as to send predetermined encrypted data ED1, ED2 ....In addition, identical the XOR key XK1, the XK2 that have encrypted that encryption processor 130 utilization is used during data write operation ... to predetermined encrypted data ED1, ED2 ... carry out the XOR computing, with decoding during data read operation predetermined encrypted data ED1, ED2 ....Decoded data are sent to memory buffer 120 then.Correspondingly, encrypt predetermined data D1, D2 ... and/or predetermined encrypted data ED1, the ED2 of decoding ... the required time has reduced than traditional method.
The storage card that utilizes the conventional cryptography processor as intermediate medium, comes memory buffer enciphered data or decodes ciphered data.Yet the encryption processor 130 of present embodiment does not need to be used for the memory buffer of the predetermined encrypted data of enciphered data or decoding.Therefore, the storage card of the encryption processor 130 of use present embodiment needs the task of less CPU 150 than traditional storage card.
Fig. 3 is the block diagram of the encryption key generator 133 of example embodiment, Fig. 2 according to the present invention.With reference to figure 3, encryption key generator 133 comprises multiplexer 136, crypto engine 137, XOR key register 138 and XOR key FIFO storer 139.
With reference to figure 3, encryption key generator 133 from CPU 150 receive encryption key EK and main XOR key MK with generate a plurality of XOR key XK1, XK2 ....
Multiplexer 136 select the main XOR key MK that sends from CPU 150 and the XOR key XK1, the XK2 that are generated ... in one.Selected key is offered crypto engine 137.Crypto engine 137 receives from the encryption key EK of CPU 150 and the key of sending from multiplexer 136, and generate predetermined the XOR key XK1, the XK2 that have encrypted continuously ....The storing predetermined XOR key XK1, the XK2 that have encrypted of XOR register 138 ..., it is generated by crypto engine 137.
In an embodiment, crypto engine 137 for example can use data encryption standards (DES), with generate XOR key XK1, the XK2 encrypted ....DES is the Encryption Tool by the IBM exploitation, and is the public encryption system that was adopted by NBS in 1974.The DES algorithm comprises displacement (permutation), replacement and modulo operation.Key is depended in the security of public encryption system fully.That is, if there is not key, then ciphered data can't be decoded as primary data, even and when predetermined encrypted data and primary data exist, can not determine key.In field of encryption, used unidirectional (one-way) function, that is, and Hamming (hamming) function.In one-way function, the y among the y=f (x) can easily obtain by x, but x can not obtain by y.That is to say that predetermined encrypted data can utilize key to obtain from primary data, if but there is not key, then can not obtain primary data from predetermined encrypted data.
Predetermined 139 pairs of the XOR key FIFO storeies of having encrypted be stored in predetermined the XOR key XK1, the XK2 that have encrypted in the XOR register 138 ... store temporarily.The XOR key XK1, the XK2 that have encrypted that the predetermined XOR key FIFO storer of having encrypted 139 will be scheduled in response to control signal XFS ... be sent to XOR arithmetical unit 134 continuously.
Fig. 4 is the process flow diagram that the use encryption processor 130 of diagram example embodiment according to the present invention writes the method for data.Fig. 5 is the sequential chart of the respective operations in flash memory 200 and the encryption processor 130 when writing data.Fig. 5 indicated in encryption processor 130 with known pin on the relevant operation of demonstration signaling, described signaling for example control pin command latch enable (CLE), address latch enable (ALE), chip enable (/CE), write and enable (/WE) and read to enable (/RE), and data I/O pin (I/Ox).With reference to Figure 4 and 5, the method that flash memory is write data is as follows.
At step S10, generate data write command and XOR key, it can generate simultaneously.Particularly, during data write operation, CPU 150 sends data write command and address to the control circuit 131 of encryption processor 130.CPU 150 makes that also the data that will be written to flash memory 200 send to memory buffer 120 from host interface 110.The data that are stored in the memory buffer 120 are sent out and store into the FIFO storer 132 that it is stored in then, as store in the predetermined unit.In addition, CPU 150 sends to encryption key generator 133 with key EK and MK, and it is used to encrypt the predetermined data that will be written to flash memory 200.CPU 150 can store key EK and the MK that is sent into the register (not shown).In response to sending, utilize key EK and MK to generate the predetermined XOR key of having encrypted from the control signal EES that controls circuit 131.Can with the write command EES that side by side generates and/or transmit control signal.
The encryption key generator 133 that receives key EK and MK from CPU 150 generate XOR key XK1, XK2 ....With reference to figure 5, the predetermined XOR key XK1, the XK2 that have encrypted ... in each step, generate, and can be scheduled.With reference to figure 5, before the address is sent to flash memory 200, encryption key generator 133 generate XOR key XK1 ..., XKn.The XOR key XK1 that is generated ..., XKn is stored in the predetermined XOR key FIFO storer of having encrypted 139 of encryption key generator 133.
At this moment, XOR arithmetical unit 134 in response to control signal DFS from FIFO storer 132 receive previously stored data D1 ..., Dn, and in response to control signal XFS from the predetermined XOR key FIFO storer of having encrypted 139 receive previously stored XOR key XK1 ..., XKn.Then, specified as the step S12 of Fig. 4, XOR arithmetical unit 134 utilize the predetermined XOR key XK1 that has encrypted ..., XKn to predetermined data D1 ..., Dn carries out the XOR computing, with generate ciphered data ED1 ..., EDn.In response to control signal FIS, in step S14 with predetermined encrypted data ED1 ..., EDn stores flash memory 200 into.
With reference to figure 5, encrypted data ED1 that will be predetermined ..., when EDn stores flash memory 200 into, the encryption key generator 133 of encryption processor 130 generate XOR key XK (n+1) ..., XK (2n), it is stored in the predetermined XOR key FIFO storer of having encrypted 139.XOR arithmetical unit 134 utilize the predetermined XOR key XK (n+1) that has encrypted ..., XK (2n) to predetermined data D (n+1) ..., D (2n) carries out the XOR computing, with generate predetermined encrypted data ED (n+1) ..., ED (2n).
Similarly, the encrypted data ED (n+1) that will be generated ..., when ED (2n) stores in the flash memory 200, encryption key generator 133 generate XOR key XK (2n+1) ..., XK (3n), it is stored in the predetermined XOR key FIFO storer of having encrypted 139.XOR arithmetical unit 134 utilize then the predetermined XOR key XK (2n+1) that has encrypted ..., XK (3n) to predetermined data D (2n+1) ..., D (3n) carries out the XOR computing, with generate encrypted data ED (2n+1) ..., ED (3n).
Refer again to Fig. 5, encrypted and be sent to (or afterwards) when storing in the flash memory 200 when data set, generate continuous a plurality of XOR keysets.Yet the present invention is not restricted to this embodiment.Encryption key generator 133 can generate a plurality of XOR keysets during the data write command, and then they is stored into the predetermined XOR key FIFO storer of having encrypted 139.
As above, in the step S12 of Fig. 4, utilize predetermined XOR key that data are carried out the XOR computing.More specifically, control circuit 131 generates control signal DFS and XFS, and it is sent to the FIFO storer 132 and the predetermined XOR key FIFO storer of having encrypted 139 of key generator 133 respectively.In response to control signal DFS, FIFO storer 132 sends to XOR arithmetical unit 134 with previously stored data.In response to control signal XFS, the predetermined XOR key FIFO storer of having encrypted 139 sends to XOR arithmetical unit 134 with previous stored XOR key.XOR arithmetical unit 134 utilizes the predetermined XOR key of having encrypted that predetermined data are carried out the XOR computing to generate predetermined encrypted data.
In step S14, predetermined encrypted data ED1, ED2 ... be stored in flash memory 200.Flash memory 200 among Fig. 1 is shown as with control chip 100 and separates, but the present invention is not restricted to this configuration.For example, storage card 10 can comprise control chip 100 and flash memory 200 on a chip, and does not break away from the spirit and scope of the present invention.
Fig. 6 is the process flow diagram of diagram method of use encryption processor 130 reading of data of example embodiment according to the present invention.Fig. 7 is the sequential chart of respective operations in flash memory and the encryption processor 130 when reading of data.With reference to figure 6 and 7, as follows from the method for flash memory 200 reading of data.
In step S20, generation data read command and XOR key XK1, XK2 ..., it can generate simultaneously.During data read operation, CPU 150 sends to control circuit 131 with data read command and address.CPU 150 sends to encryption key generator 133 with key EK and MK, and it is used to encrypt predetermined data.Correspondingly, be used for encrypted secret key EK and the MK ciphered data that is used to decode.Encryption key generator 133 receives encryption key EK and main XOR key MK from CPU 150, with generate a plurality of XOR key XK1, XK2 ....Can utilize key EK and MK to generate the predetermined XOR key of having encrypted in response to sending from the control signal EES that controls circuit 131.Can with the data read command EES that side by side generates and/or transmit control signal.
With reference to figure 7, the input data read command after, have time enough with generate predetermined the XOR key XK1, the XK2 that have encrypted ..., be read up to data.XOR key XK1, the XK2 that is generated ... be stored in the predetermined XOR key FIFO storer of having encrypted 139.
At step S22, utilize predetermined XOR key that predetermined encrypted data is carried out the XOR computing, to decode.A data read command and an address that control circuit 131 receives from CPU 150 are to generate control signal FIS and XFS.In response to control signal FIS, as shown in Figure 7, flash interface 140 with predetermined encrypted data ED1, ED2 ... be sent to XOR arithmetical unit 134 continuously.Further, in response to control signal XFS, be stored in predetermined XOR key XK1, XK2 in the predetermined XOR key FIFO storer of having encrypted 139 ... be sent to XOR arithmetical unit 134 continuously.XOR arithmetical unit 134 utilize predetermined the XOR key XK1, the XK2 that have encrypted ... to predetermined encrypted data ED1, ED2 ... carry out the XOR computing, with decode encrypted data ED1, ED2 predetermined ..., thereby obtain decoded data D1, D2 ....Decoded data D1, D2 ... be sent to FIFO storer 132.
In the step S24 of Fig. 6, decoded data D1, D2 ... be sent to the internal module of external device (ED) (for example main frame 20) or control chip 100.At step S22, CPU 150 makes the data that will be stored in the FIFO storer 132 send to memory buffer 120.The data that are sent to memory buffer 120 may be transmitted by CPU 150, and then are sent to external device (ED).
According to encryption processor and utilize encryption processor of the present invention to write method with reading of data, with respect to traditional method, write with reading of data in generate the XOR key, so data can be by fast encrypt or deciphering.In addition, CPU will carry out less task.
Though described the present invention with reference to example embodiment, obviously can carry out multiple change and modification to one skilled in the art, and not free the spirit and scope of the present invention.Therefore, should be appreciated that the foregoing description be not used in the restriction and only be illustrative.