Encryption processor and method for writing and reading data
The encryption processor addresses CPU overload by using a control circuit, FIFO memory, and XOR operations to quickly encrypt and decrypt data, reducing processing time and CPU tasks.
Patent Information
- Application Number
- DE102007044330
- Authority / Receiving Office
- DE · DE
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2006-09-11
- Filing Date
- 2007-09-06
- Publication Date
- 2024-11-14
- Estimated Expiration
- 2027-09-06
AI Technical Summary
Conventional encryption processors for memory cards require a significant amount of computing time for data encryption and decryption, leading to CPU overload.
An encryption processor with a control circuit, FIFO memory, encryption key generator, XOR operator, and error correction circuit that simultaneously generates and applies XOR keys during data write and read operations, eliminating the need for a buffer memory and reducing CPU tasks.
The solution enables fast encryption and decryption of data with reduced CPU load by generating XOR keys in parallel with data operations, thus enhancing processing speed and efficiency.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
[0001] The invention relates to an encryption processor for a memory card and to an associated method for writing data into a memory chip of the memory card and for reading data therefrom.
[0002] Memory cards are used in digital devices for writing and reading information. Examples of digital devices include digital cameras, personal digital assistants (PDAs), portable music players, mobile phones, personal computers, etc. A memory card typically comprises two chips, such as a flash memory and a control chip. Flash memory, for example, embedded in newer conventional memory cards, has relatively high storage capacity capabilities.
[0003] A memory card typically stores data from a digital device unencrypted in flash memory. However, flash memory can be read by observing a bus between the control chip and the flash memory, and the data can be easily intercepted. Accordingly, a control chip can include an encryption processor to encrypt the predetermined data to be stored in the flash memory.
[0004] An encryption processor typically first encrypts predetermined data and stores the predetermined encrypted data in predetermined units in a first-in, first-out (FIFO) memory. An error correction code (ECC) value of the data stored in the FIFO memory is calculated and stored in the flash memory. In addition, a flash interface reads the predetermined encrypted data from the flash memory when decoding the predetermined encrypted data and then stores the predetermined encrypted data in the FIFO memory. A central processing unit (CPU) reads the predetermined encrypted data from the FIFO memory and supplies the predetermined encrypted data to an internal memory, such as random access memory (RAM), electrically erasable programmable read-only memory (EEPROM), or NOR flash memory.The encryption processor decodes (decrypts) the predetermined encrypted data stored in the internal memory so that the desired data can be obtained. However, the encryption processor typically requires a relatively long time to encrypt or decrypt the data, and this can also overload the CPU.
[0005] Various conventional encryption processors and associated methods for writing and reading data to and from a memory chip of a memory card of the type explained above and similar types are disclosed in the published patent applications DE 103 45 385 A1, US 2002 / 0 044 651 A1 and US 2004 / 0 243 906 A1.
[0006] The technical problem underlying the invention is the provision of an encryption processor and an associated method for reading and writing data, which allow a comparatively fast encryption or decryption of data on a memory card with a reasonably small computational effort.
[0007] The invention solves this problem by providing an encryption processor having the features of patent claim 1 or 2 or 3 and a method having the features of patent claim 15. Advantageous developments of the invention are specified in the subclaims.
[0008] Advantageous embodiments of the invention are illustrated in the drawings and described below. They show: Fig. 1 a block diagram of a memory card system with an encryption processor, Fig. 2 a block diagram of an encryption processor, Fig. 3 a block diagram of an encryption key generator, Fig. 4 is a flowchart of a method for writing data using an encryption processor, Fig. 5 is a timing diagram of a flash memory and operations in an encryption processor during data writing, Fig. 6 is a flowchart of a method for reading data using an encryption processor and Fig. 7 is a timing diagram of a flash memory and operations in an encryption processor during data reading.
[0009] Fig. 1 shows a block diagram of a memory card system including an encryption processor according to an exemplary embodiment of the invention, the memory card system including a memory card 10 and a host 20. The host 20 may be any of a variety of devices capable of exchanging data with a memory card, such as a computer system, a PDA, a digital camera, a cellular phone, a card reader, or the like. The memory card 10 is electrically connected to the host 20. This may be permanently or detachably connected. The memory card 10 may be any type of memory card having flash memory, such as a compact flash (CR) card, a smart media (SM) card, a memory stick, a multimedia card (MMC), a secure digital (SD) card, a subscriber identity module (SIM) card, etc.The host 20 provides data write, data read, and data erase commands to the memory card 10, as well as data addresses and control signals according to these commands.
[0010] The memory card 10 writes data to and reads data from a flash memory 200 in response to the corresponding commands from the host 20. Referring to Fig. 1, the memory card 10 includes a control chip 100 and the flash memory 200. The control chip 100 controls the reception and transmission of data between the host 20 and the flash memory 200. The control chip 100 includes a host interface 110, a buffer memory 120, an encryption processor 130, a flash interface 140, and a central processing unit (CPU) 150.
[0011] Host interface 110 provides an interface between host 20 and memory card 10. Host interface 110 receives commands, addresses, and control signals from host 20 and provides them to CPU 150. The commands may include write, read, and erase commands. Host interface 110 may include interfaces with electrical connections according to various standards or criteria, such interfaces including, for example, those according to the Personal Computer Memory Card International Association (PCMCIA), Universal Serial Bus (USB), PlayStation 2 (PS2), etc.
[0012] Buffer memory 120 stores data written to or read from flash memory 200. While data is being written, buffer memory 120 receives data to be written from host interface 110. Buffer memory 120 may be implemented, for example, as static random access memory (SRAM). Encryption processor 130 encrypts the data stored in buffer memory 120 according to write operations and delivers the predetermined encrypted data to flash interface 140. Furthermore, encryption processor 130 decrypts or decodes data read from flash memory 200 according to read operations and delivers the decrypted data to buffer memory 120.
[0013] The flash interface 140 exchanges data between the control chip 100 and the flash memory 200. The flash interface 140 sends the data encrypted by the encryption processor 130 to the flash memory 200 during a write operation. In addition, the flash interface 140 sends encrypted data read from the flash memory 200 to the encryption processor 130 during a read operation. The CPU 150 is a central processing unit and controls functions of the control chip 100. The CPU 150 controls the host interface 110, the buffer memory 120, and the encryption processor 130 according to commands, addresses, and control signals received from the host interface 110.
[0014] Fig. 2 shows the encryption processor 130 according to an exemplary embodiment of the invention. Referring to Fig. 2, the encryption processor 130 includes a control circuit 131, a first-in-first-out (FIFO) memory 132, an encryption key generator 133, an exclusive-or (XOR) operator 134, and an error correction circuit (ECC) 135.
[0015] Control circuit 131 receives commands and addresses corresponding to data write, data read, and data erase operations from CPU 150 and generates control signals DFS, EES, XFS, and FIS in response. Control circuit 131 controls FIFO memory 132, encryption key generator 133, and error correction circuit 135 of encryption processor 130, as well as flash interface 140, according to control signals DFS, EES, XFS, and FIS.
[0016] FIFO memory 132 is a memory device configured to output data in the same order as it was input (e.g., the data that is input first is output first). FIFO memory 132 operates using a first-in, first-out list. FIFO memory 132 includes several m-byte registers (not shown). During a write operation, the FIFO memory 132 sequentially receives m-byte data D1, D2, ... from the buffer memory 120 in response to the control signal DFS from the control circuit 131. The FIFO memory 132 then sequentially transfers the received m-byte data D1, D2, ... to the XOR operator 134. During a read operation, the FIFO memory 132 sequentially receives m-byte data D1, D2, ... from the XOR operator 134 in response to the control signal DFS from the control circuit 131 and then sequentially transfers the received m-byte data D1, D2, ... to the buffer memory 120.The control circuit 131 receives data write and data read commands for the flash memory 200 from the CPU 150 to generate the control signal DFS, and in response sends the control signal DFS to the FIFO memory 132.
[0017] The encryption key generator 133 generates m bytes of XOR keys that can be encrypted in response to the control signal EES. Specifically, the encryption key generator 133 receives an encryption key EK and a master XOR key MK from the CPU 150 to generate a plurality of encrypted XOR keys XK1, XK2, .... When the same encryption key EK and the same master XOR key MK are received from the CPU 150, the encryption key generator 133 generates the same encrypted XOR keys XK1, XK2, .... The encryption key generator 133 may include registers (not shown) for storing the plurality of XOR keys XK1, XK2, ....
[0018] The encryption key EK and the master XOR key MK can be generated by the CPU 150 or an additional initialization key (not shown). The encryption key EK and the master XOR key MK used to encrypt predetermined data are used identically to decrypt the predetermined encrypted data. To implement this, the CPU 150 or an initialization key generator stores the encryption key EK and the master XOR key MK during data encryption (not shown), which are supplied to the encryption key generator 133. When the predetermined encrypted data is decrypted, the CPU 150 or the initialization key generator supplies the stored encryption key EK and the master XOR key MK to the encryption key generator 133.In one embodiment, the initialization key generator may be integrated into the encryption key generator 133.
[0019] During a data write operation, the XOR operator 134 sequentially performs an XOR operation on the predetermined data D1, D2, ... provided by the FIFO memory 132 with the predetermined encrypted XOR keys XK1, XK2, ... generated by the encryption key generator 133 to provide encrypted data ED1, ED2, .... The XOR operator 134 sends the results of the XOR operation to the flash interface 140. The predetermined encrypted data ED1, ED2, ... resulting from the XOR operations satisfy the following Equation 1, where "U" indicates an XOR operation: D1 U XK1=ED1D2 U XK2=ED2…Dm U XKm=EDm
[0020] During a data read operation, the XOR operator 134 performs an XOR operation on the predetermined encrypted data ED1, ED2, ... provided by the flash interface 140 with the predetermined encrypted XOR keys XK1, XK2, ... generated by the encryption key generator 133. During the data read operation, the XOR keys XK1, XK2, ... generated by the encryption key generator 133 are identical to the predetermined encrypted XOR keys XK1, XK2, ... previously used to encrypt the data D1, D2, .... This is because the CPU 150 or the initialization key generator provides the same encryption key EK and master XOR key MK during the data write operation and the data read operation. Therefore, the decrypted data D1, D2, ... are the results of the XOR operation. The decrypted data D1, D2, ...According to the property of the XOR operation, they satisfy the following equation 2. . ED1 U XK1=(D1 U XK1) U XK1=D1ED2 U XK2=(D2 U XK2) U
[0021] The error correction circuit (ECC) 135 is connected between the flash interface 140 and the XOR operator 134 to correct transmission errors that may occur when transmitting the predetermined encrypted data ED1, ED2, .... The error correction circuit 135 calculates an error correction code value of the predetermined encrypted data ED1, ED2, ... and then stores it in the flash interface 140. The error correction circuit 135 compares the error correction code value with data during a data read operation to correct the data transmission error.
[0022] However, the error correction circuit 135 can only detect errors when the predetermined encrypted data ED1, ED2, ... is transmitted. To correct the detected errors, the error correction circuit 135 detects a bit with an error in the predetermined encrypted data ED1, ED2, .... Then, an XOR operation is performed on the predetermined encrypted data ED1, ED2, ... with the predetermined encrypted XOR keys XK1, XK2, ... to decrypt the read data. Here, it can be determined that the decrypted data D1', D2', ... (corresponding to the original data D1, D2, ...) contains errors. To correct these errors, the CPU 150 receives each bit identified as containing an error from the error correction circuit 135 and then corrects the corresponding bit in the decrypted data D1', D2', ....The corresponding bit error changes from logical 0 to logical 1 or from logical 1 to logical 0 according to the property of the XOR operation.
[0023] The encryption processor 130 simultaneously provides write and read commands and generates the predetermined encrypted XOR keys XK1, XK2, ... during the writing of data to and reading of data from the flash memory 200. The encryption processor 130 performs an XOR operation of the predetermined data D1, D2, ... with the predetermined encrypted XOR keys XK1, XK2, ... generated during a data write operation to provide the predetermined encrypted data ED1, ED2, .... In addition, during the read operation, the encryption processor 130 performs an XOR operation of the predetermined encrypted data ED1, ED2, ... with the same encrypted XOR keys XK1, XK2, ... used during the data write operation to decrypt the predetermined encrypted data ED1, ED2, .... The decrypted data is then sent to the buffer memory 120.Accordingly, the time required for encrypting the predetermined data D1, D2, ... and / or for decrypting the predetermined encrypted data ED1, ED2, ... is reduced compared to conventional methods.
[0024] The memory card using a conventional encryption processor uses a buffer memory as an intermediate medium for encrypting data or decrypting encrypted data. However, the encryption processor 130 of the present embodiment does not require a buffer memory for encrypting data or decrypting encrypted data. Therefore, the memory card using the encryption processor 130 of the present embodiment requires fewer tasks from the CPU 150 compared to conventional memory cards.
[0025] Fig. 3 illustrates the encryption key generator 133 of Fig. 2 according to an exemplary embodiment of the invention. Referring to Fig. 3, the encryption key generator 133 includes a multiplexer 136, an encryption engine 137, an XOR key register 138, and an XOR key FIFO memory 139. The encryption key generator 133 receives an encryption key EK and a master XOR key MK from the CPU 150 to generate a plurality of XOR keys XK1, XK2, ... The multiplexer 136 selects the master XOR key MK supplied by the CPU 150 or the generated XOR keys XK1, XK2, ... The selected key(s) is / are provided to the encryption engine 137. The encryption engine 137 receives the encryption key EK from the CPU 150 and the key(s) supplied from the multiplexer 136 and sequentially generates the predetermined encrypted XOR keys XK1, XK2, .... The XOR register 138 stores the predetermined encrypted XOR keys XK1, XK2, ... generated by the encryption engine 137.
[0026] In one embodiment, for example, the encryption engine 137 may use a data encryption standard (DES) to generate the encrypted XOR keys XK1, XK2, ... The DES is an encryption tool developed by IBM and is a public encryption system introduced by the US National Bureau of Standards in 1974. A DES algorithm includes permutation, substitution, and a modulo function. The security of the public encryption system depends entirely on the keys. This means that encrypted data cannot be decrypted into the original data without the keys, and the keys cannot be determined even if the predetermined encrypted data and the original data are present. A one-way function, e.g., a Hamming function, is used in an encryption field.In the one-way function, y can be easily determined from x, but x cannot be determined from y in y=f(x). This means that the predetermined encrypted data can be obtained from the original data using the key, but the original data cannot be determined from the predetermined encrypted data without the key.
[0027] The predetermined encrypted XOR key FIFO memory 139 temporarily stores the predetermined encrypted XOR keys XK1, XK2, ... stored in the XOR register 138. The XOR key FIFO memory 139 sequentially transfers the predetermined encrypted XOR keys XK1, XK2, ... to the XOR operator 134 in response to the control signal XFS.
[0028] Fig. 4 shows a method for writing data using the encryption processor 130 according to an exemplary embodiment of the invention. Fig. 5 is a timing diagram of the flash memory 200 and the corresponding operations in the encryption processor 130 during data writing. Fig. Figure 5 shows the operations in the encryption processor 130 in relation to exemplary signals on known pins, such as control pin command latch enable (CLE), address latch enable (ALE), chip enable ( / CE), write enable ( / WE), and read enable ( / RE), as well as the data input / output (I / Ox) pins. Referring to the Fig. 4 and Fig. 5, a method for writing data to the flash memory is as follows.
[0029] In step S10, a data write command and XOR key are generated, which may occur simultaneously. Specifically, during a data write operation, the CPU 150 sends the data write command and addresses to the control circuit 131 of the encryption processor 130. Furthermore, the CPU 150 causes the data to be written to the flash memory 200 to be sent from the host interface 110 to the buffer memory 120. The data stored in the buffer memory 120 is then sent to the FIFO memory 132, where it is stored, e.g., in predetermined units. In addition, the CPU 150 sends the keys EK and MK to the encryption key generator 133, which are used to encrypt the predetermined data to be written to the flash memory 200. The CPU 150 may store the sent keys EK and MK in a register (not shown).The predetermined encrypted XOR keys are generated using the keys EK and MK in response to a control signal EES sent by the control circuit 131. The control signal EES may be generated and / or sent simultaneously with the write command.
[0030] The encryption key generator 133, which receives the keys EK and MK from the CPU 150, generates XOR keys XK1, XK2, .... Referring to Fig. 5, the predetermined encrypted XOR keys XK1, XK2, ... are generated in each step and may be predetermined. Referring to Fig. 5, the encryption key generator 133 generates XOR keys XK1, ..., XKn before sending an address to the flash memory 200. The generated XOR keys XK1, ..., XKn are stored in the FIFO memory 139 for predetermined encrypted XOR keys of the encryption key generator 133.
[0031] Here, the XOR operator 134 receives the predetermined stored data D1, ..., Dn from the FIFO memory 132 in response to the control signal DFS and receives the previously stored XOR keys XK1, ..., XKn from the XOR key FIFO memory 139 in response to the control signal XFS. Then, the XOR operator 134 performs an XOR operation of the predetermined data D1, ..., Dn with the predetermined encrypted XOR keys XK1, ..., XKn to generate the encrypted data ED1, ..., EDn, as indicated by step S12 of Fig. 4. In response to a control signal FIS, the predetermined encrypted data ED1, ..., EDn are stored in the flash memory 200 in step S14.
[0032] Referring to Fig. 5, while storing the predetermined encrypted data ED1, ..., EDn in the flash memory 200, the encryption key generator 133 of the encryption processor 130 generates XOR keys XK(n+1), ..., XK(2n), which are stored in the predetermined encrypted XOR key FIFO memory 139. The XOR operator 134 performs an XOR operation of the predetermined data D(n+1), ..., D(2n) with the predetermined encrypted XOR keys XK(n+1), ..., XK(2n) to generate the predetermined encrypted data ED(n+1), ..., ED(2n).
[0033] Similarly, the encryption key generator 133 generates XOR keys XK(2n+1), ..., XK(3n), which are stored in the FIFO memory 139 for predetermined encrypted XOR keys, while the generated encrypted data ED(n+1), ..., ED(2n) is stored in the flash memory 200. The XOR operator 134 then XORs the predetermined data D(2n+1), ..., D(3n) with the predetermined encrypted XOR keys XK(2n+1), ..., XK(3n) to generate the predetermined encrypted data ED(2n+1), ..., ED(3n).
[0034] Referring again to Fig. 5, successive sets of XOR keys are generated while (or after) a set of data is encrypted and sent to flash memory 200 for storage. However, the present invention is not limited to this embodiment. The encryption key generator 133 may generate multiple sets of XOR keys during a data write command and then store them in the XOR key FIFO memory 139.
[0035] As explained above, in step S12 Fig. 4, an XOR operation of data with the predetermined XOR keys is performed. Specifically, the control circuit 131 generates the control signals DFS and XFS, which are transmitted to the FIFO memory 132 and the predetermined encrypted XOR key FIFO memory 139 of the key generator 133, respectively. In response to the control signal DFS, the FIFO memory 132 sends the previously stored data to the XOR operator 134. In response to the control signal XFS, the XOR key FIFO memory 139 sends a previously stored XOR key to the XOR operator 134. The XOR operator 134 performs an XOR operation of the predetermined data with the predetermined encrypted XOR key to generate the predetermined encrypted data.
[0036] In step S14, the predetermined encrypted data ED1, ED2, ... are stored in the flash memory 200. The flash memory 200 according to Fig. 1 is shown separately from the control chip 100, but the present invention is not limited to this configuration. For example, the memory card 10 may include a control chip 100 and the flash memory 200 in one chip without departing from the spirit and scope of the present invention.
[0037] Fig. 6 shows a method for reading data using an encryption processor 130 according to an exemplary embodiment of the invention. Fig. 7 is a timing diagram of a flash memory and corresponding operations in the encryption processor 130 during data reading. Referring to the Fig. 6 and Fig. 7, a method for reading data from the flash memory 200 is as follows.
[0038] In step S20, the data read command and XOR keys XK1, XK2, ... are generated, which can occur simultaneously. During a data read operation, the CPU 150 sends the data read command and an address to the control circuit 131. The CPU 150 sends the keys EK and MK to the encryption key generator 133, which are used to encrypt the predetermined data. Accordingly, the keys EK and MK used for encryption are used to decrypt the encrypted data. The encryption key generator 133 receives the encryption key EK and the master XOR key MK from the CPU 150 to generate a plurality of XOR keys XK1, XK2, ... The predetermined encrypted XOR keys can be generated using the keys EK and MK in response to the control signal EES sent from the control circuit 131. The control signal EES can be generated and / or sent simultaneously with the data read command.
[0039] Referring to Fig. 7, after the input of the data read command, there is sufficient time to generate the predetermined encrypted XOR keys XK1, XK2, ... until the data is read. The generated XOR keys XK1, ..., XKn are stored in the FIFO memory 139 for predetermined encrypted XOR keys of the encryption key generator 133. In step S22, an XOR operation of the predetermined encrypted data with the predetermined XOR key is performed for decryption. The control circuit 131 receives the data read command from the CPU 150 and an address to generate the control signals FIS and XFS. In response to the control signal FIS, the flash interface 140 transmits the predetermined encrypted data ED1, ED2, ... sequentially to the XOR operator 134, as shown in Fig. 7. Further, in response to the control signal XFS, the predetermined XOR keys XK1, XK2, ... stored in the XOR key FIFO memory 139 are sequentially transferred to the XOR operator 134. The XOR operator 134 XORs the predetermined encrypted data ED1, ED2, ... with the predetermined encrypted XOR keys XK1, XK2, ... to decrypt the predetermined encrypted data ED1, ED2, ... and obtain the decrypted data D1, D2, .... The decrypted data D1, D2, ... are sent to the FIFO memory 132.
[0040] In step S24 of Fig.6, the decrypted data D1, D2, ... are sent to an external device, such as the host 20 or an internal block of the control chip 100. The CPU 150 causes the data stored in the FIFO memory 132 to be sent to the buffer memory 120 in step S22. The data transferred to the buffer memory 120 passes through the CPU 150 and is then sent to the external device.
[0041] According to an encryption processor of the invention and the method for writing and reading data using the encryption processor of the invention, XOR keys are generated during data writing and reading, so that data can be encrypted and decrypted quickly compared to conventional methods. Furthermore, a CPU that needs to perform fewer tasks can be used.
Claims
[1] Encryption processor for a memory card storing encrypted data in a memory chip, comprising - an encryption key generator (133) for generating predetermined encrypted XOR keys in response to a first control signal (EES) and for sequentially outputting the predetermined encrypted XOR keys in response to a second control signal (XFS), - a FIFO memory (132) for sequentially outputting predetermined data in response to a third control signal (DFS), - a logic operator (134) for performing a logical XOR operation of the predetermined data output from the FIFO memory with the predetermined encrypted XOR keys output from the encryption key generator during a data write operation to sequentially encrypt the predetermined data and thereby obtain encrypted data which is transmitted to a memory interface (140), and - a control circuit (131) for generating the first control signal, the second control signal and the third control signal in response to a data write command and a write address during a data write operation, wherein the third control signal is supplied to the FIFO memory and the first and second control signals are supplied to the encryption key generator. [2] An encryption processor for a memory card that retrieves encrypted data stored in a memory chip, comprising - an encryption key generator (133) for generating predetermined encrypted XOR keys in response to a first control signal (EES) and for sequentially outputting the predetermined encrypted XOR keys in response to a second control signal (XFS), - a logic operator (134) for performing a logical XOR operation of predetermined encrypted data sent from a memory interface with the predetermined encrypted XOR keys output by the encryption key generator during a data read operation to sequentially decrypt the predetermined encrypted data, and - a control circuit (131) for generating the first control signal and the second control signal in response to a data read command and a read address during the data read operation, wherein the first control signal and the second control signal are supplied to the encryption key generator. [3] Encryption processor for a memory card storing encrypted data in a memory chip, comprising - an encryption key generator (133) for generating predetermined encrypted XOR keys in response to a first control signal (EES) and for sequentially outputting the predetermined encrypted XOR keys in response to a second control signal (XFS), - a FIFO memory (132) for sequentially outputting predetermined data in response to a third control signal (DFS), - a logic operator (134) for performing a logical XOR operation of the predetermined data output from the FIFO memory with the predetermined encrypted XOR keys output from the encryption key generator during a data write operation to sequentially encrypt the predetermined data and transmit it to a memory interface, and for performing a logical XOR operation of the predetermined encrypted data received from the memory interface with the predetermined encrypted XOR keys output from the encryption key generator during a data read operation to sequentially decrypt the predetermined encrypted data and transmit the decrypted data to the FIFO memory, and - a control circuit (131) for generating the first control signal, the second control signal and the third control signal in response to a data write command and a write address during the data write operation and for generating the first control signal and the second control signal in response to a data read command and a read address during the data read operation. [4] An encryption processor according to any one of claims 1 to 3, further comprising an error detection circuit (135) for detecting an error in the predetermined encrypted data while the predetermined encrypted data is being sent from the logic operator to the memory interface. [5] The encryption processor of claim 4, wherein the error detection circuit uses an error correction circuit (ECC). [6] An encryption processor according to any one of claims 1 to 5, wherein the encryption key generator uses a data encryption standard (DES). [7] The encryption processor of any one of claims 1 to 6, wherein the encryption key generator receives initialization keys in response to the second control signal to generate the encrypted XOR keys. [8] The encryption processor of claim 7, wherein the encryption key generator generates the same XOR keys when the respective initialization keys are the same. [9] An encryption processor according to claim 7 or 8, wherein the initialization keys used to generate the encrypted XOR keys for encrypting the predetermined data are also used to generate the encrypted XOR keys for decrypting the predetermined encrypted data. [10] The encryption processor of claim 9, further comprising a memory for storing the initialization keys used to encrypt the predetermined data. [11] The encryption processor of any one of claims 7 to 10, wherein the encryption key generator, in response to the second control signal, initially receives the initialization keys to generate a first predetermined encrypted XOR key and receives at least one of the predetermined encrypted XOR keys to generate subsequent predetermined encrypted XOR keys. [12] The encryption processor of claim 11, wherein the encryption key generator comprises: - a register for storing the predetermined encrypted XOR keys and - an XOR key FIFO memory for temporarily storing the predetermined encrypted XOR keys provided by the register and for sequentially outputting the predetermined encrypted XOR keys in response to the second control signal. [13] An encryption processor according to any one of claims 1 to 12, wherein the memory chip comprises a flash memory. [14] An encryption processor according to any one of claims 1 to 13, wherein the memory card comprises a subscriber identification module (SIM) card. [15] A method for writing and reading data to and from a memory chip of a memory card using an encryption key for encrypting and decrypting data using an encryption processor according to any one of claims 1 to 14, comprising the steps of: - generating a data write command and a data read command and generating a first control signal, a second control signal and a third control signal in response to the data write command and a write address during a data write operation and generating the first control signal and the second control signal in response to the data read command and a read address during a data read operation, - generating predetermined encrypted XOR keys at least in response to the generated first control signal and sequentially outputting the predetermined encrypted XOR keys in response to the generated second control signal, - sequentially performing an XOR operation of predetermined data sequentially output from a FIFO memory in response to the third control signal with the predetermined encrypted XOR keys to obtain encrypted data, - Storing the predetermined encrypted data in the memory chip, - Reading the stored predetermined encrypted data from the memory chip, - sequentially performing the XOR operation of the read predetermined encrypted data with the predetermined encrypted XOR keys to obtain corresponding decrypted data, and - Sending the predetermined decrypted data to an internal component of the memory card or to an external device. [16] The method of claim 15, wherein storing the predetermined encrypted data in the memory chip comprises generating the data write command and the write address in the memory card. [17] The method of claim 15 or 16, wherein generating the data read command and the predetermined encrypted XOR keys comprises generating the data read command and the read address in the memory card. [18] The method of any one of claims 15 to 17, wherein storing the predetermined encrypted data in the memory chip comprises sending the data write command, the write address, and the predetermined encrypted data to the memory card, and wherein reading the stored encrypted data comprises sending the data read command and the read address to the memory card. [19] The method of any one of claims 15 to 18, wherein storing the predetermined encrypted data in the memory chip comprises storing the predetermined encrypted data in data units. [20] The method of any one of claims 15 to 19, further comprising storing the predetermined encrypted data in a FIFO memory of the memory card. [21] Method according to one of claims 15 to 20, further comprising: - Receiving initialization keys from a central processing unit of the memory card and - Generating the predetermined encrypted XOR keys based on the initialization keys when the data write command or the data read command is received. [22] The method of claim 21, wherein the same XOR keys are generated in response to the same initialization keys. [23] A method according to claim 21 or 22, wherein the initialization keys used to encrypt the predetermined data are used to decrypt the predetermined encrypted data. [24] The method of any one of claims 21 to 23, further comprising storing the initialization keys. [25] The method according to any one of claims 21 to 23, wherein an encryption key generator of the memory card, after generating a first predetermined encrypted XOR key of the predetermined encrypted XOR keys, does not receive the initialization keys and receives other ones of the predetermined encrypted XOR keys as an input to continuously generate the predetermined encrypted XOR keys. [26] The method of claim 25, further comprising storing the predetermined encrypted XOR keys in an XOR key FIFO memory of the encryption key generator. [27] Method according to one of claims 15 to 26, further comprising: - Detecting data errors during the transmission of the predetermined encrypted data to the memory chip and - Calculating and storing an error correction value corresponding to the predetermined encrypted data. [28] The method of any one of claims 15 to 27, wherein the XOR operation of second predetermined data is performed using a second predetermined encrypted XOR key to obtain second predetermined encrypted data, while the first predetermined encrypted data encrypted using a first predetermined encrypted XOR key is stored by a memory interface in the memory chip. [29] The method of claim 28, wherein generating the predetermined encrypted XOR keys further comprises reading the predetermined encrypted data from the memory chip into the memory interface according to the data read command and the read address. [30] The method of claim 28 or 29, wherein reading the predetermined encrypted data from the memory chip further comprises correcting data transmission errors according to the stored error correction value when transmitting the predetermined encrypted data from the memory interface. [31] The method of any one of claims 15 to 30, wherein the transmission of the decrypted data further comprises storing the predetermined decrypted data in a FIFO memory of the memory card.
Citation Information
Patent Citations
decryption or encryption for write access to a memory
DE10345385A1
Method and apparatus for improving the security of cryptographic ciphers
US20020044651A1
Method and apparatus for parallelly processing data and error correction code in memory
US20040243906A1
