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

System and method for write failure recovery Download PDF

Info

Publication number
TW200817993A
TW200817993A TW096111847A TW96111847A TW200817993A TW 200817993 A TW200817993 A TW 200817993A TW 096111847 A TW096111847 A TW 096111847A TW 96111847 A TW96111847 A TW 96111847A TW 200817993 A TW200817993 A TW 200817993A
Authority
TW
Taiwan
Prior art keywords
data
written
cells
unit
cell
Prior art date
Application number
TW096111847A
Other languages
Chinese (zh)
Inventor
Reuven Elhamias
Vivek Venkatraman Mani
Niv Cohen
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 TW200817993A publication Critical patent/TW200817993A/en

Links

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

Abstract

When cipher block chaining encryption/decryption is employed, write fault recovery is accomplished by storing information useful for the writing of cipher block chaining processed data before it is written to storage cells. Hence when write failure is discovered, this information stored can be retrieved for rewriting the data to the cells. Preferably, the information stored includes security configuration information for cipher block chaining processing a unit of data.

Description

200817993 九、發明說明: 【發明所屬之技術領域】 本發明概言之係關於涉及資 統,且特定言之係關於-用於寫入次:解密之記憶體系 能力之記憶體系統或方法。貝料具有窝入失敗復原 【先前技術】 可攜式儲存裝置已用於商業方面 一個計算裝置载送至另一 。夕年。其將育料自 裝置市場朝著包括内容儲存器之 由:動 更多資料交換來增加平均收益…七展曰在猎由產生 储存到一行動裝置上時必須受 、 $崔a M/ ”濩。為保護儲存在該可 夺间式儲存裝置中之内容,涵奢 . 通吊加密所儲存之資料且僅允許 經授權之使用者解密該等資料。 ° 擎之引擎來實施。 以200817993 IX. Description of the Invention: [Technical Field of the Invention] The present invention relates to a memory system or method relating to resources and, in particular, to the ability to write secondary: decrypted memory systems. Shell material has nest failure failure [Prior Art] Portable storage device has been used for commercial purposes One computing device is carried to another. The eve of the year. It will move the equipment from the device market to include the content storage: more information exchange to increase the average income... Seven exhibitions must be subject to the hunter when generating storage to a mobile device, $Cui a M/ ”濩In order to protect the content stored in the inter-receivable storage device, the information stored in the encrypted storage device is encrypted and only authorized users are allowed to decrypt the data.

U 密碼塊鏈接(CBC)係-加密方法,其中將前—明文塊之 域果(呈密文塊的形式)回饋至下一明文塊之加密。因 此,每-密文塊不僅相依於該明文塊,且亦相依於先前明 文塊。在CBC過程中,將初始向量(Iv)(其為隨機化資料) 加密為第-塊以向該加密引擎提供唯一輸入,以便對於該 加密中所使用之-既定明文密鑰,所產生之密文將仍係唯 CBC過程係藉由可執行加密及/或解密之加密引擎來實 鉍。s亥引擎之上下文係指引擎在一既定時間之當前狀態。 對於一既定加密/解密週期,所產生及使用之上下文係唯 1199I0.doc 200817993 §在一寫入操作過程中使用cbc進行資料加密時, 裝置之程式化可能合生 子 J_失敗。於此情況下,將需要將該 再程式化至儲存步罟.4〇 邊仔展置。此刼作將需要將在寫入操 入失敗之資料再次值鈐$ μ 士 月間寫 貝竹丹认傳輸至儲存裝置。但是,一旦已使用一 既疋上下文猎由加密或加密/解密引擎來傳輪資料,則 同資料無法在不與祕、奋* 、 隹不猎助適當上下文重新組態該引擎之條件下 再次通過該引擎。REl ο 案 擎因此,期望提供一解決上述問題之方 【發明内容】 以⑷週射將經密碼塊鏈接處理之㈣寫人至儲存襄置 之削儲翻於寫人經密碼塊鏈接處理之資料的資訊,以便 :在-寫入失敗之情況下將此資料再次寫入至該儲存裝 ϋ 在該等程式化週期之至少一者期間 — 至該儲存裝置。於一個實施例中,所J貝…寫入 ㈣拉老 财所儲存之資訊係經密碼 塊鍵接處理後之該資料單元。於每 資 、 Μ例中,該所儲存 貝5孔包括用於密碼塊鏈接處理該資粗 下文資訊。 貞枓早-之安全組態或上 【實施方式】 圖1所示方塊圖顯示一其中可實施本 眚你丨地“… 4 &明的各個態樣的 貝例性兄憶體系統。如圖!中所示,記 丨〜體糸統10包括一 中央處理單元(CPUN2、一緩衝器管 旱元(ΒΜϋ)14、一 119910.doc 200817993 主機介面模組(HIM) 16及一快閃介面模組(FIM)18、一快閃 記憶體20及一周邊存取模組(PAM)22。記憶體系統10藉由 一主機介面匯流排26及璋26a與一主機裝置24通訊。快閃 記憶體20(其可係NAND型)向主機裝置24提供資料儲存。 . CPU 12之軟體碼亦可儲存在快閃記憶體20中。FIM 18藉由 一快閃介面匯流排28及埠28a連接至快閃記憶體20。HIM 1 6適合連接至一主機系統,諸如數位相機、個人電腦、個 ( 人數位助理(PDA)、數位媒體播放器、MP-3播放器、及蜂 巢式電話或其他數位裝置。周邊存取模組22選擇恰當控制 器模組(例如FIM、HIM及BMU)用於與CPU 12通訊。於一 個實施例中,虛線盒内系統10之所有組件可封裝入一單個 單元(例如記憶體卡或記憶棒1 〇’)中,且較佳地囊封在該卡 片或棒中。 缓衝器管理單元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 3 4之操作係習用,且不需在本文中詳細說明。BRAM 38係 用於在主機裝置24、快閃記憶體20與CPU RAM 12a之間傳 119910.doc 200817993 遞之緩衝器資料。HDMA 32及FDMA 34負責在HIM 16/FIM 18與BRAM 38或CPU RAM 12a之間傳遞資料,且 負責指示扇區傳輸完成。 當將原始加密資料藉由主機裝置24寫入至快閃記憶體20 時’發送來自主機之加密資料經由匯流排26、HIM 16、 HDMA 32、加密引擎40,在加密引擎4〇處解碼該加密資料 並將其儲存在BRAM 38中。然後,將該經解碼資料經由 f Ο ?〇]\4八34、?1]\4 18、匯流排28自311八]\4 3 8發送至快閃記憶 體2〇。在將自Bram 38所取來之資料傳遞至%之 前,可藉助加密引擎40再次加密該資料,以便再次加密發 运至快閃記憶體20之資料,但與彼等解密來自主機裝置24 之資料所憑藉之密鑰及/或算法相比,此藉助一不同密鑰 及/或算法。此圖解說明一寫入過程期間之資料流。 當藉由主機裝置將未經加密之資料經由匯流排%、職 16、HDMA 32發送至加密引_時,此未經加密資料儲存 於BRAM 38中。然後,在將該等資料發送至到達記憶體20 之途中之聰A 34之前,加密該等資料。在所寫入資料婉 ==理之情況下,較佳地’引擎4。在將該等經ΐ 理貝枓叙迗至§己憶體20之前完成此處理。 於許多應用中,當將資料寫入至儲存裝 20)時,可能期望及時實施資料加密,此稱為即時〜 密。此操作更有效,乃因在將 ‘、、、ρ夺貝料加 ^么不山 牧竹4貝科寫入至儲存裝置之 刖,…而出於加密目的而作為_中間 此,當將未經加密或經加密 ;…貪料。因 之貝科自主機24發送至記憶體 119910.doc 200817993 20時,較佳地即時完成加密。 在上述過程中,該資 之門。α 、枓机係位於主機裝置24與記憶體20 曰1 口此,資料源係主機 此外,在寫入操作…:置24而目的地係記憶體20。 地# 1 Ρ ^ 貝料源亦可係CPU 12,而相應目的 地係圯憶體2〇。盔认兮次广 儲存於快閃朴°'斗係主機褒置2 4或係c p u 12, 由引擎40佳°心體2〇之資料在被窝入至記憶體20之前先藉 由引擎40進行第—加密處理。 雖然圖1中記惜#金 可m“ 包含一快閃記憶體,但該系統 L L 3另#型之非揮發性記憶體,例如磁碟、光 :下 '及所有其他類型之可重寫非揮發性記憶體系統, 各種優點將同樣適用於該等替代實施例。於該 έ 土 一只知例中’該c憶體亦較佳地與記憶體系統之剩餘 L (囊封在相同貰體(例如_記憶體卡或棒)内。 Ο 虽將儲存在BRAM 38巾之資料(源自主機裝置24或咖 12)寫入至快閃記憶體20時,以稱為元頁之可程式化單元 寫入5亥貧料,其中在CPU 12之每一程式化週期期間將-元 頁寫入至快閃記憶體2〇。—個^頁可包括許多扇區,扇區 之大小由主機系統界定。其一實例係一扇區具有512個位 兀組:使用者資料(遵循一對磁碟驅動器訂立的標準)加上 某一定數量位元組的關於使用者資料及/或作為其一部分 之元頁的開鎖資訊。 加抢引擎40使用密碼算法及密碼密鑰實施加密過程。許 多共用密碼算法將128位元之資料作為一密碼處理單元處 理。此密碼處理單元通常小於在每―程式化週期期間寫二 119910.doc -10- 200817993 至快閃記憶體20之資料元頁之大小。 § 一加密引擎40對該資料實施CBC過程時,加密引擎40 對4資料流之每一明文塊(於此情況下,其由一密碼處理 單兀組成)實施CBc過程並獲得一相應密文塊。因此,每 在碼處理單元之合成密文塊不僅相依於相應之密碼處理 單元,而且亦相依於前一密碼處理單元。 圖2係一用於圖解說明本發明之cbc過程之一方塊圖。 如圖2中所示,當處理第一元頁時,CBC過程以〆稱為初 始向量(IV)之隨機數字開始。藉由引擎4〇使用一密鑰加密 该數字以獲得一密文塊〜。值〇1及該元頁之第一明文塊Pi 係作為輸入供至一又〇汉閘,然後在此處使用一密鑰再次加 密該閘之輸出以獲得密文4。然後,對作為至一 x〇R閘之 以及明文塊Μ重複此操作,在此處藉由一密鑰加密該閘之 輸出以獲得密文4。以相同方式繼續此過程直至該元頁中 之所有明文塊均已加密。然後,將使用前一元頁之最後密 文塊代替初始向量(IV)對第二元頁及所有隨後的元頁開始 该相同過程。 該密文塊亦稱為言亥資料流之訊息鑑別碼(MAC)。因此, 圖2中類型之第一元頁之加密及解密cbc功能可表示如 下: 加密 -bit plain text blocks 輸入:m -bit key A ; / -bit IV; P\,-_ _ pr· 輸出:C〇, 、Cr such that /Kand q e q(Ci i ㊉仍) 119910.doc -11 - 200817993 for 1 < i < r. 解密 輸入·· m -bit key 灸;/-bit IV; / -bit cipher text blocks q, ---cr. 輸出.Po,- _ such that po f and a — ㊉ ek\〇\ ) for 1 < i < r.U cipher block chaining (CBC) is an encryption method in which the domain of the former-plain block (in the form of a ciphertext block) is fed back to the encryption of the next plaintext block. Therefore, each ciphertext block depends not only on the plaintext block but also on the previous plaintext block. In the CBC process, the initial vector (Iv), which is a randomized material, is encrypted into a first block to provide a unique input to the encryption engine for the secret to which the specified plaintext key is used for the encryption. The CBC process is still implemented by an encryption engine that performs encryption and/or decryption. The context of the engine refers to the current state of the engine at a given time. For a given encryption/decryption cycle, the context generated and used is only 1199I0.doc 200817993 § When using cbc for data encryption during a write operation, the stylization of the device may fail. In this case, it will be necessary to reprogram to the storage step. This action will require the data that failed in the write operation to be transferred again to the value of μ$μs. However, once the data has been transmitted using an encryption or encryption/decryption engine, the same data cannot be passed again without reconfiguring the engine in the appropriate context. The engine. Therefore, it is desirable to provide a solution to the above problem [invention] (4) to be processed by cipher block link processing (4) to write to the storage device and to copy the data processed by the cipher block link The information is such that, in the event of a write failure, the data is rewritten to the storage device during at least one of the stylized cycles - to the storage device. In one embodiment, the information stored in (4) Lagrangian is the data unit processed by the cipher block. In each case, the example, the storage 5 hole includes the information for the cipher block link processing.早早-的安全Configuration or upper [Embodiment] The block diagram shown in Figure 1 shows a shell-like brother-remember system in which you can implement the "... 4 & As shown in the figure!, the recorder 10 includes a central processing unit (CPUN2, a buffer tube ylang (ΒΜϋ) 14, a 119910.doc 200817993 host interface module (HIM) 16 and a flash interface. A module (FIM) 18, a flash memory 20 and a peripheral access module (PAM) 22. The memory system 10 communicates with a host device 24 via a host interface bus 26 and port 26a. The body 20 (which may be of the NAND type) provides data storage to the host device 24. The software code of the CPU 12 can also be stored in the flash memory 20. The FIM 18 is connected to the flash memory bus 28 and port 28a via a flash interface bus 28 Flash memory 20. HIM 1 6 is suitable for connection to a host system such as a digital camera, personal computer, personal (PDA), digital media player, MP-3 player, and cellular phone or other digital Device. Peripheral access module 22 selects appropriate controller modules (eg, FIM, HIM, and BMU) In communication with the CPU 12. In one embodiment, all of the components of the in-line system 10 can be packaged in a single unit (e.g., a memory card or memory stick 1) and preferably encapsulated in the card or 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). A memory (BRAM) 38 and an encryption engine 40. The arbiter 36 is a shared bus arbiter so that only one master or initiator (which may be HDMA 32, FDMA 34 or CPU 12) can be used at any time. And the slave or target system BRAM 38. The arbiter is responsible for directing the appropriate initiator request to BRAM 38. HDMA 32 and FDMA 34 are responsible for HIM 16, FIM 18 and BRAM 38 or CPU random access memory (CPU RAM) 12a The data transfer between HDMA 32 and FDMA 3 4 is conventional and need not be described in detail herein. BRAM 38 is used to transfer 119910 between host device 24, flash memory 20 and CPU RAM 12a. Doc 200817993 Handling buffer data. HDMA 32 and FDMA 34 are responsible for Data is transferred between the HIM 16/FIM 18 and the BRAM 38 or the CPU RAM 12a, and is responsible for indicating the completion of the sector transfer. When the original encrypted data is written to the flash memory 20 by the host device 24, 'send from the host The encrypted data is decoded by the bus 26, HIM 16, HDMA 32, encryption engine 40, at the encryption engine 4, and stored in the BRAM 38. Then, the decoded data is sent via f Ο ?〇]\4八34? 1] \4 18, bus 28 from 311 8] \ 4 3 8 sent to the flash memory 2 〇. Before the data taken from Bram 38 is passed to %, the data can be re-encrypted by means of encryption engine 40 to re-encrypt the data shipped to flash memory 20, but decrypt the data from host device 24 with them. This is done by means of a different key and/or algorithm compared to the key and/or algorithm. This illustration illustrates the flow of data during a write process. The unencrypted material is stored in the BRAM 38 when the unencrypted material is transmitted to the encryption source via the bus unit %, job 16, and HDMA 32 by the host device. The data is then encrypted prior to sending the data to Cong A 34 on the way to memory 20. In the case where the data 婉 == is written, it is preferably 'engine 4'. This process is completed before the 枓 枓 枓 迗 迗 § § § 。 。 。. In many applications, when data is written to storage 20), it may be desirable to implement data encryption in a timely manner, which is referred to as instant ~ secret. This operation is more effective, because the ',,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, Encrypted or encrypted; ... greedy. Since Beko is sent from the host 24 to the memory 119910.doc 200817993 20, the encryption is preferably completed on the fly. In the above process, the door of the capital. The alpha and the downtime are located in the host device 24 and the memory 20 port 1, and the data source is the host. In addition, the write operation is set to 24 and the destination is the memory 20. The ground # 1 Ρ ^ can also be the CPU 12, and the corresponding destination is the memory. Helmets are widely stored in the flash ° ° ° 'Double system host set 2 4 or cpu 12, by the engine 40 good ° heart 2 〇 information before being placed in the memory 20 by the engine 40 - Encryption processing. Although FIG. 1 remembers that #金可m" contains a flash memory, the system LL 3 another type of non-volatile memory, such as disk, light: down' and all other types of rewritable non- Volatile memory systems, various advantages will apply equally to such alternative embodiments. In one instance of the soil, the c memory is also preferably associated with the remaining L of the memory system (encapsulated in the same carcass) (for example, _memory card or stick) Ο Although the data stored in BRAM 38 (from host device 24 or coffee 12) is written to flash memory 20, it can be programmed as a meta page. The unit writes a low-level material, wherein the --page is written to the flash memory 2 during each stylization cycle of the CPU 12. The page can include many sectors, and the size of the sector is determined by the host system. An example is a sector having 512 groups of bits: user data (following the criteria established by a pair of disk drives) plus a certain number of bytes of user data and/or as part of it. The unlocking information of the metapage. The burglary engine 40 implements encryption using a cryptographic algorithm and a cryptographic key. Many shared cryptographic algorithms treat 128-bit data as a cryptographic processing unit. This cryptographic processing unit is typically smaller than the data page of 119910.doc -10- 200817993 to flash memory 20 during each stylized cycle. § When a cryptographic engine 40 implements the CBC process for the data, the cryptographic engine 40 implements the CBc process for each plaintext block of the 4 data stream (in this case, consisting of a cryptographic processing unit) and obtains a corresponding The ciphertext block. Therefore, each synthesized ciphertext block in the code processing unit is not only dependent on the corresponding cryptographic processing unit, but also on the previous cryptographic processing unit. Fig. 2 is a diagram for illustrating the cbc process of the present invention. Block diagram. As shown in Figure 2, when processing the first metapage, the CBC process begins with a random number called the initial vector (IV). The engine 4 encrypts the number using a key to obtain a secret. The block 。1 and the first plaintext block Pi of the metapage are provided as inputs to a singular sluice gate, and then the key is used to encrypt the output of the gate again to obtain the ciphertext 4. Then, Right This operation is repeated until the block and the plaintext block, where the output of the gate is encrypted by a key to obtain ciphertext 4. The process continues in the same manner until all plaintext blocks in the metapage are Encrypted. Then, the same process is started by using the last ciphertext block of the previous metapage instead of the initial vector (IV) for the second metapage and all subsequent metapages. The ciphertext block is also called the message of the speech data stream. The authentication code (MAC). Therefore, the encryption and decryption cbc function of the first element page of the type in Figure 2 can be expressed as follows: Encryption-bit plain text blocks Input: m -bit key A ; / -bit IV; P\,- _ _ pr · Output: C〇, , Cr such that /Kand qeq (Ci i ten still) 119910.doc -11 - 200817993 for 1 < i < r. Decrypt input · · m -bit key moxibustion; Bit IV; / -bit cipher text blocks q, ---cr. Output .Po, - _ such that po f and a — ten ek\〇\ ) for 1 < i < r.

Ο 上述值c〇,···,Cr係該資料流中元頁之密文塊或訊息鑑別 碼(MAC) ’其包括明文塊ρι,…,pr。Iv係初始向量,及k係 一密鑰。因此,當期望加密並將一包含資料塊ρι,…,〜之 元頁寫入至記憶體20時,藉由系統丨〇中之加密引擎4〇使用 一功此(例如上述CBC功能)根據該等資料塊來計算MAc值 (例如cG,…,Cr),且將該等MAC值寫入至記憶體2〇。在上 述公式中,〜(X)係指一其中χ係指藉助密鑰k加密之過 程’而q」(X)係指x係使用密鑰k解密。 在上述加密過程中,可觀察到為加密每一元頁(第一元 頁除外),引擎40將需要使用前—元頁之最後訊息鑑別碼 或密文^來代替IV。為加密第_元頁,引擎爾需要使用 初始向量IV。 冩入失敗復原: 根據上述内容’可觀察到在使用CBC加密後,該資料流 中每-元頁之經加密密文機或MAC值如下、,… 後’將該等密文塊寫入至快 ’ r… 伏闪圮憶體20。 假若在寫入第I元頁時出目 ^ Λ 出現問題,則將需要將經加密元 頁之mac值之順序再次寫入至 〖、閃ό己fe脰20。由於加密引 119910.doc •12- 200817993 擎 4 〇 堂 τ 士 不储存經加密資料,因而此經加密資料不再存 在。 ' ^ 了此重試第〗元頁之寫入過程,可將整個經加密第工元 ,Cr儲存在系統1〇之某處(例如記憶體20或RAM 12a中之一資料緩衝器中),以便當在該經 .f快閃記細之寫入過程中發現一問題時,;:= 、/斤儲存之經加密兀頁並將其重新寫入至快閃記憶體。 《' :種方式,忒經加密第1元頁在程式化順序期間不受破 壤’以便若發生一寫入失敗,則可稍後予以取回。此外, CPU 12之程式化碼包括一程式命令,其不帶有自时颜3g ^資料相反,该程式命令將使用一快閃記憶體2 0或 RAM 12a中之資料緩衝器作為資料源並將資料再次寫入至 快閃記憶體20。然後,當發現一寫入失敗時可使用該等程 式化模式。 將該經加密元頁儲存在快閃記憶體2(V4ram i2a中將要 C)求快閃記憶體20或RAM⑵包括一足以儲存完整的經加密 凡頁之大小之緩衝器。因此,較佳地且作為一替代,僅儲 存使引擎40恢復至正確狀態所必需之資訊,以便在發現寫 入孩經加岔兀頁之過程已失敗後引擎4〇可繼續再次處理所 寫入失敗之元頁中之明文塊。可再次自BRAM 38中取回該 未經加密之元頁並藉由引擎40處理,並將該經處理元頁重 新寫入至記憶體20。因此,在藉由引擎4〇處理當前元頁之 月” I先將弓I擎40之丨下文資訊或安全組態資訊儲存在一 緩衝器中(例如圖1之RAM 12a中)。此資訊較佳地包括前一 H99l0.doc -13- 200817993 元頁之最後訊息鑑別碼或1^1人0值cr、引擎40之暫存哭' 之各 種值、用於該處理之密碼算法、及標識需重新寫入之元頁 (或其位置)之可選資訊,原因解释於下文中。在欲寫入第 一元頁之情況下,此所儲存之資訊較佳地包括初始向量IV 而不是前一元頁之最後訊息鑑別碼或MAC值。儲存此資訊 後,CPU 12將控制返回至FIM及FDMA,FIM及FDMA處理Ο The above values c〇,···, Cr is the ciphertext block or message authentication code (MAC) of the meta page in the data stream, which includes the plaintext blocks ρι,..., pr. Iv is the initial vector, and k is a key. Therefore, when encryption is desired and a page containing the data blocks ρι, . . . , is written to the memory 20, the encryption engine 4 in the system 〇 uses the same (for example, the CBC function described above) according to the The data block is calculated to calculate the MAc value (eg, cG, . . . , Cr), and the MAC values are written to the memory 2〇. In the above formula, ~(X) means that "χ" refers to the process of encrypting by means of the key k and q"(X) means that x is decrypted using the key k. In the above encryption process, it can be observed that to encrypt each meta page (except for the first metapage), the engine 40 will need to use the last message authentication code or ciphertext ^ of the pre-meta page instead of IV. To encrypt the _ meta page, the engine needs to use the initial vector IV. Intrusion failure recovery: According to the above content, it can be observed that after using CBC encryption, the encrypted cipher machine or MAC value of each page in the data stream is as follows, ... after 'writing the ciphertext block to Fast 'r... volts and flashes. If there is a problem when writing the first metapage ^ Λ, you will need to write the order of the mac values of the encrypted metapage to 〖, ό ό 脰 fe脰20. Because of the encryption index 119910.doc •12- 200817993 擎 4 〇堂 τ 士 does not store the encrypted data, so this encrypted data no longer exists. ' ^ This retrying the first page of the writing process, the entire encrypted working unit, Cr can be stored somewhere in the system 1 (such as memory 20 or RAM 12a in one of the data buffers), In order to find a problem during the writing process of the .f flash, the ::=, / kg stored encrypted page and re-written to the flash memory. "': In this way, the encrypted first meta page is not broken during the stylized sequence" so that if a write failure occurs, it can be retrieved later. In addition, the program code of the CPU 12 includes a program command, which does not have a self-timer 3g^ data. The program command will use a data buffer in the flash memory 20 or the RAM 12a as a data source and The data is written to the flash memory 20 again. Then, the mode can be used when a write failure is found. The encrypted meta-page is stored in flash memory 2 (which will be C in V4ram i2a). The flash memory 20 or RAM (2) includes a buffer sufficient to store the full size of the encrypted page. Thus, preferably and as an alternative, only the information necessary to restore the engine 40 to the correct state is stored so that the engine 4 can continue to process the writes again after the process of discovering the write-on-child page has failed. The plaintext block in the failed metapage. The unencrypted meta page can be retrieved from BRAM 38 again and processed by engine 40, and the processed meta page is rewritten to memory 20. Therefore, in the month of processing the current metapage by the engine 4", the information or security configuration information is stored in a buffer (for example, in the RAM 12a of Fig. 1). The good information includes the last message authentication code of the previous H99l0.doc -13- 200817993 meta-page or the value of the 1^1 person 0 value cr, the temporary crying of the engine 40, the cryptographic algorithm used for the processing, and the identification needs. The optional information of the rewritten meta page (or its location) is explained below. In the case where the first metapage is to be written, the stored information preferably includes the initial vector IV instead of the previous one. The last message authentication code or MAC value of the page. After storing this information, the CPU 12 returns control to FIM and FDMA, FIM and FDMA processing.

當前元頁i’使其藉由引擎40加密,且然後將該經加密之當 前元頁寫入至快閃記憶體20。 於某些實施例中,可能期望在FIM 18與記憶體2〇之間使 用一緩衝器(未顯示)’以便在將該經加密元頁寫入至快閃 記憶體20之前,快取該經加密元頁(例如該正處理之元頁 之-個❹個扇區)。此緩衝器亦可係摘18或記憶體⑼ 之部分。 儘管僅快取-個元頁之某些部分,但可同時將當前處理 之疋頁及快取之元頁兩者之資料寫入至快閃記憶體20。於 此種情況下,當發現一寫入生^ ^ 冩失敗日守,人們將需要能夠確定 该系統在該資料流(亦即,所快 所决取之當則經處理之元頁或 緊之元頁)中應返回多遠以竇 4 IM只施貝枓加密並重新寫入至 兄憶體20。出於此目的,所 击工社α 士 a 1 廿I女王組恶或上下文資訊 較佳地亦包括可同時寫入至 # U ΓΓΠΛ、 2〇之凡頁之開始邏輯塊 位址(LBA),以便當發現此元頁之一 時,可將系統返回至此_元w ”、、A過程失敗 頁之開始位址以便以妳加穷开> 式將其重新寫入至快閃記憶體2〇。 、、工山/ 如别所述’在一用於解決 解决寫入失敗問題之第一技術中, H9910.doc 200817993 將大量密文塊之所有儲存於快閃記憶體2〇中或者ram… 中’亦即’在該快閃記憶體或RAM 12a中需要大量健存空 間么生此^況乃因無法精確提前知悉該寫入失敗發生於 兀頁之那β刀中。出於此原因’儲存該等密文塊之所有 以便可將其重新寫入至該快閃記憶體。 相反地,在僅儲存該元頁之安全組態資訊或上下文資訊 之第二技術中,無需儲存元頁之所有密文塊。相反,除用 於使引擎40恢復至適當狀態之資訊外,將僅需要儲存前一 兀頁之最後密文塊或初始向量。然 ,^ ^ ^ ^ …、俊此刖一兀頁之最後 密文塊或初始向量可+ 了與*别70頁中之第一明文塊一起作為 一輸出輸入至一 X〇Rp弓 /- ♦斗 — 巧,在此處该閘之輸出輸入至引擎4〇 以實施加密。以此錄古斗、 _ ^ 種方式,不再茜要在快閃記憶體或者 RAM 12a中提供用於性六乂 乂 一 ▲、捉υ於料任何兀頁之所有密文塊的容量。 如如所述’可同時處理爽白 — 爪自兩個70頁之資料並將其寫入 至快閃S己憶體2 〇。屮·^ μμ括m Ο 〇 出於此種原因,使用RAM 12a中之兩個 緩衝器儲存兩個正虛踩; 、 處理之兀頁的安全組態資訊。明顯地, 在將二個或更多元百 一、 …至记憶體20係可能之情況下,則 使用二個或多個绣播^突上# 、 … 緩衝益代替,此種及其他變化係在本發明 乾_之内。假定可同# ^ — 凡頁寫入至快閃記憶體2 〇, 則使用一%為緩衝指數之六 , y 歎木5己錄儲存在該兩個緩衝琴 中之兩組安全組態資邙,!v你; W ^ 、σ 便在發生寫入失敗時使正禮忠 全組態資訊恢復以重靳t便正確文 針—入… 新處理相應元頁。因此’該兩個用於 儲存女全組悲資訊之淫 π 、 、 、Γ為可標注為UaCO)及I2a(l),且 ^緩衝彳Θ數將在〇與丨之間轉換 门得换以指向兩個用於儲存安全組 119910.doc 200817993 助儲存安全 態資訊之缓衝器之一者。在圖3中圖解說明藉 組悲資§fL之寫入失敗復原的過程。The current metapage i' is caused to be encrypted by the engine 40, and then the encrypted current metapage is written to the flash memory 20. In some embodiments, it may be desirable to use a buffer (not shown) between the FIM 18 and the memory 2' to cache the encrypted element page before writing it to the flash memory 20. Encrypt the meta page (for example, one sector of the meta page being processed). This buffer can also be picked up by 18 or part of the memory (9). Although only some portions of the meta-page are cached, the data of both the currently processed page and the cached meta-page can be simultaneously written to the flash memory 20. In this case, when a write failure is found, people will need to be able to determine that the system is in the data stream (ie, the processed meta-page or the tightest decision) The fare in the metapage) should be returned as sinus 4 IM only to be encrypted and rewritten to the brotherly body 20. For this purpose, the squad or the contextual information of the squadrons of the squadrons and the contextual information preferably also include the start of the logical block address (LBA) of the page that can be simultaneously written to #U ΓΓΠΛ, 2〇, So that when one of the metapages is found, the system can be returned to this _yuan w", the start address of the A process failure page to rewrite it to the flash memory 2". In the first technique for solving the problem of writing failure, H9910.doc 200817993 stores all of the large number of ciphertext blocks in the flash memory 2〇 or ram... 'Also' requires a large amount of memory space in the flash memory or RAM 12a. This is because it is impossible to know in advance that the write failure occurred in the beta knife of the title page. For this reason, 'storage' All of the ciphertext blocks can be rewritten to the flash memory. Conversely, in the second technique of storing only the security configuration information or context information of the metapage, there is no need to store all of the metapages. Ciphertext block. Conversely, except for the purpose of restoring the engine 40 to the appropriate state In addition, you will only need to store the last ciphertext block or initial vector of the previous page. However, ^ ^ ^ ^ ..., the last ciphertext block or initial vector of the page can be + and 70 pages The first plaintext block is used together as an output input to an X〇Rp bow/- ♦ bucket--, where the output of the gate is input to the engine 4〇 to implement encryption. It is no longer necessary to provide the capacity of all the ciphertext blocks for any page of the flash memory or the RAM 12a for capturing any page of the page. Claws from two 70 pages of data and write them to the flash S 忆 2 〇. 屮·^ μμ includes m Ο 〇 For this reason, use two buffers in RAM 12a to store two positive Virtual treading; The security configuration information of the processing page. Obviously, in the case of two or more hundred, ... to memory 20, use two or more embroidery broadcast ^ In the case of #, ... buffer benefits instead, this and other changes are within the scope of the present invention. It is assumed that the same can be written to the flash memory 2 〇, use one% as the buffer index of the six, y singer 5 has recorded two sets of security configuration resources stored in the two buffers, !v you; W ^, σ in the case of write failure Make Zhenglizhong full configuration information recovery to re-tune the correct pin-in... Newly process the corresponding meta-page. Therefore, the two pesos, 、, Γ, which are used to store the female group’s sad information, can be marked as UaCO) and I2a(l), and the buffer number will be switched between 〇 and 指向 to point to one of the two buffers used to store the security group 119910.doc 200817993 . The process of recovering the write failure of the borrowing grief §fL is illustrated in FIG.

首先,CPU 12清除健存在兩個緩衝器i2a⑼及仏⑴中 之上下文或安全組態資訊並將緩衝指數值設置為G。(方塊 102·)藉由CPU 12將該等設置或上下文加載至緩衝器管理 單元u及FIM i 8。此設置FDMA 3 4並使FIM ! 8準備好處理 貧料。亦組態加密引擎4〇。此次加載後,cpu U等待直至 快閃記憶體20準備好接收資料(方塊1〇4)。然後,系統啊 備好寫入操作1〇6。 CPU 12使FIM寫入程式開始並將各種匯流排之控制傳輸 至FIM 18。(方塊108)。在將資料從bram 38傳輸至 及决閃ό己憶體20之剷(亦即,在發出dma寫入操作碼(方 塊 110)之前),FIM 18 中斷 CPU 12。後端(BE)Flash Ware 及 暫停/重新開始模組(SRM)API係自一儲存器(例如快閃記憶 體2〇)讀取至CPU ram 12a之軟體。be Flash Ware係藉由 CPU 12執行以調用SRM API用於將元頁及引擎40之加密上 下文或安全組態資訊保存至緩衝指數值所指向之緩衝器。 因此’一旦開始,由於該緩衝指數已設置為〇,所以此資 訊係健存在緩衝器12a(0)中。在此寫入操作中寫入之元頁 之開始邏輯塊位址亦儲存在緩衝器12a(0)中。(方塊112) 然後’由CPU 12所執行之BE Flash Ware然後將裝置1〇 之控制返回至FIM 18。CPU 12亦使FDMA 34開始,以便藉 由加密引擎40開始加密元頁之BRAM 38之資料並將其寫入 至冗憶體20。(方塊114)。然後,FIM 18檢查以查看至快閃 H99l0.doc -16- 200817993 記憶體20之完整元頁之程式化是否完成,指示此元頁之程 式化通過。(菱形116)。若該元頁成功無事故地寫入至快閃 纪憶體20,則該緩衝指數加一,且然後除以二(或模數2)以 獲得餘數。(方塊122)於此將緩衝指數設置為〇之示例中, 在方塊122中此操作使緩衝指數為1,且在方塊1〇4中ρΐΜ 18將控制返回至CPU 12以使下一元頁重複該過程。於寫入 下一元頁之下一週期中,代替地將該上下文或安全組態資 訊寫入至緩衝器12a(l),此乃因緩衝指數已設置為j。 然而,假若該程式化未通過,則FIM 1 8中斷處理器 12(方塊118)並使用一重試機制12〇重試該寫入操作。圖4中 圖解說明該重試機制。參照圖4,當FIM 1 8發現一寫入操 作失敗時,FIM 18知曉該寫入失敗之位置及該寫入失敗發 生於哪一元頁中。FIM 18因此知曉發生寫入失敗之元頁之 開始邏輯塊位址(LBA)。然後,使此位址與兩個緩衝器 12a(0)及I2a(l)中之開始LBA位址進行匹配或比較,並標 〇 識包含與發生寫入失敗之元頁之LB A位址相匹配之LB A位 址的緩衝器。(方塊152)然後,使用儲存在該已標識之緩衝 器中之上下文或安全組態資訊來恢復加密引擎4〇之狀態。 (方塊 154)。然後,CPU 12 啟動 FIM 18、FDMA 34、及引 擎40以再次加密於發生寫入失敗之元頁之開始邏輯塊位址 處開始之BRAM 38之元頁並像以前一樣將該經加密元頁寫 入至快閃記憶體20。(方塊156、158)。FIM 18亦刪除任何 可月b已寫入記憶體2 0之尚未完全加密之元頁或將其標記供 刪除。完成此操作後,CPU 12將此操作返回至圖3之方塊 119910.doc -17- 200817993 104 如前文所述,可名回 _^ ^ ^ 在冋一週期中將來自多於一個元百夕二欠 料寫入或程式化至記恃㈣ η 因此,若在將來自-個元頁 之-貝料寫入至記憶體2〇時發生寫入錯誤,則 :頁 望不僅重新寫入或再程^, „ 月匕而要或期 ,,,L 式化此兀頁,而且重新寫入或再程 :化此元頁之前的該(等)元頁(當該等之前 ΐ記憶體2G時)°因此,當寫人失敗發生時,咖12=ς 疋貧料之重新寫入或再 、確 凡丹%式化應返回多遠。+ CPU 12將確定是否僅曹靳宦λ斗、$ 狹a之’ ^> 新寫人或再程式化發生寫人失敗處 ⑴-百 新“或再程式化此元頁之前的該 ⑷-頁。較佳地,即使該(等)先前之元頁 程中未發生寫入失敗,若t ^式化過First, the CPU 12 clears the context or security configuration information stored in the two buffers i2a(9) and 仏(1) and sets the buffer index value to G. (Block 102·) The settings or context are loaded by the CPU 12 to the buffer management unit u and FIM i 8. This sets FDMA 3 4 and makes FIM! 8 ready to handle poor materials. The encryption engine is also configured. After this load, cpu U waits until the flash memory 20 is ready to receive data (block 1〇4). Then, the system is ready for write operation 1〇6. The CPU 12 causes the FIM write program to start and transfers control of various bus bars to the FIM 18. (block 108). The FIM 18 interrupts the CPU 12 when the data is transferred from the bram 38 to the shovel of the flash memory 20 (i.e., before the DMA write operation code (block 110) is issued). The Back End (BE) Flash Ware and Suspend/Restart Module (SRM) APIs are read from a memory (such as flash memory 2) to the software of the CPU ram 12a. The Flash Ware is executed by the CPU 12 to call the SRM API for saving the encrypted page or the security configuration information of the metapage and the engine 40 to the buffer pointed to by the buffer index value. Therefore, once started, since the buffer index has been set to 〇, this information is stored in the buffer 12a(0). The start logical block address of the meta page written in this write operation is also stored in the buffer 12a(0). (Block 112) Then BE Flash Ware executed by CPU 12 then returns control of device 1 to FIM 18. The CPU 12 also causes the FDMA 34 to begin so as to start encrypting the data of the BRAM 38 of the meta page by the encryption engine 40 and writing it to the redundant body 20. (block 114). Then, the FIM 18 checks to see if the flashing of the complete meta page of the memory 20 is completed, indicating that the programming of the meta page is passed. (Rhombus 116). If the metapage is successfully written to the flash memory 20 without accident, the buffer index is incremented by one and then divided by two (or modulo 2) to obtain the remainder. (Block 122) In the example where the buffer index is set to 〇, in block 122 this operation causes the buffer index to be 1, and in block 1 〇 4 ρ ΐΜ 18 returns control to the CPU 12 to cause the next meta page to repeat. process. Instead of writing the context or security configuration information to the buffer 12a(1) in the next cycle of writing to the next metapage, the buffer index has been set to j. However, if the stylization fails, FIM 18 interrupts processor 12 (block 118) and retry the write operation using a retry mechanism 12 。. This retry mechanism is illustrated in Figure 4. Referring to Figure 4, when FIM 18 finds that a write operation has failed, FIM 18 knows where the write failed and which meta page the write failure occurred. The FIM 18 is therefore aware of the starting logical block address (LBA) of the metapage where the write failure occurred. Then, the address is matched or compared with the starting LBA address in the two buffers 12a(0) and I2a(1), and the LB A address containing the meta page where the write failure occurred is identified. A buffer that matches the LB A address. (Block 152) The status of the encryption engine is then restored using the context or security configuration information stored in the identified buffer. (box 154). Then, the CPU 12 activates the FIM 18, the FDMA 34, and the engine 40 to re-encrypt the BRAM 38 meta-page starting at the beginning logical block address of the meta-page where the write failure occurred and writes the encrypted meta-page as before. Into the flash memory 20. (blocks 156, 158). FIM 18 also deletes any meta-pages that have been written to memory 20 that have not been fully encrypted or marked for deletion. After this is done, the CPU 12 returns this operation to the block 119910.doc -17-200817993 104 of FIG. 3. As described above, the name _^ ^ ^ will be from more than one yuan in the first cycle. Write or program to the record (4) η Therefore, if a write error occurs when the material from the - meta page is written to the memory 2, then: the page is not only rewritten or reprocessed. ^, „月匕要要或期,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, ° Therefore, when the writing failure occurs, the coffee 12=ς 疋 料 re-write or re-determine how far should be returned. + CPU 12 will determine whether only Cao 靳宦 斗 bucket, $ narrow a '^> A new writer or reprogramming occurs where the writer fails (1)-100 new" or reprograms the (4)-page before this metapage. Preferably, even if the write failure does not occur in the (or) previous metapage, if t is overified

亦重新寫入或再程式化該(等)先前元頁。於 、J 週期峨入兩個元頁之實施方案中,-特定元;= 化之狀悲只有在下一換逊;百 、 ϋ 取疋頁完成程式化後方才知悉。於 此情況下,CPU 12蔣私故%门工, 2將始終返回兩個元頁(亦即,其 生寫入錯誤之元頁及前一元百 '、曰只 6 一 只次則兀頁)進打再程式化,但對於吾 後7G頁,其將僅再程式化最後元頁。 、: 藉由索引RAM 12a中之三個或多個 文所似及夕個而非兩個緩衝器,上 卜谷易地延伸至使用三個或多個緩衝器來儲存 上下文或安全組態資訊及三個或多 ,.^ 相應70頁之開始邏輯 塊位址之應用。當元頁經加密時,上述摔作適入宜^ 藉居。I 士 L丄 、诛作通合寫入失敗The (or other) previous metapage is also rewritten or reprogrammed. In the implementation of the two-page page in the J cycle, the -specific element; = the sorrow of the change is only in the next change; the hundred, ϋ take the page to complete the stylization. In this case, the CPU 12 will always return two meta-pages (that is, the meta-page and the previous one-hundreds, which are only written by the first one). It is reprogrammed, but for the 7G page, it will only reprogram the last page. , by indexing three or more of the RAM 12a, instead of two buffers, the upper reaches are extended to use three or more buffers to store context or security configuration information. And three or more, .^ corresponding to the beginning of the application of the logical block address of 70 pages. When the metapage is encrypted, the above-mentioned fall is suitable for borrowing. I 士 L丄, 诛作通合Write failed

'、土本上,在被寫入至記憶體20之前,# δ 38中之铖加穷眘袓θ(, 右解密BRAM 貞抖’則相同之過程將適用。雖然已藉由參 H99l0.doc -18- 200817993 之》亥扇區,以便將此扇區及資料流中此元頁内此扇區後之 羽區加在並重新寫入至記憶體20。以此種方式,系統 可避免必須加密此元頁中該發生寫人失敗之扇區之前的各 個扇區。此可提高效率。所有該等及其他變化形式皆在本 發明之範轉内。 ,即時資料密碼處理來圖解說明本發明之實施例,但應瞭 〆、亦可適用於不在貧料寫人過程中實施即時資料密碼處 理之系m述實施例提及由引擎處理之㈣塊之具 -大】及7L頁之各種大小之各種實例,但應瞭解相同優點 將適用於不同大小之藉由引擎40處理之資料塊及元頁。對 於某些應用’幻貞測到寫人失敗時,可能期望系統返回, 但不是返回至發生寫入失敗之元頁之開始,而是此元頁内', on the soil, before being written to the memory 20, #δ38 铖 穷 袓 袓 θ (, right decrypt BRAM trembles) the same process will apply. Although already by reference H99l0.doc -18- 200817993 "Hai sector, in order to add and rewrite the sector after the sector in this sector and the data stream to the memory 20. In this way, the system can avoid the necessity Encrypting the sectors in the metapage that precede the sector in which the writer failed. This improves efficiency. All of these and other variations are within the scope of the present invention. Instant data cryptographic processing to illustrate the present invention. The embodiment, but should be applied to the process of not implementing the instant data password processing in the process of writing a poor person. The embodiment refers to the various sizes of the (four) block-large and 7L pages processed by the engine. Various examples, but it should be understood that the same advantages will apply to data blocks and meta-pages processed by the engine 40 of different sizes. For some applications, when the illusion fails, the system may be expected to return, but not return to The beginning of the metapage where the write failed occurred, and This meta-page

雖然上文係參照各種實施例說明本發明,但應瞭解可在 T背離本發明範疇之前提下進行變更及修改,本發明之範 臂僅糟由隨附之申請專利範圍及其等效内容界定。本文所 涉及之所有參考皆以引用形式全文併入。 【圖式簡單說明】 圖1係一記憶體系統與一主機裝置通訊以圖解說明本發 明之一方塊圖。 圖2係一用於圖解說明本發明之CBC過程之結構圖。 圖3係一流程圖,其圖解說明圖1之系統將資料寫入至儲 存裝置之一運作以圖解說明本發明之一個實施例,在該儲 存裝置中儲存安全組態資訊。 圖4係一圖解說明本發明一實施例之流程圖,其圖解說 119910.doc -19- 200817993 明 圖1中糸統之運作,盆φ你κ ▲ ,、中使用所儲存之安全組態資訊來 入失敗之資料的寫入操 重新組態該加密引擎以重試先前寫 作0 為方便說明,在本申請案中同一組件係藉由相同編號來 標記。 Ο 【主要元件符號說明】 10 記憶體系統 10f 記憶體卡或記憶棒 12 CPU 12a CPU隨機存取記憶體 12a(0) 緩衝器 12a(l) 緩衝器 14 緩衝器管理單元 16 主機介面模組 18 快閃介面模組 20 快閃記憶體 22 周邊存取模組 24 主機裝置 26 主機介面匯流排 26a 埠 28 快閃介面匯流排 28a 埠 32 主機直接記憶體存取 34 快閃直接記憶體存取 119910.doc -20- 200817993While the invention has been described with reference to the embodiments of the present invention, it is understood that the invention may be modified and modified, and the scope of the invention is defined by the scope of the accompanying claims and their equivalents. . All references cited herein are incorporated by reference in their entirety. BRIEF DESCRIPTION OF THE DRAWINGS Figure 1 is a block diagram of a memory system in communication with a host device to illustrate the present invention. Figure 2 is a block diagram showing the CBC process of the present invention. 3 is a flow chart illustrating the operation of the system of FIG. 1 to write data to one of the storage devices to illustrate an embodiment of the present invention in which security configuration information is stored. Figure 4 is a flow chart illustrating an embodiment of the present invention, which illustrates the operation of the system in Figure 1 of 119910.doc -19-200817993, and the stored safety configuration information in the basin φ you κ ▲ The write operation of the failed data is reconfigured to retry the previous writing 0 for convenience of description, and the same components are marked by the same number in this application. Ο [Main component symbol description] 10 Memory system 10f Memory card or memory stick 12 CPU 12a CPU random access memory 12a (0) Buffer 12a (1) Buffer 14 Buffer management unit 16 Host interface module 18 Flash interface module 20 Flash memory 22 Peripheral access module 24 Host device 26 Host interface bus 26a 埠28 Flash interface bus 28a 埠32 Host direct memory access 34 Flash direct memory access 119910 .doc -20- 200817993

36 仲裁器 38 緩衝器隨機存取記憶體 40 加密引擎 119910.doc -21 -36 Arbiter 38 Buffer Random Access Memory 40 Encryption Engine 119910.doc -21 -

Claims (1)

200817993 十、申請專利範圍·· L ;;㈣於在—用於儲存經加密資料之記憶體系統中處理 貝料之方法’該記憶體系統包括多個非揮發性記憶胞及 一密碼電路,該方法包括·· 一使該電路對一欲寫入至該等胞之資料流中之資料實施 密碼塊鏈接處埋;200817993 X. Patent application scope · L; (4) Method for processing bedding in a memory system for storing encrypted data 'The memory system includes a plurality of non-volatile memory cells and a cryptographic circuit, The method includes: causing the circuit to bury a cryptographic block link to a data to be written into the data stream of the cells; U 耷若干順序程式化週期中將該資料流中之資料寫入至 j等月匕卩便在將該資料&中之彼資料寫入至該等胞之 刚,由该電路藉由一密碼塊鏈接處理處理彼資料;及 在該等程式化週期之至少一者期間,在該將經密瑪塊 鏈接處理之貞料寫人至該等胞之前,儲存此週期之用於 該寫入該經密碼塊鏈接處理資料之資訊,以便在發現二 寫入失敗後可將此資料再次寫入至該等胞。 2·如請求項1之方法,其進一步包括: 在此週期中在該將經密碼塊鏈接處理之資料寫入至 該等胞之過程中偵測一失敗;及 、1… 所儲存之 > 訊將該經密碼塊鏈接處理之資料寫 入至該等胞。 、” ^ 東員2之方法’其進一步包括使該電路對寫入至該 等胞失敗之責料實施一密碼塊鏈接處理,於此處理中使 /所儲存之資訊獲得該經密碼塊鏈接處理之資料,再 將忒I袷碼塊鏈接處理之資料寫入至該等胞。 4 ·如請求項3之古、、土 , 之方去,其中該寫入資料在該至少一個程式 化週期中將_咨 σ — 貝枓早70寫入至該等胞,且其中該儲存在 119910.doc 200817993 斗單元經逸、碼塊鍵接處理後儲存該資料單元。 5· 士口月求項3之#法,其中該寫入資料在該至少一個程式 5期中將—資料單元寫人至該等胞,其中該儲存錯存 對。亥貝料單元實施密碼塊鏈接處理所用之安全組熊資 訊。 ^、U 写入When the data in the data stream is written to j, etc. in a number of sequential stylization cycles, the data in the data & is written to the cell, and the circuit is operated by a password. The block linking process processes the data; and during at least one of the stylized periods, storing the cycle for writing the data to the cell before the data is processed by the MM block link The information of the data is processed by the cipher block link so that the data can be written to the cells again after the discovery of the second write failure. 2. The method of claim 1, further comprising: detecting a failure in the process of writing the data processed by the cipher block link to the cells in the cycle; and, 1... stored > The data processed by the cipher block link is written to the cells. And "^ method of the member 2" further comprising causing the circuit to perform a cipher block linking process on the blame for writing to the cell failure, wherein the stored/stored information is obtained by the cipher block linking process Data, and then the data processed by the 忒I 块 code block link is written to the cells. 4 · If the request item 3 is ancient, earth, and the square, the written data will be in the at least one stylization cycle. _ σ — 枓 枓 枓 枓 枓 写入 写入 写入 写入 写入 写入 写入 写入 写入 写入 写入 写入 写入 写入 写入 写入 写入 写入 写入 119 119 119 119 119 119 119 119 119 119 119 119 119 119 119 119 119 119 119 119 119 119 119 119 119 119 119 119 The method, wherein the written data is written to the cells in the at least one program 5, wherein the data is stored in the wrong cell. The Hibe unit performs the security group bear information used in the cipher block link processing. 广二求項5之方法,其中該安全組態資訊包括密鑰、加 么开去、及/或下列之一者··訊息鑑別碼及一初始向量。 如=求項6之方法,進一步包括:擷取該所儲存之安全 組怨賁訊,該資訊包括訊息鑑別碼及/或一初始向量;及 康X 4所擷取之訊息鑑別碼及/或一初始向量獲得最新 的訊息鑑別碼。 8·如凊求項5之方法,其中在至少兩個連續程式化週期之 母者期間’該儲存在該將該資料單元寫入至該等胞之 前儲存此週期之對該資料單元實施該密碼塊鏈接處理所 用之安全組態資訊。 9· 士明求項8之方法,其中該所儲存之安全組態資訊包括 用於定位該資料單元之定位資訊。 1〇·如請求項9之方法,該方法進一步包括: 在將该至少一個經密碼塊鏈接處理資料單元之一個或 夕個邛分寫入至該等胞之前,快取該至少一個經密碼塊 鏈接處理資料單元之一個或多個部分,其中該寫入在該 至少一個週期期間將資料自該至少一個經密碼塊鏈接處 理早元及另一單元寫入至該等胞内,且其中該偵測在該 (等)快取資料單元與另一單元中偵測哪一資料單元寫入 119910.doc 200817993 至該等胞失敗;及 在密碼塊鏈接處理之前以一使用該定位資訊之形式定 位该寫入失敗之資料單元,其中使該電路對該資料單元 貫施密碼塊鏈接處理。 u.如請求項10之方法,其中該經制之資料單元係-其-個或多個部分已經快取之資料單元,該方法進—步包括 使該電路對此資料i i u t 貝竹早7L及該,料流中在此單元之前且尚 未完全寫入至該等胞之所古次 σ — 肥t所有貝枓早兀實施密碼塊鏈接處 理。 12. 如請求項11之方法,甘 ,、進一步包括自該等胞刪除任一尚 未完全寫入至該等胞之單元,或標記為欲刪除單元。 13. —種用於在-用於儲存經加密資料之記憶體系統中處理 貝料之方法’该,己憶體系統包括多個非揮發性記憶胞及 一密碼電路,該方法包括: U 使4電路對至该等胞之一資料流中之資料實施密碼塊 鏈接處理; >在若干順序料化週期中將該資料流中之資料寫入至 :i以便在將该資料流中之彼資料寫入至該等胞之 前藉由該電路處理彼資料;及 在該等程式化週期之至少—者期間,使得在該將資料 寫入至㈣胞之前儲存此週期至少—部分之對該資料實 施該後碼塊鏈接處理所用之資訊,以便在經密瑪塊鏈接 處理之後及發現一寫 該等胞。 失敗之後可將此貧料再次寫入至 1199I0.doc 200817993 14 · 一種用於儲存經加密資料之 非揮發性記憶胞; 一電路,其對一至 塊鏈接處理;及 5己憶體系統,其包括: 5亥專胞之:蒼斗立^ ^ 貝枓流中之貧料實施密碼 一控制器The method of claim 5, wherein the security configuration information comprises a key, an addition, and/or one of the following: a message authentication code and an initial vector. The method of claim 6, further comprising: extracting the stored security group complaint message, the information including a message authentication code and/or an initial vector; and the message authentication code and/or captured by the Kang X 4 An initial vector obtains the latest message authentication code. 8. The method of claim 5, wherein during the mother of at least two consecutive stylized cycles, the storing the password is performed on the data unit storing the data unit before the data unit is written to the cell Security configuration information used for block link processing. 9. The method of claim 8, wherein the stored security configuration information includes positioning information for locating the data unit. 1. The method of claim 9, the method further comprising: fetching the at least one cipher block before writing the one or the other of the at least one cipher block link processing data unit to the cells Linking processing one or more portions of the data unit, wherein the writing writes data from the at least one cipher block linking processing early element and another unit to the cells during the at least one period, and wherein the detecting Detecting which data unit is detected in the (etc.) cache data unit and another unit to write 119910.doc 200817993 to the cell failure; and positioning the data in the form of using the positioning information before the cipher block link processing Writing a failed data unit, wherein the circuit causes the data unit to perform a cipher block linking process. The method of claim 10, wherein the processed data unit is a data unit whose one or more parts have been cached, and the method further comprises: causing the circuit to iiut the data to be 7L and the In the stream, before the unit and not yet completely written to the cell, the sigma 肥 肥 肥 所有 所有 所有 兀 兀 兀 。 。 。 。 。 。 。 。 。 。 。 。 。 。 。 。 12. The method of claim 11, wherein, further comprising deleting from the cells any cells not yet fully written to the cells, or marking the cells to be deleted. 13. A method for processing a bedding material in a memory system for storing encrypted data. The memory system includes a plurality of non-volatile memory cells and a cryptographic circuit, the method comprising: The circuit performs cipher block linking processing on the data in one of the data streams; > writes the data in the data stream to: i in a plurality of sequential materialization cycles so as to be in the data stream The data is processed by the circuit before being written to the cells; and during at least the period of the stylization period, the data is stored for at least part of the period before the data is written to the (four) cells. The information used in the post-code block linking process is implemented to find and write the cells after the tamper block linking process. After the failure, the poor material can be written again to 1199I0.doc 200817993 14 · a non-volatile memory cell for storing encrypted data; a circuit for one-to-block link processing; and a 5 memory system including : 5 Hai special cell: Cangdou Li ^ ^ Bessie flow in the poor material implementation password one controller ’具在若干順戽P 、 流之經密碼塊鏈接處理資工匕週期十將來自該資剩 程式化週期之至少-者期f ‘.,、入至該等胞’其中在該等 料寫入至兮/ b1,在將經密碼塊鏈接處理資 杆冩入至6亥#胞之前該控 該經密碼塊鏈接處理資科的Γ4存此週期之用於該寫入 曰w. 貝枓的育訊,以便在發現一寫入失 敗後可將此育料再次寫入至該等胞。 ” 15·如請求項14之系統,:^ ψ 中,亥控制器在此週期中在該麵 密碼塊鏈接處理資料g A 、‘ 十馬入至该等胞的過程中偵測到一 敗’並使㈣所儲存之資訊將該經密碼塊鏈接處理資料 再次寫入至該等胞。 、# 16.:請求項15之系統,在將此寫入至該等胞失敗之資料進 行密碼塊鏈接處理後’該控制器使該電路對寫入至該等 胞失敗之資料實施密褐塊鏈接處理,使㈣所儲存資訊 來獲得該經密碼塊鏈接處理㈣,再次將該經密碼塊鍵 接處理資料寫入至該等胞。 17·如請求項16之系統,其中該資料寫入在該至少一個程式 化週期中將一資料單元寫入至該等胞,其中該控制器在 該資料單元經密碼塊鏈接處理後儲存該資料單元。 18·如請求項16之系統,其中該資料寫入在該至少一個程式 化週期中將一資料單元寫入至該等胞,其中該控制器儲 119910.d〇c 200817993 存對4貝料早疋實施密碼塊鏈接處理所用之安全組態資 ^fL 〇 、 19. ^求項18之系統,其中該安全組態資訊包括密輪、加 H法、及7或如下之—者:訊息㈣碼及—㈣向量。 求項19^系统,其中該控制器擷取所儲存之安全組 Ή ’該資訊包括訊息鐘別碼及/或一初始向量,並根 據该等所擷取之訊息鑑別碼獲取最新的訊息鐘別碼。 ^求項18之系統,其中在至少兩個連續程式化週期之 :-者期間’在該將資料寫入至該等胞之前該控制器儲 子此週期之對該資料單元實施該密碼塊鏈接處理所用之 安全組態資訊。 1如請求㈣之系統,其中該所儲存之安全組態資訊包括 用於定位該資料單元之定位資訊。 ί. 23.如請求項22之系統,該系統進一步包括一儲存器,其將 至少一個經密碼塊鏈接處理資料單元之—個或多個部分 寫入至該等胞之前快取該(等)部分,其中該控制器在該 至少一個週期期間自該至少-個經密碼塊鏈接處理單元 及另-單元將資料寫入至該等胞’及其中該控制器在該 ⑷所快取之資料單元及該另_單元之間傾測寫入至該 等胞失敗之資料單元,並在密碼塊鏈接處理前以—使用 該定位資訊之形歧位該經_之資料單元,盆中替 制器使該電路對該資料單元實絲碼塊鏈接處理。 24.如請求項23之系統,其中該經伯測之資料單元係—其一 個或多個部分已被快取之資料單元,且該控制器使該電 1199I0.doc 200817993 路對該資料單元及該資料流中在該單元之前且未完全寫 入f该4胞之所有資料單元實施密碼塊鏈接處理。 25·=亡:24之系統’其中該控制器從該等胞令刪除任— :。王寫入至°亥等胞之單元’或標記為欲刪除之單 26·—種用於儲存經加密資料之記憶體系統,其包括: 非揮發性記憶胞; 電路,其對一寫入 ^ 密碼塊鏈接處理;卩 料流中之資料實施 :控制器,其在若干順序程式化週期中自該資料流中 將谂碼塊鏈接處理資料 化週期之至少—者^寫^至㈣胞,其中在該等程式 ^ ^ U控制益在將此資料寫入至該 4胞之前儲存此週期夕s | ^ ^ ^ ’ 父一部分之對該資料實施該密 後及終:里所用之資訊,以便在經密碼塊鏈接處理之 υ . 敗之後可將此資料再次寫入至該等 胞0 119910.doc'With a number of smooth P, the flow of the cipher block link processing labor cycle 10 will come from at least the period of the staging period of the replenishment period f '., into the cell 'which is written in the material Into 兮 / b1, before the cipher block link processing resource is inserted into the 6 hai cell, the cryptographic block link processing the 资4 saves the period for the write 曰w. Advice, so that the feed can be rewritten to the cells after a write failure is found. 15. If the system of claim 14 is: ^ ψ, the controller in this period detects the failure of the data in the cipher block link processing data g A, 'the ten horses into the cells' The information stored in (4) is rewritten to the cells by the cipher block link processing data., #16: The system of the request item 15 is written to the data of the failed cells for cipher block link processing. After the controller causes the circuit to perform a secret block linking process on the data written to the failed cell, so that (4) the stored information is obtained to obtain the cipher block linking process (4), and the cipher block is processed again by the cipher block. 17. The system of claim 16, wherein the data is written to write a data unit to the cell in the at least one stylized cycle, wherein the controller is cryptographically in the data unit 18. The system of claim 16, wherein the data is written to write to a cell in the at least one stylized cycle, wherein the controller stores 119910.d 〇c 200817993 Save 4Before the implementation of the cryptographic block link processing security configuration resources, the system of the system 18, wherein the security configuration information includes the secret wheel, plus H method, and 7 or below - : message (4) code and - (4) vector. The item 19^ system, wherein the controller retrieves the stored security group Ή 'this information includes the message clock code and/or an initial vector, and according to the selected The message authentication code obtains the latest message clock code. ^ The system of claim 18, wherein during at least two consecutive stylized periods: - during the period of writing the data to the cells, the controller stores the The security configuration information used for the cipher block link processing is performed on the data unit. 1 The system of claim (4), wherein the stored security configuration information includes positioning information for locating the data unit. The system of claim 22, the system further comprising a memory for fetching the (partial) portion of the at least one cryptographic block link processing data unit prior to writing the one or more portions to the cell The controller is in Writing data to the at least one cipher block linking processing unit and another unit from the cryptographic block linking processing unit and the other unit during one less period and wherein the controller pours between the data unit cached by the (4) and the other _ unit Detecting the data unit that is written to the failed cell, and using the location information of the location information before the cipher block link processing, using the data unit of the location information, the substitute in the basin causes the circuit to wire the data unit 24. The method of claim 23, wherein the system of claim 23, wherein the data unit is one or more portions of which have been cached, and the controller makes the circuit 1199I0.doc 200817993 The cryptographic block linking process is performed on the data unit and all data units in the data stream that are in front of the unit and are not completely written to the four cells. 25·=Death: System of 24' where the controller removes from the order - :. The unit that the king writes to the cell of 'Hai' or the cell that is marked as to be deleted is a memory system for storing encrypted data, which includes: a non-volatile memory cell; a circuit, which writes to a ^ Cryptographic block link processing; data implementation in a trickle stream: a controller that writes at least one of the data processing cycles of the weight block link processing from the data stream to the (four) cell in a plurality of sequential stylization cycles, wherein In the program ^ ^ U control benefits before the data is written to the 4 cells to store this cycle s | ^ ^ ^ ' The father part of the data to implement the secret and the end: the information used in order to After being processed by the cipher block link, this data can be rewritten to the cells after the defeat. 0 119910.doc
TW096111847A 2006-04-03 2007-04-03 System and method for write failure recovery TW200817993A (en)

Applications Claiming Priority (2)

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

Publications (1)

Publication Number Publication Date
TW200817993A true TW200817993A (en) 2008-04-16

Family

ID=38581765

Family Applications (1)

Application Number Title Priority Date Filing Date
TW096111847A TW200817993A (en) 2006-04-03 2007-04-03 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
WO2007118034A2 (en) 2007-10-18
KR20080108119A (en) 2008-12-11
JP2009537026A (en) 2009-10-22

Similar Documents

Publication Publication Date Title
TWI411932B (en) Method for encrypting/decrypting data in non-volatile memory in a storage device and method for processing data
US8862902B2 (en) Cascaded data encryption dependent on attributes of physical memory
US7835518B2 (en) System and method for write failure recovery
CN103299315B (en) System and method for in-place encryption
TW200823927A (en) Method and system to provide security implementation for storage devices
CN103748827A (en) System and method for wireless data protection
US8983072B2 (en) Portable data carrier featuring secure data processing
US9069978B2 (en) Data storage device and data protection method
TWI648741B (en) Controller for data storage device and method for erasing advanced data
TW201903641A (en) Data storage devices and methods for encrypting and decrypting firmware thereof
JP5118494B2 (en) Memory system having in-stream data encryption / decryption function
KR20150026915A (en) Virtual bands concentration for self encrypting drives
US8898807B2 (en) Data protecting method, mobile communication device, and memory storage device
JP2008524969A5 (en)
CN116601915A (en) Encrypting and erasing data stored in a Key per IO enabled device via internal actions
TWI362207B (en) Key cache management through multiple localities
CN205302294U (en) Embedded system
CN115357930A (en) Data deleting method and electronic equipment
TW200817993A (en) System and method for write failure recovery
US20070230690A1 (en) System for write failure recovery
TWI509457B (en) Data storage device and data protection method
TW202403773A (en) Semiconductor device, and system and method for managing secure operations in the same
CN106155578A (en) The method of mobile phone flash memory chip data restructuring
KR20230102145A (en) Electric device and method for emulating non-volatile memory
CN103778073A (en) Data protection method, mobile communication device and storage storing device