JP2009537026A - System and method for write failure recovery - Google Patents

System and method for write failure recovery Download PDF

Info

Publication number
JP2009537026A
JP2009537026A JP2009504395A JP2009504395A JP2009537026A JP 2009537026 A JP2009537026 A JP 2009537026A JP 2009504395 A JP2009504395 A JP 2009504395A JP 2009504395 A JP2009504395 A JP 2009504395A JP 2009537026 A JP2009537026 A JP 2009537026A
Authority
JP
Japan
Prior art keywords
data
cell
written
unit
cipher block
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2009504395A
Other languages
Japanese (ja)
Inventor
エルハミアス,リューベン
ベンカットラメン マニ,ビベック
コーヘン,ニブ
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
SanDisk Corp
Original Assignee
SanDisk Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from US11/397,416 external-priority patent/US7835518B2/en
Priority claimed from US11/397,101 external-priority patent/US20070230690A1/en
Application filed by SanDisk Corp filed Critical SanDisk Corp
Publication of JP2009537026A publication Critical patent/JP2009537026A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0618Block ciphers, i.e. encrypting groups of characters of a plain text message using fixed encryption transformation
    • H04L9/0637Modes of operation, e.g. cipher block chaining [CBC], electronic codebook [ECB] or Galois/counter mode [GCM]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/16Error detection or correction of the data by redundancy in hardware
    • G06F11/1666Error detection or correction of the data by redundancy in hardware where the redundant component is memory or memory area
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/16Protection against loss of memory contents
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0643Hash functions, e.g. MD5, SHA, HMAC or f9 MAC
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/16Error detection or correction of the data by redundancy in hardware
    • G06F11/20Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements
    • G06F11/2053Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where persistent mass storage functionality or persistent mass storage control functionality is redundant

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Power Engineering (AREA)
  • Storage Device Security (AREA)

Abstract

暗号ブロック連鎖方式の暗号化/復号化を使用する場合に、暗号ブロック連鎖処理されたデータの書き込みに役立つ情報を、これが格納セルに書き込まれる前に、格納することによって障害回復を達成する。書き込み障害が発覚したら、データをセルに再度書き込むため、この格納情報を引き出すことができる。好ましくは、格納情報は、データ単位の暗号ブロック連鎖処理に関する保安構成情報を含む。  When cipher block chaining encryption / decryption is used, disaster recovery is achieved by storing information useful for writing cipher block chained data before it is written to the storage cell. When a write failure is detected, this stored information can be retrieved to rewrite the data to the cell. Preferably, the storage information includes security configuration information related to cipher block chain processing in units of data.

Description

本発明は、一般的にはデータの暗号化/復号化をともなうメモリシステムに関し、特に書き込み障害回復能力を備えるデータ書き込みのためのメモリシステムまたは方法に関する。   The present invention relates generally to memory systems with data encryption / decryption, and more particularly to a memory system or method for writing data with write failure recovery capability.

ポータブル格納装置は長年にわたり商用に供されている。ポータブル格納装置は、ある一つの計算装置から別の計算装置にかけて、またはバックアップデータを格納するため、データを運ぶ。モバイル装置市場はコンテンツ格納を取り込む方向に発展し、データのやり取りを増やすことによって平均収益を増大させている。これはモバイル装置に格納された貴重なコンテンツを保護しなければならないことを意味する。ポータブル格納装置に格納されたコンテンツを保護するため、格納データは通常暗号化され、権限を持つユーザだけがデータの復号化を許可される。これはクリプトエンジンと呼ばれるエンジンによって行われる。   Portable storage devices have been in commercial use for many years. A portable storage device carries data from one computing device to another or for storing backup data. The mobile device market has evolved to capture content storage, increasing average revenues by increasing data exchange. This means that valuable content stored on the mobile device must be protected. In order to protect the content stored in the portable storage device, the stored data is usually encrypted, and only authorized users are allowed to decrypt the data. This is done by an engine called a crypto engine.

暗号ブロック連鎖方式(CBC)は、前のプレーンテキストブロックを暗号化した結果(暗号テキストブロックの形をとるもの)を次のプレーンテキストブロックの暗号化にフィードバックする暗号化方法である。よって、各々の暗号テキストブロックはプレーンテキストブロックばかりでなく前のプレーンテキストブロックにも左右される。初期ベクトル(IV)は無作為化されたデータであり、CBCプロセスにおける最初のブロックとしてこれが暗号化されることにより暗号化エンジンに固有の入力が提供されるため、暗号化で使用する特定のプレーンテキスト鍵に対し、生成される暗号テキストは依然として固有である。   Cipher block chaining (CBC) is an encryption method that feeds back the result of encrypting a previous plain text block (in the form of a cipher text block) to the encryption of the next plain text block. Thus, each cipher text block depends not only on the plain text block but also on the previous plain text block. The initial vector (IV) is randomized data, which is encrypted as the first block in the CBC process, providing a unique input to the encryption engine, so that the specific plane used for encryption For text keys, the generated ciphertext is still unique.

CBCプロセスは暗号化および/または復号化を実行できるクリプトエンジンによって遂行される。このエンジンのコンテキストは、特定の時間におけるエンジンの現在状態を意味する。特定の暗号化/復号化サイクルでは固有のコンテキストが生成され使用される。   The CBC process is performed by a crypto engine that can perform encryption and / or decryption. This engine context refers to the current state of the engine at a particular time. A specific context is generated and used in a particular encryption / decryption cycle.

書き込み操作中にデータの暗号化のためCBCを使用すると、格納装置のプログラミングに失敗することがある。そのような場合には、格納装置にデータを再度プログラムする必要がある。それには、書き込み操作中に書き込めなかったデータを再び格納装置に転送する必要がある。しかし、ひとたび特定のコンテキストを使ってデータがクリプトまたは暗号化/復号化エンジンを通過すると、適切なコンテキストによってエンジンを再構成しない限り、エンジンに同じデータを通過させることはできない。したがって、前述した問題に対する解決策の提供が望まれる。   Using CBC to encrypt data during a write operation may cause storage device programming to fail. In such a case, the storage device must be reprogrammed with data. This requires that data that could not be written during the write operation be transferred again to the storage device. However, once data passes through a crypto or encryption / decryption engine using a specific context, the engine cannot pass the same data unless the engine is reconfigured with the appropriate context. Therefore, it is desirable to provide a solution to the problem described above.

前述した問題は、一つ以上のプログラミングサイクル中に暗号ブロック連鎖方式で処理されたデータの書き込みに役立つ情報を、そのようなサイクルの中でそのようなデータを格納装置に書き込む前に、格納することによって解決でき、こうすることで、書き込み障害が発生した場合には、そのようなデータを再び格納装置に書き込むことができる。   The problem described above is that information useful for writing data processed in a cipher block chaining scheme during one or more programming cycles is stored before writing such data to the storage device during such cycles. In this way, when a write failure occurs, such data can be written to the storage device again.

少なくとも一つのプログラミングサイクル中、1単位のデータを格納装置に書き込む。一実施形態において、格納される情報は、暗号ブロック連鎖方式で処理された後のデータ単位である。別の実施形態において、格納される情報は、データ単位の暗号ブロック連鎖処理に関する保安構成またはコンテキスト情報を備える。   One unit of data is written to the storage device during at least one programming cycle. In one embodiment, the stored information is a data unit after being processed in the cipher block chaining method. In another embodiment, the stored information comprises security configuration or context information regarding cipher block chaining of data units.

説明の都合上、本願では同じ構成要素には同じ番号をラベル付けする。   For convenience of explanation, the same components are labeled with the same numbers in the present application.

図1のブロック図には、本発明の様々な態様を実施できる代表的なメモリシステムの例が示されている。図1に示されるように、メモリシステム10は中央処理装置(CPU)12と、バッファ管理ユニット(BMU)14と、ホストインターフェイスモジュール(HIM)16およびフラッシュインターフェイスモジュール(FIM)18と、フラッシュメモリ20と、周辺装置アクセスモジュール(PAM)22とを含む。メモリシステム10は、ホストインターフェイスバス26とポート26aとを通じてホスト装置24と通信する。フラッシュメモリ20はNANDタイプのものであってよく、ホスト装置24のためのデータ格納域を提供する。CPU 12のためのソフトウェアコードもフラッシュメモリ20に格納できる。FIM 18は、フラッシュインターフェイスバス28とポート28aとを通じてフラッシュメモリ20へ接続する。HIM 16は、デジタルカメラ、パーソナルコンピュータ、個人用携帯情報端末(PDA)、デジタルメディアプレイヤ、MP−3プレイヤ、携帯電話機、またはその他のデジタル装置をはじめとするホストシステムへの接続に適している。周辺装置アクセスモジュール22は、FIM、HIM、およびBMU等、CPU 12と通信する適当なコントローラモジュールを選択する。一実施形態において、破線の枠内にあるシステム10の全構成要素をメモリカードまたはスティック10’等の単独ユニットで囲い込み、好ましくはカードまたはスティックに封入する。   The block diagram of FIG. 1 illustrates an example of a representative memory system in which various aspects of the present invention can be implemented. As shown in FIG. 1, the memory system 10 includes a central processing unit (CPU) 12, a buffer management unit (BMU) 14, a host interface module (HIM) 16 and a flash interface module (FIM) 18, and a flash memory 20. And a peripheral device access module (PAM) 22. The memory system 10 communicates with the host device 24 through the host interface bus 26 and the port 26a. The flash memory 20 may be of the NAND type and provides a data storage area for the host device 24. Software code for the CPU 12 can also be stored in the flash memory 20. FIM 18 connects to flash memory 20 through flash interface bus 28 and port 28a. The HIM 16 is suitable for connection to a host system including a digital camera, personal computer, personal digital assistant (PDA), digital media player, MP-3 player, mobile phone, or other digital device. Peripheral device access module 22 selects an appropriate controller module that communicates with CPU 12, such as FIM, HIM, and BMU. In one embodiment, all components of the system 10 that are within the dashed frame are enclosed in a single unit, such as a memory card or stick 10 ', preferably enclosed in a card or stick.

バッファ管理ユニット14は、ホストダイレクトメモリアクセス(HDMA)32と、フラッシュダイレクトメモリアクセス(FDMA)コントローラ34と、アービタ36と、バッファランダムアクセスメモリ(BRAM)38と、クリプトエンジン40とを含む。アービタ36は共有バスアービタなので、常にただ一つのマスタまたはイニシエータ(これはHDMA 32、FDMA 34、またはCPU 12であり得る)がアクティブになり、そのスレーブまたはターゲットはBRAM 38である。アービタは、しかるべきイニシエータリクエストをBRAM 38へ振り向ける役割を果たす。HDMA 32とFDMA 34は、HIM 16、FIM 18、およびBRAM 38、またはCPUランダムアクセスメモリ(CPU RAM)12a間でデータの移送を担当する。HDMA 32の動作とFDMA 34の動作は従来どおりであり、本願明細書において詳述する必要はない。BRAM 38は、ホスト装置24と、フラッシュメモリ20と、CPURAM 12aとの間でやり取りされるデータを蓄積するために使用する。HDMA32とFDMA 34は、HIM 16/FIM 18およびBRAM 38またはCPURAM 12a間でデータを転送し、さらにセクタ転送完了を指示する役割を果たす。   The buffer management unit 14 includes a host direct memory access (HDMA) 32, a flash direct memory access (FDMA) controller 34, an arbiter 36, a buffer random access memory (BRAM) 38, and a crypto engine 40. Since arbiter 36 is a shared bus arbiter, there is always only one master or initiator (which can be HDMA 32, FDMA 34, or CPU 12) active and its slave or target is BRAM 38. The arbiter is responsible for directing the appropriate initiator request to the BRAM 38. HDMA 32 and FDMA 34 are responsible for transferring data between HIM 16, FIM 18, and BRAM 38, or CPU random access memory (CPU RAM) 12a. The operation of HDMA 32 and FDMA 34 are conventional and need not be described in detail herein. The BRAM 38 is used to store data exchanged among the host device 24, the flash memory 20, and the CPURAM 12a. The HDMA 32 and the FDMA 34 transfer data between the HIM 16 / FIM 18 and the BRAM 38 or the CPURAM 12a, and further serve to instruct completion of sector transfer.

もとより暗号化されたデータがホスト装置24によってフラッシュメモリ20に書き込まれるときには、ホストからバス26、HIM 16、HDMA 32、クリプトエンジン40まで暗号化データが送信され、ここで暗号化データは復号化され、BRAM 38に格納される。次に、復号化されたデータはBRAM 38からFDMA 34、FIM18、バス28を通じてフラッシュメモリ20へ送信される。BRAM 38から取り出されたデータをFDMA 34へ引き渡す前にクリプトエンジン40により再び暗号化する場合、フラッシュメモリ20へ送信されるデータは、ホスト装置24からのデータの復号化に用いたものとは別の鍵および/またはアルゴリズムによって再び暗号化される。これが書き込みプロセスのときのデータストリームである。   When originally encrypted data is written into the flash memory 20 by the host device 24, the encrypted data is transmitted from the host to the bus 26, the HIM 16, the HDMA 32, and the crypto engine 40, where the encrypted data is decrypted. Stored in the BRAM 38. Next, the decoded data is transmitted from the BRAM 38 to the flash memory 20 through the FDMA 34, the FIM 18, and the bus 28. When the data extracted from the BRAM 38 is encrypted again by the crypto engine 40 before being transferred to the FDMA 34, the data transmitted to the flash memory 20 is different from that used for decrypting the data from the host device 24. It is encrypted again with the key and / or algorithm. This is the data stream for the writing process.

暗号化されていないデータがホスト装置からバス26、HIM 16、HDMA 32を通じてクリプトエンジン40へ送信されるときは、そのような暗号化されていないデータをBRAM 38に格納できる。このデータは暗号化された後にFDMA 34へ送信され、メモリ20へ向かう。書き込みデータが多段暗号処理を通過するときは、好ましくはエンジン40がそのような処理を完了し、その後処理済みデータをメモリ20へ送信する。   When unencrypted data is transmitted from the host device to the crypto engine 40 via the bus 26, HIM 16, and HDMA 32, such unencrypted data can be stored in the BRAM 38. After this data is encrypted, it is transmitted to the FDMA 34 and directed to the memory 20. When the write data passes through the multi-stage encryption process, the engine 40 preferably completes such a process and then transmits the processed data to the memory 20.

多くの用途において、メモリ20等の格納装置にデータが書き込まれるときにリアルタイムでデータ暗号化を行うのが望ましく、これはオンザフライデータ暗号化として知られている。こうすればデータを格納装置に書き込む前の中間ステップとして、暗号化のためのデータを格納する必要がないので、より効率が上がる。よって、好ましくは、暗号化されていないデータまたは暗号化されたデータがホスト24からメモリ20へ送信されるときにはオンザフライで暗号化を行う。   In many applications, it is desirable to perform data encryption in real time when data is written to a storage device such as memory 20, which is known as on-the-fly data encryption. In this way, since it is not necessary to store data for encryption as an intermediate step before writing data to the storage device, efficiency is further increased. Therefore, preferably, encryption is performed on the fly when unencrypted data or encrypted data is transmitted from the host 24 to the memory 20.

前述したプロセスでは、ホスト装置24とメモリ20との間にデータストリームがある。したがって、このときデータ供給源はホスト装置24であり、書き込み先はメモリ20である。加えて、書き込み操作におけるデータ供給源がCPU 12になることもあり、その場合の書き込み先はメモリ20である。データ供給源がホスト装置24であれ、あるいはCPU 12であれ、フラッシュメモリ20に格納するデータはまずエンジン40によって暗号処理が施された後、メモリ20に書き込まれる。   In the process described above, there is a data stream between the host device 24 and the memory 20. Therefore, at this time, the data supply source is the host device 24 and the write destination is the memory 20. In addition, the data supply source in the write operation may be the CPU 12, and the write destination in that case is the memory 20. Regardless of whether the data supply source is the host device 24 or the CPU 12, data stored in the flash memory 20 is first subjected to encryption processing by the engine 40 and then written to the memory 20.

図1のメモリシステムはフラッシュメモリを内蔵することもあるが、代わりに、磁気ディスク、光学式CD等のタイプの異なる不揮発性メモリならびにその他の書き換え可能な不揮発性メモリシステムをシステムに内蔵させることもでき、後述する様々な利点はそのような代替の実施形態に等しく当てはまる。代替の実施形態において、メモリは、好ましくはメモリシステムの残りの構成要素とともに同じ物体(メモリカードまたはスティック等)の中に封入する。   The memory system of FIG. 1 may incorporate a flash memory, but instead, a different type of non-volatile memory such as a magnetic disk, an optical CD, and other rewritable non-volatile memory systems may be included in the system. The various advantages described below are equally applicable to such alternative embodiments. In an alternative embodiment, the memory is preferably encapsulated in the same object (such as a memory card or stick) with the remaining components of the memory system.

BRAM 38に格納されたデータ(ホスト装置24からのデータ、またはCPU 12からのデータ)をフラッシュメモリ20に書き込むときには、メタページとして知られるプログラム可能な単位でデータが書き込まれ、CPU 12の各プログラミングサイクルではフラッシュメモリ20にメタページが書き込まれる。一つのメタページはいくつかのセクタを含むことがあり、セクタのサイズはホストシステムによって決まる。例えば、セクタは、磁気ディスクドライブの規格に従い512バイトのユーザデータと、ユーザデータおよび/またはセクタが帰属するところのメタページに関する何バイトかのオーバーヘッド情報とからなる。   When data stored in the BRAM 38 (data from the host device 24 or data from the CPU 12) is written into the flash memory 20, the data is written in programmable units known as metapages, and each program of the CPU 12 is programmed. In the cycle, a metapage is written in the flash memory 20. A metapage may contain several sectors, and the sector size is determined by the host system. For example, a sector consists of 512 bytes of user data according to the magnetic disk drive standard, and several bytes of overhead information regarding the user data and / or metapage to which the sector belongs.

クリプトエンジン40は、暗号アルゴリズムと暗号鍵を用いて暗号処理を実行あるいは処理する。一般的な暗号アルゴリズムの多くは暗号処理単位として128バイトのデータを処理する。これは通常、フラッシュメモリ20への各プログラミングサイクル中に書き込まれるデータのメタページのサイズを下回る。   The crypto engine 40 executes or processes cryptographic processing using a cryptographic algorithm and a cryptographic key. Many common cryptographic algorithms process 128-byte data as a cryptographic processing unit. This is typically less than the size of the metapage of data written during each programming cycle to flash memory 20.

クリプトエンジン40がデータに対してCBCプロセスを実行する場合、クリプトエンジン40は、データストリームの各プレーンテキストブロック(この場合は暗号処理単位からなるプレーンテキストブロック)に対してCBCプロセスを実行し、対応する暗号テキストブロックを得る。したがって、各暗号処理単位から得られる暗号テキストブロックは、対応する暗号処理単位ばかりでなく、前の暗号処理単位にも左右される。   When the crypto engine 40 executes the CBC process on the data, the crypto engine 40 executes the CBC process for each plain text block of the data stream (in this case, a plain text block made up of cryptographic processing units) and responds. Get the cipher text block to Therefore, the cipher text block obtained from each cipher processing unit depends not only on the corresponding cipher processing unit but also on the previous cipher processing unit.

図2は、本発明の例示に役立つCBCプロセスのブロック図である。図2に示されるように、最初のメタページを処理するときにCBCプロセスは、初期ベクトル(IV)と呼ばれる乱数から開始する。エンジン40が鍵を用いてこの数を暗号化することにより、1ブロックの暗号テキストc1 に到達する。値c1 とメタページの第1のプレーンテキストブロックp1 はXORゲートへ入力として供給され、鍵を用いてゲートの出力を再び暗号化することにより暗号テキストc2 を得る。この操作はXORへ入力されるc2 とプレーンテキストブロックp2 で繰り返され、鍵を用いてゲートの出力を再び暗号化することにより暗号テキストc3 を得る。このプロセスは、メタページ内の全てのプレーンテキストブロックが暗号化されるまで同様の方法で継続する。そして、第2のメタページとその後に続く全てのメタページで同じプロセスが始まるが、その際は初期ベクトル(IV)の代わりに前のメタページの最後の暗号テキストブロックを使用する。 FIG. 2 is a block diagram of a CBC process that serves to illustrate the present invention. As shown in FIG. 2, when processing the first metapage, the CBC process starts with a random number called the initial vector (IV). The engine 40 encrypts this number using a key to arrive at one block of cipher text c 1 . The value c 1 and the first plaintext block p 1 of the metapage are fed as inputs to the XOR gate, and the cipher text c 2 is obtained by re-encrypting the output of the gate using the key. This operation is repeated for c 2 input to XOR and plain text block p 2 , and cipher text c 3 is obtained by re-encrypting the output of the gate using the key. This process continues in a similar manner until all plain text blocks in the metapage are encrypted. The same process then begins with the second metapage and all subsequent metapages, using the last ciphertext block of the previous metapage instead of the initial vector (IV).

暗号テキストブロックはデータストリームのメッセージ認証コード(MAC)と呼ばれることもある。したがって、図2に見られるタイプの第1のメタページに対する暗号化および復号化CBC関数は次のとおりに表すことができる。
暗号化
入力:mビットの鍵k;lビットのIV;
lビットのプレーンテキストブロックp1 ,・・・pr
出力:c0 ・・・cr
1≦i≦rとしc0 ←IV、ci ←ek (ci-1 (+)pi
復号化
入力:mビットの鍵k;lビットのIV;
lビットの暗号テキストブロックc1 ・・・cr
出力:p0 ・・・pr
1≦i≦rとしp0 ←IV、pi ←ci-1 (+)ek-1 (ci
(但し、(+)は排他的論理和の記号を意味する。)
The cipher text block is sometimes referred to as a data authentication message authentication code (MAC). Thus, the encryption and decryption CBC functions for a first metapage of the type found in FIG. 2 can be expressed as follows:
Encryption input: m-bit key k; l-bit IV;
l-bit plain text block p 1 ,... p r
Output: c 0 ··· c r,
1 ≦ i ≦ r and c 0 ← IV, c i ← e k (c i-1 (+) p i )
Decryption input: m-bit key k; l-bit IV;
l-bit cipher text block c 1 ... cr
Output: p 0 ... P r ,
1 ≦ i ≦ r and p 0 ← IV, p i ← c i-1 (+) e k −1 (c i )
(However, (+) means an exclusive OR symbol.)

前述した値c0 ・・・cr は、データストリームに含まれるプレーンテキストブロックp1 ・・・pr からなるメタページの暗号テキストブロックまたはメッセージ認証コード(MAC)である。IVは初期ベクトルであり、kは鍵である。したがって、データブロックp1 ・・・pr を含むメタページを暗号化し、メモリ20へ書き込むことが望まれる場合、システム10のクリプトエンジン40が前述したCBC関数等の関数を用いてデータブロックからMAC値(例えばc0 ・・・cr )を計算し、メモリ20にMAC値を書き込む。前述した式で、ek (x)は鍵kを用いてxを暗号化するプロセスを意味し、ek-1 (x)は鍵kを用いてxを復号化することを意味する。 The value c 0 ··· c r of the aforementioned is a cipher text block or message authentication code metapage consisting plaintext block p 1 ··· p r contained in the data stream (MAC). IV is the initial vector and k is the key. Therefore, it encrypts the metapages with data blocks p 1 ··· p r, if it is desired to write to memory 20, MAC from the data block crypto engine 40 of the system 10 using a function such as a CBC function described above A value (for example, c 0 ... C r ) is calculated, and the MAC value is written in the memory 20. In the above equation, e k (x) means the process of encrypting x using the key k, and e k −1 (x) means that x is decrypted using the key k.

エンジン40が(第1のメタページを除く)各メタページを暗号化するにあたって、IVの代わりに前のメタページの最後のメッセージ認証コードまたは暗号テキストcr を使用する必要があることは、前述した暗号化プロセスから分かる。エンジン40は、第1のメタページの暗号化にあたって初期ベクトルIVを使用する必要がある。 When engine 40 encrypts (excluding first metapage) each metapage, it is necessary to use the last message authentication code or cipher text c r previous meta page instead of IV is above Can be seen from the encryption process. The engine 40 needs to use the initial vector IV in encrypting the first metapage.

書き込み障害回復
CBCを用いた暗号化の後、データストリームに含まれる各メタページの暗号化された暗号テキストブロックまたはMAC値がc0 ・・・cr となることは前の説明から分かる。これらの暗号テキストブロックはその後フラッシュメモリ20に書き込まれる。
After encryption using the write failure recovery CBC, the cipher text blocks or MAC value encrypted for each meta pages included in the data stream is c 0 ··· c r is understood from the previous description. These cipher text blocks are then written to the flash memory 20.

I番目のメタページの書き込みで問題が生じると、暗号化されたメタページの一連のMAC値をもう一度フラッシュメモリ20へ書き込む必要がある。クリプトエンジン40は普通、暗号化データを格納しないので、そのような暗号化データはもはや存在しない。   If a problem occurs in writing the I-th metapage, it is necessary to write the series of MAC values of the encrypted metapage to the flash memory 20 again. Since the crypto engine 40 normally does not store encrypted data, such encrypted data no longer exists.

I番目のメタページの書き込みプロセスをやり直せるようにするため、暗号化されたI番目のメタページ、すなわちc0 ・・・cr は、システム10のどこかに、例えばメモリ20またはRAM 12aの中にあるデータバッファに完全に格納でき、こうすれば暗号化されたI番目のメタページをフラッシュメモリ20に書き込む過程で問題が発覚した場合には、格納された暗号化メタページを再び取り出し、フラッシュメモリ20へ再度書き込むことができる。こうして、暗号化されたI番目のメタページがプログラミングのときに壊れることはなく、書き込み障害が発生した場合には後で取り出すことができる。加えて、CPU 12のプログラミングコードに含まれるプログラムコマンドは、BRAM38からのデータ転送を伴わない。このプログラムコマンドはデータ供給源としてフラッシュメモリ20またはRAM 12aにあるデータバッファを代わりに使用し、データは再びフラッシュメモリ20へ書き込まれる。書き込み障害が発覚する場合はこれらのプログラミングモードを使用できる。 Order to start over the process of writing I th metadata pages, encrypted I th metadata pages, i.e. c 0 ··· c r is, somewhere in the system 10, for example, in memory 20 or RAM 12a In this way, if a problem is found in the process of writing the encrypted I-th metapage to the flash memory 20, the stored encrypted metapage is taken out again and flashed. It can be written again into the memory 20. Thus, the encrypted I-th metapage is not broken during programming and can be retrieved later if a write failure occurs. In addition, the program command included in the programming code of the CPU 12 does not involve data transfer from the BRAM 38. This program command uses the data buffer in the flash memory 20 or RAM 12a instead as a data supply source, and the data is written to the flash memory 20 again. These programming modes can be used if a write failure is detected.

暗号化されたメタページをフラッシュメモリ20またはRAM 12aに格納するには、暗号化されたメタページ全体を格納するにあたって十分に大きいバッファをフラッシュメモリ20またはRAM 12aに用意する必要がある。したがって、好ましくは、そして代案として、エンジン40を適切な状態に戻すにあたって必要な情報だけを格納すれば、暗号化されたメタページの書き込みプロセスに失敗したことが発覚した後でも引き続き、書き込みに失敗した、そのようなメタページのプレーンテキストブロックを再び処理することができる。ここでも暗号化されていないメタページをBRAM 38から取り出し、エンジン40で処理でき、処理されたメタページはメモリ20に再度書き込むことができる。したがって、現在のメタページがエンジン40によって処理される前には、エンジン40のコンテキスト情報または保安構成情報をバッファ、例えば図1のRAM 12aに格納する。そのような情報は好ましくは、前のメタページの最後のメッセージ認証コードまたはMAC値cr と、エンジン40のレジスタの様々な値と、処理に使われている暗号アルゴリズムとを含み、さらに後述した理由から再度書き込みの必要があるメタページ(またはこれの位置)を識別するための情報を適宜含む。第1のメタページを書き込む場合、そのような格納情報は好ましくは、前のメタページの最後のメッセージ認証コードまたはMAC値の代わりに初期ベクトルIVを含む。そのような情報を格納した後、CPU12はFIMおよびFDMAに制御権を返し、FIMおよびFDMAは現在のメタページi を処理し、エンジン40によってこれを暗号化させ、次いで暗号化された現在のメタページをフラッシュメモリ20に書き込む。 In order to store the encrypted metapage in the flash memory 20 or the RAM 12a, it is necessary to prepare a sufficiently large buffer in the flash memory 20 or the RAM 12a for storing the entire encrypted metapage. Therefore, preferably and as an alternative, storing only the information necessary to return the engine 40 to an appropriate state will continue to fail even after it has been discovered that the encrypted metapage writing process has failed. The plain text block of such a metapage can then be processed again. Again, the unencrypted metapage can be retrieved from the BRAM 38 and processed by the engine 40, and the processed metapage can be written back into the memory 20. Therefore, before the current metapage is processed by the engine 40, the context information or security configuration information of the engine 40 is stored in a buffer, for example, the RAM 12a of FIG. Such information preferably includes a last message authentication code or MAC value c r before metapage, and different values of the registers of the engine 40, an encryption algorithm used in processing, and further described below Information for identifying a metapage (or its position) that needs to be written again for a reason is included as appropriate. When writing the first metapage, such stored information preferably includes the initial vector IV instead of the last message authentication code or MAC value of the previous metapage. After storing such information, CPU 12 returns control to FIM and FDMA, which processes the current metapage i and causes it to be encrypted by engine 40, and then encrypted current metapage. Write the page to the flash memory 20.

いくつかの実施形態によってはFIM 18とメモリ20との間にバッファ(図示せず)を使用するのが望ましく、この場合、暗号化されたメタページ、例えば処理対象のメタページの一つ以上のセクタが、フラッシュメモリ20に書き込まれる前にキャッシュされる。このバッファはFIM 18またはメモリ20の一部であってもよい。   In some embodiments, it may be desirable to use a buffer (not shown) between the FIM 18 and the memory 20, in which case one or more encrypted metapages, eg, one or more of the metapages to be processed. Sectors are cached before being written to flash memory 20. This buffer may be part of FIM 18 or memory 20.

キャッシュに入るのは1メタページの一部分だけだが、現在処理中のメタページのデータとキャッシュ内にあるメタページのデータの両方が同時にフラッシュメモリ20に書き込まれる可能性はある。そのような場合に書き込み障害が発覚したら、システムがデータの暗号化とメモリ20への再書き込みを行うにあたってデータストリームの中をどの程度遡ればいいか(すなわち、現在処理中のメタページか、それともキャッシュ内にある後続するメタページか)を判断する必要がある。このため、格納される保安構成またはコンテキスト情報は好ましくは、メモリ20に同時に書き込まれるメタページの開始論理ブロックアドレス(LBA)をも含み、こうすれば、そのようなメタページの一方の書き込みプロセスに失敗したことが発覚した場合でも、システムは書き込みプロセスに失敗したほうのメタページの開始アドレスまで戻ることができ、このメタページは暗号化された状態でフラッシュメモリ20に再度書き込まれる。   Although only a part of one metapage enters the cache, there is a possibility that both the metapage data currently being processed and the metapage data in the cache are simultaneously written to the flash memory 20. If a write failure is detected in such a case, how far can the system go back in the data stream to encrypt the data and rewrite to the memory 20 (ie, the metapage currently being processed, or Need to determine if it is a subsequent metapage in the cache). For this reason, the stored security configuration or context information preferably also includes the starting logical block address (LBA) of the metapage that is written simultaneously to the memory 20, so that one of the writing processes of such a metapage is in the process of writing. Even if a failure is detected, the system can return to the start address of the metapage that failed the writing process, and this metapage is rewritten in the flash memory 20 in an encrypted state.

前述したように、書き込み障害問題を解決する第1の手法では、フラッシュメモリ20、またはRAM 12aに多数の暗号テキストブロックの全てを格納するので、フラッシュメモリまたはRAM 12aにはかなりの格納スペースが必要となる。なぜならば、メタページのどの部分で書き込み障害が起こるのかを事前に正確に知ることはできないからである。このため、暗号テキストブロックを全て格納し、フラッシュメモリに再度書き込めるようにする。   As described above, in the first method for solving the write failure problem, since all of a large number of cipher text blocks are stored in the flash memory 20 or the RAM 12a, a considerable storage space is required in the flash memory or the RAM 12a. It becomes. This is because it is impossible to know in advance exactly which part of the metapage will cause a write failure. For this reason, all the cipher text blocks are stored so that they can be written to the flash memory again.

対照的に、メタページの保安構成情報またはコンテキスト情報だけを格納する第2の手法では、メタページの暗号テキストブロックの全てを格納する必要はない。その代わりに、エンジン40を適切な状態に戻すための情報のほかに格納する必要があるのは、前のメタページの最後の暗号テキストブロックまたは初期ベクトルだけである。前のメタページの最後の暗号テキストブロックまたは初期ベクトルは、現在のメタページに含まれる第1のプレーンテキストブロックとともに入力としてXORゲートへ供給され、このゲートの出力はエンジン40へ入力され、エンジン40は暗号化を実行する。こうして、いずれのメタページの暗号テキストブロックの全てを格納するための容量をフラッシュメモリまたはRAM 12aに用意する必要はなくなる。   In contrast, in the second approach of storing only metapage security configuration information or context information, it is not necessary to store all of the metapage ciphertext blocks. Instead, only the last cipher text block or initial vector of the previous metapage needs to be stored in addition to the information for returning the engine 40 to the proper state. The last cipher text block or initial vector of the previous metapage is supplied as an input to the XOR gate along with the first plaintext block contained in the current metapage, and the output of this gate is input to the engine 40. Performs encryption. In this way, it is not necessary to prepare a capacity for storing all the cipher text blocks of any metapage in the flash memory or the RAM 12a.

前述したように、2つのメタページのデータが処理され同時にフラッシュメモリ20に書き込まれる可能性はある。そこで、RAM 12a内の2つのバッファを使って、処理されている2つのメタページの保安構成情報を格納する。言うまでもなく、3つ以上のメタページがメモリ20に書き込まれる可能性もあり、その場合、代わりに3つ以上のバッファを使用し、そのような変形例および他の変形例も本発明の範囲内である。2つのメタページがフラッシュメモリ20に同時に書き込まれると仮定すると、2つのバッファに格納される2組の保安構成情報を追跡し続けるためにbufferindexと呼ばれるパラメータを使用し、書き込み障害が起きたときには適切な保安構成情報を回収して該当するメタページを再処理する。この場合、保安構成情報を格納する2つのバッファに12a(0)と12a(1)というラベルを付すことができ、bufferindexが0と1とで切り替わることにより保安構成情報を格納する2つのバッファのいずれか一方が明らかになる。図3には、保安構成情報の格納による書き込み障害回復プロセスが示されている。   As described above, data of two metapages may be processed and written to the flash memory 20 at the same time. Therefore, the security configuration information of the two metapages being processed is stored using the two buffers in the RAM 12a. Of course, more than two metapages may be written to the memory 20, in which case more than two buffers are used instead, and such and other variations are within the scope of the invention. It is. Assuming that two metapages are written to the flash memory 20 at the same time, use a parameter called bufferindex to keep track of the two sets of security configuration information stored in the two buffers and is appropriate when a write failure occurs Collect security configuration information and reprocess the corresponding metapage. In this case, the two buffers for storing the security configuration information can be labeled 12a (0) and 12a (1), and the buffer index is switched between 0 and 1 so that the two buffers for storing the security configuration information are stored. Either one becomes clear. FIG. 3 shows a write failure recovery process by storing security configuration information.

CPU 12はまず、2つのバッファ12a(0)と12a(1)に格納されたコンテキストまたは保安構成情報を初期化し、bufferindexの値を0に設定する(ブロック102)。この設定またはコンテキストはCPU 12によってバッファ管理ユニット14とFIM 18にロードされる。これによりFDMA 34の準備は整い、FIM 18はデータを処理できる状態になる。クリプトエンジン40も構成される。CPU 12はこのようなロードの後、フラッシュメモリ20にデータを受け取る準備が整うまで待つ(ブロック104)。こうしてシステム10は書き込み操作106に取りかかれる状態になる。   The CPU 12 first initializes the context or security configuration information stored in the two buffers 12a (0) and 12a (1) and sets the value of bufferindex to 0 (block 102). This setting or context is loaded by the CPU 12 into the buffer management unit 14 and the FIM 18. This prepares the FDMA 34 and the FIM 18 is ready to process data. A crypto engine 40 is also configured. After such loading, the CPU 12 waits until the flash memory 20 is ready to receive data (block 104). System 10 is now ready for write operation 106.

CPU 12はFIM書き込みプログラムを開始させ、各種バスの制御権をFIM 18に譲り渡す(ブロック108)。FIM 18は、BRAM38からFIM 18とフラッシュメモリ20にかけてデータが転送される直前、すなわちDMA書き込み操作コードが発行される前に、CPU 12を中断させる(ブロック110)。バックエンド(BE)フラッシュウェアと中止/再開モジュール(SRM)APIは、フラッシュメモリ20等の格納域からCPU RAM 12aへ読み取られるソフトウェアである。BEフラッシュウェアはCPU 12によって実行され、bufferindexの値が指示するバッファにメタページとエンジン40の暗号コンテキストまたは保安構成情報を保存するためにSRM APIを呼び出す。したがって、bufferindexは当初0に設定されたので、この情報はバッファ12a(0)に格納される。この書き込み操作で書き込むメタページの開始論理ブロックアドレスもバッファ12a(0)に格納する(ブロック112)。   CPU 12 initiates an FIM write program and hands over control of various buses to FIM 18 (block 108). FIM 18 suspends CPU 12 immediately before data is transferred from BRAM 38 to FIM 18 and flash memory 20, that is, before a DMA write operation code is issued (block 110). The back-end (BE) flashware and stop / resume module (SRM) API are software that is read from a storage area such as the flash memory 20 into the CPU RAM 12a. The BE flashware is executed by the CPU 12 and calls the SRM API to save the metapage and engine 40 cryptographic context or security configuration information in a buffer pointed to by the value of bufferindex. Therefore, since bufferindex was initially set to 0, this information is stored in buffer 12a (0). The start logical block address of the metapage to be written by this write operation is also stored in the buffer 12a (0) (block 112).

CPU 12によって実行されるBEフラッシュウェアはその後、装置10の制御権をFIM 18に返す。CPU 12はFDMA 34を起動し、BRAM 38からのメタページデータに対するクリプトエンジン40による暗号化が始まり、メモリ20に書き込まれる(ブロック114)。FIM 18はフラッシュメモリ20に対するメタページ全体のプログラミングが完了したか否かをチェックし、そのようなメタページのプログラミングの合否を指摘する(菱形116)。フラッシュメモリ20に対するメタページの書き込みに無事成功するとbufferindexを1増加させ、次にこれを2(またはモジュロ2)で割り、余りを求める(ブロック112)。この場合のbufferindexはあらかじめ0に設定されているから、そのような操作によってbufferindexはブロック122で1になり、次のメタページでプロセスを繰り返すため、FIM 18はブロック104で制御権をCPU 12に返す。bufferindexは1に設定されているので、次のメタページを書き込む次のサイクルではバッファ12a(1)にコンテキストまたは保安構成情報を書き込む。   The BE flashware executed by CPU 12 then returns control of device 10 to FIM 18. The CPU 12 activates the FDMA 34, and encryption of the metapage data from the BRAM 38 by the crypto engine 40 begins and is written to the memory 20 (block 114). The FIM 18 checks whether or not programming of the entire metapage for the flash memory 20 has been completed, and points out the success or failure of such metapage programming (diamond 116). If the metapage is successfully written to the flash memory 20, the buffer index is incremented by 1, and then divided by 2 (or modulo 2) to obtain the remainder (block 112). Since the bufferindex in this case is set to 0 in advance, the bufferindex is set to 1 at block 122 by such an operation, and the process is repeated at the next metapage, so the FIM 18 transfers the control right to the CPU 12 at block 104. return. Since bufferindex is set to 1, in the next cycle in which the next metapage is written, context or security configuration information is written to the buffer 12a (1).

しかし、プログラミングに合格しなかった場合、FIM 18がプロセッサ12を中断させ(ブロック118)、再試行メカニズム120を用いて書き込み操作の再試行が行われる。再試行メカニズムは図4に示されている。図4を参照し、FIM 18が書き込み操作の障害を検出する場合に、書き込み障害の場所と書き込み障害が発生したメタページがどれなのかを把握する。つまり、FIM 18は、書き込み障害が発生したメタページの開始論理ブロックアドレス(LBA)を把握する。このアドレスを2つのバッファ12a(0)および12a(1)の中にある開始LBAアドレスに照合または比較し、書き込み障害が発生したメタページのものに一致するLBAアドレスを収容するバッファを特定する(ブロック152)。そして、特定されたそのようなバッファに格納されたコンテキストまたは保安構成情報を用いてクリプトエンジン40の状態を復元する(ブロック154)。CPU 12はFIM 18と、FDMA 34と、エンジン40とを起動して、書き込み障害が発生したメタページの開始論理ブロックアドレスからBRAM 38のメタページは再び暗号化され、暗号化されたメタページはこれまでどおりフラッシュメモリ20に書き込まれる(ブロック156、158)。FIM 18も、不完全な暗号化メタページがメモリ20に書き込まれた場合に、これを削除するかまたは削除の対象としてマークする。CPU 12は、この操作が完了した後に図3のブロック104へ操作を戻す。   However, if the programming fails, FIM 18 suspends processor 12 (block 118) and the retry operation 120 is used to retry the write operation. The retry mechanism is illustrated in FIG. Referring to FIG. 4, when the FIM 18 detects a failure in the write operation, the location of the write failure and the metapage in which the write failure has occurred are grasped. That is, the FIM 18 grasps the start logical block address (LBA) of the metapage where the write failure has occurred. This address is compared or compared with the starting LBA address in the two buffers 12a (0) and 12a (1) to identify the buffer containing the LBA address that matches that of the metapage where the write failure occurred ( Block 152). The state of the crypto engine 40 is then restored using the identified context or security configuration information stored in such a buffer (block 154). CPU 12 starts FIM 18, FDMA 34, and engine 40, and the metapage of BRAM 38 is re-encrypted from the start logical block address of the metapage where the write failure occurred, and the encrypted metapage is The data is written into the flash memory 20 as before (blocks 156 and 158). FIM 18 also deletes or marks it for deletion if an incomplete encrypted metapage is written to memory 20. The CPU 12 returns the operation to the block 104 in FIG. 3 after this operation is completed.

前述したように、2つ以上のメタページのデータがメモリ20に同じサイクル中に書き込まれるかまたはプログラムされる可能性はある。したがって、ある一つのメタページのデータをメモリ20に書き込んでいるときに書き込みエラーが発生する場合、そのようなメタページに先行するメタページのデータもメモリ20に書き込まれているなら、そのようなメタページだけでなく先行メタページも再度書き込むかまたは再度プログラムすることが、必要かまたは望ましい。そこでCPU 12は、書き込み障害が発生する場合、データの再書き込みまたは再プログラミングをどこまで遡って行うべきかを判断する。換言すると、CPU 12は書き込み障害が発生したメタページだけを再度書き込むかまたは再度プログラムするか、それともこれに先行するメタページも併せて再度書き込むかまたは再度プログラムするかを判断する。好ましくは、たとえ先行するメタページのプログラミング中に書き込み障害が発生しなくても、先行するメタページがメモリ20に完全に書き込まれていないのなら、先行するメタページも再度書き込むかまたは再度プログラムする。2つのメタページが同じサイクル中に書き込まれる可能性のある実施例において、ある特定のメタページのプログラミング状態は、キャッシュ内にある次のメタページのプログラミングが終了した後でないと分からない。そのような場合、CPU 12は常に2つのメタページ(すなわち、書き込み障害が発生したメタページとその先行するメタページ)を遡って再プログラムし、最後のメタページに限っては最後のメタページだけを再プログラムする。   As described above, two or more metapage data may be written or programmed to memory 20 during the same cycle. Therefore, when a write error occurs when data of a certain metapage is written in the memory 20, such a metapage data preceding the metapage is also written in the memory 20. It may be necessary or desirable to rewrite or reprogram the preceding metapage as well as the metapage. Therefore, when a write failure occurs, the CPU 12 determines how far back the data should be rewritten or reprogrammed. In other words, the CPU 12 determines whether to rewrite or reprogram only the metapage in which the write failure has occurred, or to rewrite or reprogram the metapage that precedes it. Preferably, even if a write failure does not occur during programming of the preceding metapage, if the preceding metapage is not completely written to memory 20, the preceding metapage is also rewritten or reprogrammed. . In embodiments where two metapages may be written during the same cycle, the programming state of a particular metapage is only known after the next metapage in the cache has finished programming. In such a case, the CPU 12 always reprograms the two metapages (ie, the metapage in which the write failure occurred and the preceding metapage), and only the last metapage is limited to the last metapage. Reprogram.

3つ以上のバッファを使ってコンテキストまたは保安構成情報と3つ以上の対応するメタページの開始論理ブロックアドレスとを格納する場合、RAM 12a内の2つのバッファにインデックスを付ける代わりに3つ以上のバッファにインデックスを付けることにより、前述したプロセスを容易く拡張できる。前述した操作は、メタページが暗号化される場合の書き込み障害回復に関するものである。BRAM 38内の暗号化データがメモリ20に書き込まれる前に復号化される場合にも、基本的には同じプロセスが当てはまる。これまでオンザフライ方式のデータ暗号処理を参照しながら本発明の実施形態を例示してきたが、データの書き込みプロセス中にオンザフライ方式のデータ暗号処理を実行しないシステムにもこれが当てはまることが理解できる。前述した実施形態では、エンジンによって処理される特定サイズのデータブロックと様々なサイズのメタページの様々な例に言及しているが、エンジン40によって処理される異なるサイズのデータブロックと異なるサイズのメタページにも同じ利点が当てはまることが理解できる。用途によっては、書き込み障害が検出された場合、書き込み障害が発生したメタページの先頭ではなく、そのようなメタページの中にあるセクタまでシステムが戻り、そのようなセクタと、データストリームの中でそのようなセクタの後に続くそのようなメタページ内の全てのセクタとを暗号化し、メモリ20に再度書き込むことが望まれる。こうしてシステムは、そのようなメタページの中で書き込み障害が発生したセクタに先行するセクタを暗号化せずにすむ。これにより効率は上がる。これらの変形例とその他の変形例はどれも本発明の範囲内にある。   When using more than two buffers to store context or security configuration information and the starting logical block address of more than two corresponding metapages, instead of indexing the two buffers in RAM 12a, more than two By indexing the buffer, the process described above can be easily extended. The operation described above relates to recovery from a write failure when the metapage is encrypted. The same process applies basically when the encrypted data in the BRAM 38 is decrypted before being written to the memory 20. While the embodiments of the present invention have been illustrated with reference to on-the-fly data encryption processing so far, it can be understood that this also applies to systems that do not perform on-the-fly data encryption processing during the data writing process. Although the above-described embodiments refer to various examples of specific size data blocks and various sized metapages processed by the engine, different sized data blocks processed by the engine 40 and different sized metapages. You can see that the same benefits apply to pages. Depending on the application, if a write failure is detected, the system will return to the sector within the metapage instead of the beginning of the metapage where the write failure occurred, and such sectors and data streams It is desirable to encrypt all sectors in such metapages that follow such sectors and rewrite them into memory 20. In this way, the system does not need to encrypt the sector that precedes the sector where the write failure occurred in such a metapage. This increases efficiency. All of these and other variations are within the scope of the present invention.

以上、様々な実施形態を参照しながら本発明を説明してきたが、添付の特許請求の範囲とその同等物とによってのみ定められる本発明の範囲から逸脱することなく変更と修正を施すことができることは理解されよう。本願明細書で参照した参考資料は、その全体が本願明細書において参照により援用されている。   Although the invention has been described with reference to various embodiments, changes and modifications can be made without departing from the scope of the invention which is defined solely by the appended claims and their equivalents. Will be understood. The reference material referred to in this specification is hereby incorporated by reference in its entirety.

本発明を例示する、ホスト装置と通信するメモリシステムのブロック図である。1 is a block diagram of a memory system in communication with a host device, illustrating the present invention. 本発明の例示に役立つ、CBCプロセスのブロック図である。FIG. 3 is a block diagram of a CBC process that is useful for illustrating the present invention. 本発明の一実施形態を例示する、保安構成情報を格納する格納装置にデータを書き込む際の図1のシステムの動作を示すフローチャートである。2 is a flowchart illustrating the operation of the system of FIG. 1 when writing data to a storage device that stores security configuration information, illustrating an embodiment of the present invention. 本発明の実施形態を例示する、書き込みに失敗したデータの書き込み操作の再試行にあたって格納済みの保安構成情報を用いてクリプトエンジンを再構成する場合の図1のシステムの動作を示すフローチャートである。2 is a flowchart illustrating the operation of the system of FIG. 1 when reconfiguring a crypto engine using stored security configuration information when retrying a write operation of data that failed to be written, illustrating an embodiment of the present invention.

Claims (26)

不揮発性メモリセルと暗号回路とを備える暗号化データを格納するメモリシステムでデータを処理する方法であって、
セルに書き込むデータストリーム内のデータに対する暗号ブロック連鎖処理を回路に実行させるステップと、
一連のプログラミングサイクルでデータストリーム内のデータをセルに書き込むことににより、データストリーム内のデータがセルに書き込まれる前に回路による暗号ブロック連鎖処理によって処理されるステップと、
プログラミングサイクルの少なくとも一つのプログラミングサイクル中に、そのようなサイクルで暗号ブロック連鎖処理済みデータの書き込みに役立つ情報を、そのようなデータがセルに書き込まれる前に、格納することにより、そのようなデータが書き込み障害が発覚した後に再びセルに書き込むことができるステップと、
を含む方法。
A method of processing data in a memory system that stores encrypted data comprising a non-volatile memory cell and a cryptographic circuit,
Causing the circuit to perform cryptographic block chaining on the data in the data stream to be written to the cell;
Writing the data in the data stream to the cells in a series of programming cycles, whereby the data in the data stream is processed by a cryptographic block chaining process before being written to the cells;
During at least one programming cycle of a programming cycle, such data can be stored by storing information useful for writing cipher block chained data in such cycle before such data is written to the cell. Can write to the cell again after a write failure is detected,
Including methods.
請求項1記載の方法において、
そのようなサイクルでセルに対する暗号ブロック連鎖処理済みデータの書き込み障害を検出するステップと、
格納済み情報を用いて暗号ブロック連鎖処理済みデータをセルに書き込むステップと、
をさらに含む方法。
The method of claim 1, wherein
Detecting a write failure of cipher block chained data to the cell in such a cycle;
Writing the encrypted block chained data into the cell using the stored information;
A method further comprising:
請求項2記載の方法において、
セルへの書き込みに失敗したデータに対し、格納済み情報を用いた暗号ブロック連鎖処理を回路に実行させて、そのようなプロセスにてセルへ再び書き込まれる暗号ブロック連鎖処理済みデータを得るステップとをさらに含む方法。
The method of claim 2, wherein
A step of causing a circuit to execute a cipher block chaining process using stored information for data that has failed to be written to a cell, and obtaining cipher block chaining processed data to be rewritten to the cell in such a process. Further comprising a method.
請求項3記載の方法において、
前記少なくとも一つのプログラミングサイクルでデータを書き込むことはデータ単位をセルに書き込み、前記格納することは前記データ単位をこれが暗号ブロック連鎖処理された後に格納する方法。
The method of claim 3, wherein
Writing data in the at least one programming cycle writes a data unit to a cell, and storing stores the data unit after it has been cryptographic block chained.
請求項3記載の方法において、
前記少なくとも一つのプログラミングサイクルでデータを書き込むことはデータ単位をセルに書き込み、前記格納することは前記データ単位の暗号ブロック連鎖処理に関する保安構成情報を格納する方法。
The method of claim 3, wherein
Writing data in the at least one programming cycle writes a data unit to a cell, and storing stores security configuration information related to cipher block chaining of the data unit.
請求項5記載の方法において、
保安構成情報は、暗号鍵、暗号アルゴリズム、および/またはメッセージ認証コードと初期ベクトルのいずれか一方を含む方法。
The method of claim 5, wherein
The security configuration information includes a cryptographic key, a cryptographic algorithm, and / or a message authentication code and an initial vector.
請求項6記載の方法において、
メッセージ認証コードおよび/または初期ベクトルを含む格納済み保安構成情報を引き出すステップと、引き出されたメッセージ認証コードおよび/または初期ベクトルから更新されたメッセージ認証コードを導き出すステップとをさらに含む方法。
The method of claim 6 wherein:
A method further comprising: retrieving stored security configuration information including a message authentication code and / or an initial vector; and deriving an updated message authentication code from the retrieved message authentication code and / or initial vector.
請求項5記載の方法において、
前記格納することは、少なくとも2つの連続する各プログラミングサイクル中に、そのようなサイクルにおけるデータ単位の暗号ブロック連鎖処理に関する保安構成情報をそのようなデータがセルに書き込まれる前に格納する方法。
The method of claim 5, wherein
The storing is a method of storing security configuration information regarding cipher block chaining of data units in such a cycle before each such data is written to a cell during at least two consecutive programming cycles.
請求項8記載の方法において、
格納される保安構成情報は、データ単位の位置を特定するための位置情報を含む方法。
The method of claim 8, wherein
The stored security configuration information includes a location information for specifying a location of a data unit.
請求項9記載の方法において、
少なくとも一つの暗号ブロック連鎖処理済みデータ単位の一つ以上の部分を、これがセルに書き込まれる前に、キャッシュするステップであって、前記書き込むことは、前記少なくとも一つのサイクル中に前記少なくとも一つの暗号ブロック連鎖処理済み単位のデータともう一つの単位とをセルに書き込み、さらに前記検出することは、キャッシュされたデータ単位ともう一つの単位とで、どちらのデータ単位がセルへの書き込みに失敗したかを検出するステップと、
書き込みに失敗した、暗号ブロック連鎖処理前の形をとる前記データ単位の位置を位置情報を用いて特定するステップであって、前記回路は、そのようなデータ単位に対して暗号ブロック連鎖処理を実行するステップと、
をさらに含む方法。
The method of claim 9, wherein
Caching one or more portions of at least one cipher block chained data unit before it is written to a cell, said writing comprising said at least one cipher during said at least one cycle; The block chain processed unit data and another unit are written to the cell, and the above detection is based on the cached data unit and the other unit, which data unit failed to be written to the cell. Detecting whether or not
The step of identifying the position of the data unit that has failed to be written and takes the form before the cipher block chaining process by using position information, and the circuit performs the cipher block chaining process for such data unit And steps to
A method further comprising:
請求項10記載の方法において、
前記検出済みデータ単位は、これの一つ以上の部分がキャッシュされたデータ単位であり、前記方法は、そのようなデータ単位ならびにデータストリームの中でそのような単位に先行しかつ完全にはセルに書き込まれなかった全てのデータ単位とに対して暗号ブロック連鎖処理を前記回路に実行させるステップをさらに含む方法。
The method of claim 10, wherein
The detected data unit is a data unit in which one or more parts of it are cached, and the method is preceded by such a data unit as well as such a unit in the data stream and fully cell. The method further includes the step of causing the circuit to execute a cipher block chaining process for all data units that have not been written to.
請求項11記載の方法において、
セルに完全には書き込まれなかったいずれの単位も、セルから削除するかまたは削除すべき単位としてマークするステップをさらに含む方法。
The method of claim 11 wherein:
The method further comprising the step of deleting any unit that was not completely written to the cell or marking it as a unit to be deleted from the cell.
不揮発性メモリセルと暗号回路とを備える暗号化データを格納するメモリシステムでデータを処理する方法であって、
セルへ向かうデータストリーム内のデータに対する暗号ブロック連鎖処理を回路に実行させるステップと、
一連のプログラミングサイクルでデータストリーム内のデータをセルに書き込むことにより、データストリーム内のデータがセルに書き込まれる前に回路によって処理されるステップと、
プログラミングサイクルの少なくとも一つのプログラミングサイクル中に、そのようなサイクルの少なくとも一部分でデータの暗号ブロック連鎖処理に役立つ情報をそのようなデータがセルに書き込まれる前に格納することにより、そのようなデータが書き込み障害が発覚した後に暗号ブロック連鎖処理された上で再びセルに書き込むことができるステップと、
を含む方法。
A method of processing data in a memory system that stores encrypted data comprising a non-volatile memory cell and a cryptographic circuit,
Causing the circuit to perform cryptographic block chaining on the data in the data stream towards the cell;
Writing the data in the data stream to the cells in a series of programming cycles, whereby the data in the data stream is processed by the circuit before being written to the cells;
During at least one programming cycle of a programming cycle, such data is stored by storing information useful for cryptographic block chaining of the data in at least a portion of such cycle before such data is written to the cell. A step of being able to write to the cell again after being subjected to the cryptographic block chaining after the write failure is detected,
Including methods.
暗号化データを格納するメモリシステムであって、
不揮発性メモリセルと、
セルへ向かうデータストリーム内のデータに対する暗号ブロック連鎖処理を実行する回路と、
一連のプログラミングサイクルでデータストリームからセルへ暗号ブロック連鎖処理済みデータを書き込むコントローラであって、プログラミングサイクルの少なくとも一つのプログラミングサイクル中に、そのようなサイクルで暗号ブロック連鎖処理済みデータの書き込みに役立つ情報をそのようなデータがセルに書き込まれる前に格納することにより、そのようなデータが書き込み障害が発覚した後に再びセルに書き込むことができるコントローラと、
を備えるシステム。
A memory system for storing encrypted data,
A non-volatile memory cell;
A circuit that performs cryptographic block chaining on the data in the data stream going to the cell;
A controller that writes cipher block chained data from a data stream to a cell in a series of programming cycles, which is useful for writing cipher block chained data in such cycles during at least one programming cycle of the programming cycle. A controller that allows such data to be written to the cell again after a write failure is detected by storing such data before it is written to the cell;
A system comprising:
請求項14記載のシステムにおいて、
前記コントローラは、そのようなサイクルでセルに対する暗号ブロック連鎖処理済みデータの書き込み障害を検出し、かつ格納済み情報を用いて暗号ブロック連鎖処理済みデータを再びセルに書き込むシステム。
The system of claim 14, wherein
The controller detects a write failure of cipher block chained data for a cell in such a cycle, and writes the cipher block chained data to the cell again using stored information.
請求項15記載のシステムにおいて、
前記コントローラは、そのようなデータが暗号ブロック連鎖処理された後にセルへの書き込みに失敗したデータに対して格納済み情報を用いた暗号ブロック連鎖処理を回路に実行させ、セルへ再び書き込まれる暗号ブロック連鎖処理済みデータを得るシステム。
The system of claim 15, wherein
The controller causes the circuit to execute a cipher block chain process using stored information for data that has failed to be written to the cell after the data has been subjected to the cipher block chain process, and the cipher block to be rewritten to the cell A system for obtaining chained data.
請求項16記載のシステムにおいて、
前記少なくとも一つのプログラミングサイクルでデータを書き込むことは、データ単位をセルに書き込み、前記コントローラは、前記データ単位をこれが暗号ブロック連鎖処理された後に格納するシステム。
The system of claim 16, wherein
Writing data in the at least one programming cycle writes a data unit to a cell, and the controller stores the data unit after it has been cryptographic block chained.
請求項16記載のシステムにおいて、
前記少なくとも一つのプログラミングサイクルでデータを書き込むことは、データ単位をセルに書き込み、前記コントローラは、前記データ単位の暗号ブロック連鎖処理に関する保安構成情報を格納するシステム。
The system of claim 16, wherein
Writing data in the at least one programming cycle writes a data unit to a cell, and the controller stores security configuration information related to cryptographic block chain processing of the data unit.
請求項18記載のシステムにおいて、
保安構成情報は、暗号鍵、暗号アルゴリズム、および/またはメッセージ認証コードと初期ベクトルのいずれか一方を含むシステム。
The system of claim 18, wherein
The security configuration information includes a cryptographic key, a cryptographic algorithm, and / or a message authentication code and an initial vector.
請求項19記載のシステムにおいて、
前記コントローラは、メッセージ認証コードおよび/または初期ベクトルを含む格納済み保安構成情報を引き出し、かつ引き出されたメッセージ認証コードから更新されたメッセージ認証コードを導き出すシステム。
The system of claim 19, wherein
The system wherein the controller retrieves stored security configuration information including a message authentication code and / or an initial vector, and derives an updated message authentication code from the retrieved message authentication code.
請求項18記載のシステムにおいて、
前記コントローラは、少なくとも2つの連続する各プログラミングサイクル中に、そのようなサイクルにおけるデータ単位の暗号ブロック連鎖処理に関する保安構成情報をそのようなデータがセルに書き込まれる前に格納するシステム。
The system of claim 18, wherein
The controller stores security configuration information regarding cipher block chaining of data units in such a cycle during at least two consecutive programming cycles before such data is written to the cell.
請求項21記載のシステムにおいて、
格納される保安構成情報は、データ単位の位置を特定するための位置情報を含むシステム。
The system of claim 21, wherein
The stored security configuration information is a system that includes location information for specifying the location of a data unit.
請求項22記載のシステムにおいて、
前記システムは、少なくとも一つの暗号ブロック連鎖処理済みデータ単位の一つ以上の部分を、前記部分がセルに書き込まれる前に、キャッシュする格納域をさらに備え、前記コントローラは、前記少なくとも一つのサイクル中に前記少なくとも一つの暗号ブロック連鎖処理済み単位のデータともう一つの単位とをセルに書き込み、さらにキャッシュされたデータ単位ともう一つの単位とで、どちらのデータ単位がセルへの書き込みに失敗したかを検出し、かつ暗号ブロック連鎖処理前の形をとる前記検出済みデータ単位の位置を位置情報を用いて特定し、またそのようなデータ単位に対して暗号ブロック連鎖処理を前記回路に実行させるシステム。
The system of claim 22, wherein
The system further comprises a vault that caches one or more portions of at least one cipher block chained data unit before the portion is written to a cell, the controller during the at least one cycle. The data of the at least one cipher block chained unit and the other unit are written to the cell, and either of the cached data unit and the other unit fails to write to the cell. And detecting the position of the detected data unit that takes the form before the cipher block chaining process using position information, and causing the circuit to execute the cipher block chaining process for such a data unit. system.
請求項23記載のシステムにおいて、
前記検出済みデータ単位は、これの一つ以上の部分がキャッシュされたデータ単位であり、前記コントローラは、そのようなデータ単位ならびにデータストリームの中でそのような単位に先行しかつ完全にはセルに書き込まれなかった全てのデータ単位とに対して暗号ブロック連鎖処理を前記回路に実行させるシステム。
24. The system of claim 23.
The detected data unit is a data unit in which one or more parts of it are cached, and the controller is responsible for such data unit as well as preceding such a unit in the data stream and fully cell. A system for causing the circuit to execute a cipher block chaining process for all data units that have not been written to the data.
請求項24記載のシステムにおいて、
前記コントローラは、セルに完全には書き込まれなかったいずれの単位もセルから削除するかまたは削除すべき単位としてマークするシステム。
25. The system of claim 24.
The controller is a system in which any unit that has not been completely written to a cell is deleted from the cell or marked as a unit to be deleted.
暗号化データを格納するメモリシステムであって、
不揮発性メモリセルと、
セルへ向かうデータストリーム内のデータに対する暗号ブロック連鎖処理を実行する回路と、
一連のプログラミングサイクルでデータストリームからセルへ暗号ブロック連鎖処理済みデータを書き込むコントローラであって、プログラミングサイクルの少なくとも一つのプログラミングサイクル中に、そのようなサイクルの少なくとも一部分でデータの暗号ブロック連鎖処理に役立つ情報をそのようなデータがセルに書き込まれる前に格納することにより、そのようなデータが書き込み障害が発覚した後に暗号ブロック連鎖処理された上で再びセルに書き込むことができるコントローラと、
を備えるシステム。
A memory system for storing encrypted data,
A non-volatile memory cell;
A circuit that performs cryptographic block chaining on the data in the data stream going to the cell;
A controller that writes cipher block chained data from a data stream to a cell in a series of programming cycles, and serves cipher block chaining of data during at least a portion of such cycles during at least one of the programming cycles. A controller that stores information before such data is written to the cell, so that such data can be re-written to the cell after a cryptographic block chaining after a write failure is detected;
A system comprising:
JP2009504395A 2006-04-03 2007-03-30 System and method for write failure recovery Pending JP2009537026A (en)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
US11/397,416 US7835518B2 (en) 2006-04-03 2006-04-03 System and method for write failure recovery
US11/397,101 US20070230690A1 (en) 2006-04-03 2006-04-03 System for write failure recovery
PCT/US2007/065679 WO2007118034A2 (en) 2006-04-03 2007-03-30 System and method for write failure recovery

Publications (1)

Publication Number Publication Date
JP2009537026A true JP2009537026A (en) 2009-10-22

Family

ID=38581765

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009504395A Pending JP2009537026A (en) 2006-04-03 2007-03-30 System and method for write failure recovery

Country Status (4)

Country Link
JP (1) JP2009537026A (en)
KR (1) KR20080108119A (en)
TW (1) TW200817993A (en)
WO (1) WO2007118034A2 (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002132141A (en) * 2000-10-20 2002-05-09 Sony Corp Data memory and data recording method, data reproducing method as well as program provision medium
US7360076B2 (en) * 2001-06-13 2008-04-15 Itt Manufacturing Enterprises, Inc. Security association data cache and structure
US7461268B2 (en) * 2004-07-15 2008-12-02 International Business Machines Corporation E-fuses for storing security version data
JP4703148B2 (en) * 2004-09-08 2011-06-15 株式会社東芝 Nonvolatile semiconductor memory device

Also Published As

Publication number Publication date
WO2007118034A3 (en) 2009-08-13
KR20080108119A (en) 2008-12-11
WO2007118034A2 (en) 2007-10-18
TW200817993A (en) 2008-04-16

Similar Documents

Publication Publication Date Title
US7835518B2 (en) System and method for write failure recovery
TWI411932B (en) Method for encrypting/decrypting data in non-volatile memory in a storage device and method for processing data
CN102334307B (en) Key recovery mechanism for cryptographic systems
US9396136B2 (en) Cascaded data encryption dependent on attributes of physical memory
US20040172538A1 (en) Information processing with data storage
JP5118494B2 (en) Memory system having in-stream data encryption / decryption function
US8843768B2 (en) Security-enabled storage controller
JP2010509690A (en) Method and system for ensuring security of storage device
US20110311048A1 (en) Cryptographic operation apparatus, storage apparatus, and cryptographic operation method
US9323943B2 (en) Decrypt and encrypt data of storage device
KR20080069018A (en) Method and apparatus for encrypting and processing data in flash translation layer
JP2008524969A5 (en)
JP2008524754A (en) Memory system having in-stream data encryption / decryption and error correction functions
JP4960456B2 (en) Dual mode AES implementation supporting single and multiple AES operations
JP2009071838A (en) Security feature in electronic device
JP2007336446A (en) Data encryption apparatus
JP2009537026A (en) System and method for write failure recovery
US20070230690A1 (en) System for write failure recovery
JP2023130311A (en) Method for protecting electronic computer against side-channel attacks, and electronic computer