JP7613276B2 - Secure element, device and method for managing non-volatile memory - Google Patents
Secure element, device and method for managing non-volatile memory Download PDFInfo
- Publication number
- JP7613276B2 JP7613276B2 JP2021092105A JP2021092105A JP7613276B2 JP 7613276 B2 JP7613276 B2 JP 7613276B2 JP 2021092105 A JP2021092105 A JP 2021092105A JP 2021092105 A JP2021092105 A JP 2021092105A JP 7613276 B2 JP7613276 B2 JP 7613276B2
- Authority
- JP
- Japan
- Prior art keywords
- page
- data
- volatile memory
- written
- secure element
- 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.)
- Active
Links
Images
Landscapes
- Memory System (AREA)
- Read Only Memory (AREA)
Description
本発明は,セキュアエレメントが有する不揮発性メモリのメモリ寿命を延ばす技術に関する。 The present invention relates to technology for extending the memory life of non-volatile memory contained in a secure element.
外部からの解析攻撃に対する強固な耐タンパー性を持つ半導体製品であるセキュアエレメントは,様々なデバイス(例えば,ICカード)に搭載されている。セキュアエレメントを搭載したデバイスの主用途はセキュリティ用途(例えば,金融決済用途)になる。 Secure elements, which are semiconductor products with strong tamper resistance against external analysis attacks, are installed in various devices (e.g., IC cards). The main use of devices equipped with secure elements is for security purposes (e.g., financial settlement purposes).
セキュリティ用途で用いられるデバイスに実装するセキュアエレメントは,データを記憶するメモリとして,電気的に書き換え可能な不揮発性メモリを備える。これ以降,不揮発性メモリとは,電気的に書き換え可能な不揮発性メモリを意味する。 A secure element implemented in a device used for security purposes has electrically rewritable non-volatile memory as the memory for storing data. Hereinafter, non-volatile memory means electrically rewritable non-volatile memory.
セキュアエレメントが備える不揮発性メモリは,ページと呼ばれる単位で管理される。不揮発性メモリでは,データの消去単位はページ単位になる。このため,データを格納した不揮発性メモリのページにデータを書き込む処理では,データを書き込むページのページデータ(ページの全体データを意味する)を消去した後,所定のアドレスにデータを書き込んだページデータを,ページデータを消去したページに書き込まなければならない。 The non-volatile memory in a secure element is managed in units called pages. In non-volatile memory, data is erased in units of pages. For this reason, when writing data to a page of non-volatile memory that stores data, the page data (meaning the entire data of the page) of the page to which the data is to be written must first be erased, and then the page data with the data written to a specified address must be written to the page from which the page data was erased.
不揮発性メモリを構成する記録素子の構造上,不揮発性メモリの更新回数(消去回数)には上限がある。不揮発性メモリに設けられた更新限度回数は,不揮発性メモリの種類によって異なる。例えば,不揮発性メモリの更新限度回数は10万回である。 Due to the structure of the recording elements that make up nonvolatile memory, there is a limit to the number of times the nonvolatile memory can be updated (erased). The update limit set for nonvolatile memory varies depending on the type of nonvolatile memory. For example, the update limit for nonvolatile memory is 100,000 times.
近年,セキュアエレメントに格納するデータのサイズが増加したことにより,セキュアエレメントが備える不揮発性メモリの容量が増加し,不揮発性メモリのページサイズも増加傾向にある。 In recent years, the size of data stored in secure elements has increased, leading to an increase in the capacity of the non-volatile memory in secure elements and a trend toward an increase in the page size of the non-volatile memory.
ページサイズが大きくなると,サイズが大きいデータを扱う場合,データを書き込むページが少なくて済むなどの利点が生じる。しかし,サイズが小さいデータを取り扱う場合,1つのページに含まれるデータの数が多くなるため,書き換え頻度が高い複数のデータが1つページに格納されていると,このページの更新回数が増え,不揮発性メモリのメモリ寿命が短くなる問題が生じる。よって,書き換え頻度の高いデータが存在しても,不揮発性メモリのメモリ寿命が短くならない工夫が必要になる。 When the page size is large, there are advantages such as the fact that fewer pages need to be written to the data when handling large data. However, when handling small data, the amount of data contained in one page increases, and if multiple pieces of data that are frequently rewritten are stored in one page, the number of updates to this page increases, resulting in a problem of shortening the memory lifespan of the non-volatile memory. Therefore, it is necessary to devise a way to prevent the memory lifespan of non-volatile memory from being shortened even when data that is frequently rewritten exists.
不揮発性メモリのメモリ寿命を延ばす工夫に,ウェアレベリング処理を用いるのが一般的になっている(例えば,特許文献1)。ウェアレベリング処理とは,書き換えが行われる記憶素子が特定のものに偏らないように分散することで,特定のデータについて繰り返し書き換えが発生した場合でも不揮発性メモリの全体として記憶素子の消耗を平均化する技術である。 The use of wear leveling has become common as a way to extend the memory life of non-volatile memory (for example, see Patent Document 1). Wear leveling is a technique that distributes memory elements that are rewritten so that they are not biased toward specific ones, thereby averaging out the wear of memory elements in the non-volatile memory as a whole, even if specific data is repeatedly rewritten.
ウェアレベリング処理により不揮発性メモリのメモリ寿命を延ばすと,不揮発性メモリのメモリ寿命を延ばすための処理が複雑になる問題がある。特に,書き換え頻度が高くサイズが小さいデータが一つのページに複数点在すると,それぞれのデータを考慮してウェアレベリング処理を行わなければならず,不揮発性メモリのメモリ寿命を延ばすための処理がより複雑になる。 When wear leveling is used to extend the memory life of non-volatile memory, the process of extending the memory life of non-volatile memory becomes complicated. In particular, when multiple small pieces of data that are frequently rewritten are scattered across a single page, wear leveling must be performed taking into account each piece of data, making the process of extending the memory life of non-volatile memory even more complicated.
そこで,本発明は,複雑にならない比較的単純な処理で,セキュアエレメントに実装された不揮発性メモリのメモリ寿命を延ばせることを目的とする。 The present invention aims to extend the memory life of non-volatile memory implemented in a secure element using relatively simple processing that is not complicated.
上述した課題を解決する第1発明は, データを格納したページの代替に利用するスペア領域を設けた電気的に書き換え可能な不揮発性メモリと,論理ページ番号に関連付けて論理ページ番号に対応させたページのエントリ情報を管理するメモリ管理手段を備え,前記メモリ管理手段は,データを書き込む処理を実行するごとに,データを書き込んだページの更新回数を記録し,データを書き込んだページの更新回数が閾値に達すると,データを書き込んだページのページデータを前記スペア領域に含まれる一つのページに複写し,データを書き込んだページが対応している論理ページ番号に関連付けられているエントリ情報を,前記ページデータを複写した前記スペア領域のページのエントリ情報に書き換える処理を実行することを特徴とするセキュアエレメントである。 The first invention for solving the above-mentioned problems is a secure element that includes an electrically rewritable non-volatile memory provided with a spare area used to replace a page that stores data, and a memory management means for managing entry information of a page that corresponds to the logical page number in association with the logical page number, the memory management means recording the number of updates of the page to which data is written each time data is written, and when the number of updates of the page to which data is written reaches a threshold value, copying the page data of the page to which data is written to one page included in the spare area, and rewriting the entry information associated with the logical page number to which the page to which data is written corresponds to the entry information of the page of the spare area to which the page data is copied.
更に,第2発明は,第1発明に記載したセキュアエレメントを実装したデバイスである。 Furthermore, the second invention is a device that implements the secure element described in the first invention.
更に,第3発明は,データを格納したページの代替に利用するスペア領域を電気的に書き換え可能な不揮発性メモリに設け,論理ページ番号に関連付けて論理ページ番号に対応させたページのエントリ情報を管理するメモリ管理手段が,データを書き込む処理を実行するごとに,データを書き込んだページの更新回数を記録するステップ,前記メモリ管理手段が,データを書き込んだページの更新回数が閾値に達すると,データを書き込んだページのページデータを前記スペア領域に含まれる一つのページに複写し,データを書き込んだページが対応している論理ページ番号に関連付けられているエントリ情報を,前記ページデータを複写した前記スペア領域のページのエントリ情報に書き換えるステップを実行することを特徴とするセキュアエレメントの不揮発性メモリ管理方法である。 The third invention is a non-volatile memory management method for a secure element, characterized in that a spare area used to replace a page storing data is provided in an electrically rewritable non-volatile memory, and a memory management means for managing entry information of a page corresponding to the logical page number in association with a logical page number records the number of updates of the page to which data is written each time a data write process is executed, and when the number of updates of the page to which data is written reaches a threshold value, the memory management means executes a step of copying the page data of the page to which data is written to one page included in the spare area, and rewriting the entry information associated with the logical page number to which the page to which data is written corresponds to the entry information of the page of the spare area to which the page data is copied.
本発明では,更新回数が更新限度回数に近づいた不揮発性メモリのページを他のページで代替するだけの比較的単純な処理で,不揮発性メモリのメモリ寿命を延ばすことができる。 In this invention, the memory life of non-volatile memory can be extended by a relatively simple process of replacing a page of non-volatile memory whose update count is approaching the update limit with another page.
ここから,本発明に係る実施形態について記載する。本実施形態は,本発明の理解を容易にするためのものであり,本発明は,本実施形態に限定されるものではない。また,特に断りのない限り,図面は,本発明の理解を容易にするために描かれた模式的な図である。 From here, an embodiment of the present invention will be described. This embodiment is intended to facilitate understanding of the present invention, and the present invention is not limited to this embodiment. Furthermore, unless otherwise specified, the drawings are schematic diagrams drawn to facilitate understanding of the present invention.
図1は,セキュアエレメント1を搭載したデバイス2の一例を説明する図である。図1では,セキュアエレメント1を搭載したデバイス2を,ISO7816に準拠した接触通信により外部端末と通信する接触型ICカードとして図示している。
Figure 1 is a diagram for explaining an example of a
図1において,デバイス2はクレジットカードの形状にしているが,セキュアエレメント1を搭載したデバイス2の形状は,クレジットカードの形状に限定されない。セキュアエレメント1を搭載したデバイス2は,スマートフォンなどに装着するSIM(Subscriber Identity Module)でもよく,または,スマートフォンなどの基板に実装するeSIM(embedded Subscriber Identity Module)でもよい。
In FIG. 1, the
図1で図示したデバイス2において,セキュアエレメント1は外部端子の裏側に樹脂モールドされている。セキュアエレメント1は,外部端子20を介して図外の外部装置(例えば,リーダライタ)と接触通信する。なお,セキュアエレメント1が対応する通信方式は,ISO7816に準拠した接触通信に限定されない。セキュアエレメント1が対応する通信方式は,ISO14443に準拠した非接触通信でもよく,コンピュータ内部で用いられる通信方式(例えば,SPI,Serial Peripheral Interface)でもよい。
In the
図2は,セキュアエレメント1が備えるハードウェアを説明する図である。本実施形態に係るセキュアエレメント1は,ハードウェアとして,接触通信インタフェース101,CPU100(Central Processing Unit),RAM102(Random Access Memory),ROM103(Read Only Memory),不揮発性メモリ104,コプロセッサ105(Coprocessor),乱数生成器106(RNG: Random Number Generator),および,電力供給回路107を備えている。当然のことながら,セキュアエレメント1に集積する回路は,これらの回路に限定されない。
Figure 2 is a diagram explaining the hardware of the
本実施形態において,セキュアエレメント1のCPU100は,メモリに格納されたプログラムコードを解釈して,所定の処理を実行する回路である。電力供給回路107は,デバイス2の表面にある外部端子20(VCC端子)と接続し,外部端末から供給された電力を他の回路(例えば,CPU100)に供給する回路である。接触通信インタフェース101は,デバイス2の表面にある外部端子20(I/O端子)と接続し,外部端末と接触通信を行う回路である。コプロセッサ105は,暗号鍵を用いた暗号演算を高速に処理できるように構成された回路である。乱数生成器106は,乱数を生成する回路である。
In this embodiment, the
RAM102,ROM103および不揮発性メモリ104は,セキュアエレメント1が備えるメモリになる。RAM102は,電気的な書き換え可能な揮発性メモリである。ROM103は,電気的に書き換えできない読取り専用のメモリである。不揮発性メモリ104は,電気的に書き換え可能な不揮発性のメモリである。
図3は,セキュアエレメント1の構成を説明する図である。セキュアエレメント1が備える不揮発性メモリ104は,データの書き込み対象となるメモリである。セキュアエレメント1に実装されたオペレーティングシステム10(以下,「OS10」と記す。OSは,Operating Systemの略)は,不揮発性メモリ104を管理する機能を有する。
Figure 3 is a diagram explaining the configuration of the
アプリケーション12は,不揮発性メモリ104にデータを書き込む処理を必要とするコマンドを有する。このコマンドには,書き込み系コマンドのみならず認証系コマンドなども含まれる。認証系コマンドでは,認証の中断または失敗した回数をカウントするリトライカウンタが少なくとも必要となる。リトライカウンタは不揮発性メモリ104に格納されるデータである。認証系コマンドが実行されるごとに,不揮発性メモリ104に格納されたリトライカウンタの値は一つ減算した値に書き換えられ,認証系コマンドに対応した認証に成功すると,不揮発性メモリ104に格納されたリトライカウンタの値はリトライカウンタの最大値に書き換えられる。
The
図4は,不揮発性メモリ104の構造を説明する図である。図4で図示したごとく,セキュアエレメント1が備える不揮発性メモリ104は,セキュアエレメント1に実装されたOS10により,ページ13と呼ばれる単位に分割されて管理される。ページ13とは,具体的に,所定のページサイズの連続したアドレス範囲になる。容量が比較的小さい不揮発性メモリ104の場合,ページサイズは数十バイト程度であるが,容量が比較的大きい不揮発性メモリ104の場合,ページサイズは,128バイト,256バイトまたは512バイトなどになる。
Figure 4 is a diagram explaining the structure of the
セキュアエレメント1が備える不揮発性メモリ104はデータ格納領域1040およびスペア領域1043を含んでいる。データ格納領域1040は,OS10に割り当てられた領域であるOS領域1041と,セキュアエレメント1に実装されたアプリケーション12に割り当てられた領域であるアプリケーション領域1042を含む。OS領域1041に含まれるページ13には,OS10が使用するデータを少なくとも格納する。OS10のプログラムコードの本体はROM103に記憶される。アプリケーション領域1042に含まれるページ13には,アプリケーション12のプログラムコード,および,アプリケーション12が使用するデータを格納する。
The
スペア領域1043は,データ格納領域1040に含まれるページ13の代替に用いるページ13を確保するための領域である。スペア領域1043のページ13で代替するデータ格納領域1040のページ13は,更新回数が不揮発性メモリ104の更新限度回数に近くなったページ13になる。なお,データ格納領域1040のページ13の代替に使用されたスペア領域1043のページ13は,スペア領域1043からデータ格納領域1040に移行する。スペア領域1043の一つのページ13が代替に使用されると,スペア領域1043に含まれるページ数は一つ減るが,データ格納領域1040に含まれるページ数は変わらない。
The
セキュアエレメント1に実装されたOS10は,不揮発性メモリ104を管理する機能としてメモリ管理手段11を備えている。
The
メモリ管理手段11は,セキュアエレメント1に実装されている不揮発性メモリ104のページ13を管理するためのデータテーブルとして,論理ページ番号とこれに対応させる不揮発性メモリ104のページ13に係るエントリ情報を記したページテーブル130を有している。
The memory management means 11 has a page table 130 that contains logical page numbers and corresponding entry information relating to
論理ページ番号は,不揮発性メモリ104の論理的なページ番号で,コンピュータプログラムがアドレスの指定に使用するページ番号である。論理ページ番号を用いて不揮発性メモリ104のページ13を管理することで,コンピュータプログラムは,コンピュータプログラムがアクセスするデータの物理アドレスを意識することなく,所定のデータにアクセスできる。
The logical page number is the logical page number of the
図5は,ページテーブル130を説明する図である。ページテーブル130には,論理ページ番号の総数に応じたレコードが設けられる。本実施形態において,論理ページ番号の総数は,不揮発性メモリ104の総ページになる。図5では,論理ページ番号は降順で並んでいる。一つのレコードには,レコードに対応する論理ページ番号と,論理ページ番号に対応させるページ属性と,論理ページ番号に対応させるページ13のエントリ情報が記される。
Figure 5 is a diagram explaining the page table 130. The page table 130 has records according to the total number of logical page numbers. In this embodiment, the total number of logical page numbers is the total number of pages in the
ページ属性は,論理ページ番号に対応させる不揮発性メモリ104のページ13の属性を示す情報である。本実施形態では,ページ属性は,データ格納領域1040またはスペア領域1043のいずれかを示す情報である。ページ属性をスペア領域1043に設定する論理ページ番号の数は予め決まっている。図5では,ページ属性をスペア領域1043に設定した論理ページ番号は,ページテーブル130の下位最末端に配置されている。図5において,ページ属性をスペア領域1043に設定しない論理ページ番号のページ属性はすべてデータ格納領域1040に設定されている。
The page attribute is information indicating the attribute of the
不揮発性メモリ104のページ13のエントリ情報は,不揮発性メモリ104のページ13にアクセスするための情報を含んでいる。本実施形態のエントリ情報は,ページ13の開始アドレスを含んでいる。開始アドレスは,ページ13に対応する領域の先頭になる不揮発性メモリ104のアドレスである。ページテーブル130に記されたエントリ情報を利用することで,論理ページ番号に対応する不揮発性メモリ104のページ13にアクセスできる。
The entry information for
メモリ管理手段11は,ページ13の更新回数をページ13ごと管理できるように構成されている。ページ13の更新回数はページテーブル130に記憶させることができるが,ページ13の更新回数をページテーブル130に記憶させると,ページテーブル130を格納したページ13の更新回数が最も高くなってしまう。なぜなら,データを書き込むページ13にかかわらず,データを書き込む処理を実行するごとに,ページテーブル130を格納したページ13の更新が必ず必要になるからである。
The memory management means 11 is configured to be able to manage the number of updates for each
そこで,本実施形態では,ページ13ごとに記憶させるデータであるページ管理情報131にページ13の更新回数を記憶させている。ページ管理情報131には,更新回数以外に,ページ13の管理に係る他のデータを含ませることができる。例えば,ページデータの誤り検出符号をページ管理情報131に含ませることができる。データの書き込みはページ単位で行われるため,ページ13にデータを書き込む際,データを書き込むページ13のページ管理情報131に含まれる更新回数も同時に更新すれば,ページ13の更新回数を記録するためだけにページ13を更新する必要はなくなる。
Therefore, in this embodiment, the number of updates for
本実施形態に係るメモリ管理手段11が,ページ13の更新回数をページ13ごとに管理するのは,ページ13の更新回数が更新限度回数に近づいたページ13をスペア領域1043のページ13で代替できるようにするためである。メモリ管理手段11がこの機能を備えることにより,更新回数が更新限度回数に近づいたページ13を他のページ13で代替するだけの比較的単純な処理で,不揮発性メモリ104のメモリ寿命を延ばすことができる。また,書き換え頻度の高いページ13のページ数に合わせてスペア領域1043に含ませるページ数の初期値を決定すれば,不揮発性メモリ104のメモリ寿命を延ばすために必要な不揮発性メモリ104のページ数を少なくできる。
The memory management means 11 according to this embodiment manages the number of updates of each
ここから,本実施形態に係るセキュアエレメント1が備えるメモリ管理手段11の動作について詳細に説明する。図6は,セキュアエレメント1が備えるメモリ管理手段11の動作を説明する図である。図6の説明は、本発明に係る不揮発性メモリ管理方法の説明も兼ねる。
From here, the operation of the memory management means 11 provided in the
図6のステップS1において,メモリ管理手段11は,不揮発性メモリ104へのデータ書き込み要求を受ける。不揮発性メモリ104へのデータ書き込み要求をメモリ管理手段11に行う主体はアプリケーション12などのコンピュータプログラムになる。不揮発性メモリ104へのデータ書き込み要求では,不揮発性メモリ104に書き込むデータとこのデータを書き込む書き込み先アドレスがメモリ管理手段11に引き渡される。なお,書き込み先アドレスの指定には,論理ページ番号が少なくとも用いられる。具体的には,アドレスは,論理ページ番号とページ内オフセットによって記述される。
In step S1 of FIG. 6, the memory management means 11 receives a request to write data to the
図6のステップS2おいて,メモリ管理手段11は,データ書き込み要求に含まれる書き込み先アドレスから,データ書き込み要求に含まれるデータを書き込む処理を実行する。図6のステップS3において,メモリ管理手段11は,データを書き込んだ不揮発性メモリ104のページ13(データ格納領域1040に含まれるページ13になる)の更新回数を記録する処理を行う。図6のステップS4において,メモリ管理手段11は,データを書き込んだ不揮発性メモリ104のページ13の更新回数を確認する。データを書き込んだ不揮発性メモリ104のページ13の更新回数が閾値に達していない場合,メモリ管理手段11は,不揮発性メモリ104のページ13の代替に係る処理を実行することなく,図6の手順を終了する。
In step S2 of FIG. 6, the memory management means 11 executes a process of writing the data included in the data write request from the write destination address included in the data write request. In step S3 of FIG. 6, the memory management means 11 executes a process of recording the number of updates of
データを書き込んだ不揮発性メモリ104のページ13の更新回数が閾値に達した場合,メモリ管理手段11は,データを書き込んだ不揮発性メモリ104のページ13を代替する処理を実行する。
When the number of updates to
更新回数が閾値に達した不揮発性メモリ104のページ13を代替する際,まず,メモリ管理手段11は,図6のステップS5において,ページ属性がスペア領域1043で,スペア領域1043のページ13のエントリ情報を関連付けている論理ページ番号をページテーブル130から一つ選択する。
When replacing
次に,メモリ管理手段11は,図6のステップS6において,更新回数が閾値に達した不揮発性メモリ104のページ13の更新回数を初期化する。なお,更新回数が閾値に達した不揮発性メモリ104のページ13は,データ書き込み要求の書き込み先アドレスに含まれる論理ページ番号に対応するページ13になる。
Next, in step S6 of FIG. 6, the memory management means 11 initializes the update count of the
次に,メモリ管理手段11は,図6のステップS7において,更新回数が閾値に達した不揮発性メモリ104のページ13を,図6のステップS5で選択した論理ページ番号に対応するスペア領域1043のページ13で代替する処理を実行して,図6の手順は終了する。
Next, in step S7 of FIG. 6, the memory management means 11 executes a process of replacing
図6のステップS4において,ページ13の更新回数を記録する処理の具体的な内容は,ページ13の更新回数の記録場所で異なる。ページ管理情報131にページ13の更新回数を記録する場合,データの書き込みと共にページ管理情報131の更新回数も更新される。
In step S4 of FIG. 6, the specific content of the process for recording the number of updates for
図6のステップS7において,更新回数の判定に用いる閾値の決め方は任意である。例えば,閾値は,不揮発性メモリ104に設けられた更新限度回数の95%の値にできる。
In step S7 of FIG. 6, the threshold value used to determine the number of updates can be determined in any way. For example, the threshold value can be set to 95% of the update limit set in the
図7は,更新回数が閾値に達したページ13を代替する処理を説明する図である。図6のステップS7において,更新回数が閾値に達したデータ格納領域1040のページ13をスペア領域1043のページ13で代替する処理は,図7で図示した処理になる。
Figure 7 is a diagram explaining the process of replacing
図7のステップS10において,メモリ管理手段11は,更新回数が閾値に達したページ13のページデータを,図6のステップS5で選択した論理ページ番号に対応するスペア領域1043のページ13に複写する。更新回数が閾値に達したページ13にアクセスするためのエントリ情報は,ページテーブル130において,データ書き込み要求の書き込み先アドレスに含まれる論理ページ番号に関連付けられているエントリ情報になる。代替に用いるスペア領域1043のページ13にアクセスするためのエントリ情報は,図6のステップS5で選択した論理ページ番号に関連付けられているエントリ情報になる。
In step S10 of FIG. 7, the memory management means 11 copies the page data of
次に,図7のステップS11において,メモリ管理手段11は,ページテーブル130において,更新回数が閾値に達したページ13に対応している論理ページ番号に関連付けられたエントリ情報を,図6のステップS5で選択した論理ページ番号に関連付けられているエントリ情報,すなわち,ページデータを複写したスペア領域1043のページ13のエントリ情報に書き換える。これにより,更新回数が閾値に達した不揮発性メモリ104のページ13は,図6のステップS5で選択した論理ページ番号が対応しているスペア領域1043のページ13で代替される。また,更新回数が閾値に達したページ13のエントリ情報はページテーブル130から消えるため,更新回数が閾値に達したページ13は利用できない。
7, the memory management means 11 rewrites the entry information associated with the logical page number corresponding to the
次に,図7のステップS12において,メモリ管理手段11は,更新回数が閾値に達したページ13の代替に使用したスペア領域1043のページ13に対応している論理ページ番号のエントリ情報,すなわち,図6のステップS5で選択した論理ページ番号に関連付けられているエントリ情報を消去し,図7の手順は終了する。図6のステップS5で選択した論理ページ番号に関連付けられているエントリ情報を消去することで,データ格納領域1040のページ13の代替に使用したスペア領域1043のページ13はページ13の代替に使用できなくなる。
Next, in step S12 of FIG. 7, the memory management means 11 erases the entry information of the logical page number corresponding to
1 セキュアエレメント
10 オペレーティングシステム
11 メモリ管理手段
12 アプリケーション
104 不揮発性メモリ
1040 データ格納領域
1043 スペア領域
13 ページ
130 ページテーブル
1300 エントリ情報
131 ページ管理情報
REFERENCE SIGNS
Claims (3)
前記メモリ管理手段は,データを書き込む処理を実行するごとに,データを書き込んだページの更新回数を記録し,データを書き込んだページの更新回数が閾値に達すると,データを書き込んだページのページデータを前記スペア領域に含まれる一つのページに複写し,データを書き込んだページが対応している論理ページ番号に関連付けられているエントリ情報を,前記ページデータを複写した前記スペア領域のページのエントリ情報に書き換える処理を実行する,
ことを特徴とするセキュアエレメント。 The memory management unit is provided with an electrically rewritable non-volatile memory having a spare area to be used as a replacement for a page storing data, and a memory management unit that manages entry information of a page corresponding to the logical page number in association with the logical page number,
the memory management means records the number of updates of the page into which the data is written each time a data write process is executed, and when the number of updates of the page into which the data is written reaches a threshold value, executes a process of copying page data of the page into which the data is written to one page included in the spare area, and rewriting entry information associated with a logical page number corresponding to the page into which the data is written to entry information of the page in the spare area into which the page data is copied;
A secure element characterized by:
ことを特徴とするセキュアエレメントの不揮発性メモリ管理方法。 a step of providing a spare area used as a replacement for a page storing data in an electrically rewritable non-volatile memory, a memory management means for managing entry information of a page corresponding to the logical page number in association with a logical page number, recording the number of updates of the page to which data has been written each time a data write process is executed, and when the number of updates of the page to which data has been written reaches a threshold value, the memory management means executes a step of copying page data of the page to which data has been written to one page included in the spare area, and rewriting entry information associated with the logical page number to which the page to which data has been written corresponds to entry information of the page in the spare area to which the page data has been copied;
13. A method for managing non-volatile memory of a secure element, comprising:
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2021092105A JP7613276B2 (en) | 2021-06-01 | 2021-06-01 | Secure element, device and method for managing non-volatile memory |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2021092105A JP7613276B2 (en) | 2021-06-01 | 2021-06-01 | Secure element, device and method for managing non-volatile memory |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2022184327A JP2022184327A (en) | 2022-12-13 |
| JP7613276B2 true JP7613276B2 (en) | 2025-01-15 |
Family
ID=84437525
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2021092105A Active JP7613276B2 (en) | 2021-06-01 | 2021-06-01 | Secure element, device and method for managing non-volatile memory |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP7613276B2 (en) |
Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2003141880A (en) | 2001-11-02 | 2003-05-16 | Matsushita Electric Ind Co Ltd | Nonvolatile semiconductor memory device |
| JP2010186477A (en) | 2009-02-10 | 2010-08-26 | Samsung Electronics Co Ltd | Memory system and wear level management method thereof |
Family Cites Families (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP4096660B2 (en) * | 2002-08-22 | 2008-06-04 | カシオ計算機株式会社 | Data recording control device and program |
| JP2016085677A (en) * | 2014-10-28 | 2016-05-19 | 富士通株式会社 | Memory management method, memory management program, and information processing device |
| JP6984328B2 (en) * | 2017-11-06 | 2021-12-17 | 大日本印刷株式会社 | Electronic information storage medium, IC card, external device, data writing method and data writing program |
-
2021
- 2021-06-01 JP JP2021092105A patent/JP7613276B2/en active Active
Patent Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2003141880A (en) | 2001-11-02 | 2003-05-16 | Matsushita Electric Ind Co Ltd | Nonvolatile semiconductor memory device |
| JP2010186477A (en) | 2009-02-10 | 2010-08-26 | Samsung Electronics Co Ltd | Memory system and wear level management method thereof |
Also Published As
| Publication number | Publication date |
|---|---|
| JP2022184327A (en) | 2022-12-13 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US11741016B2 (en) | Method for performing access management in a memory device, associated memory device and controller thereof, and associated electronic device | |
| US7006383B2 (en) | Nonvolatile semiconductor memory for management of a number of data writer/erase times | |
| JP5329884B2 (en) | Portable electronic device and data processing method in portable electronic device | |
| US9235534B2 (en) | Data protecting method, memory controller and memory storage apparatus | |
| JP3576625B2 (en) | Data management method for flash memory card and data processing device using the data management method | |
| US9772937B2 (en) | Data processing method, memory controller and memory storage apparatus | |
| US20110055430A1 (en) | Method for establishing a communication channel between a host device and a memory device, associated memory device and controller thereof, and associated host device and host device application | |
| CN109685190B (en) | Power-down protection method and device for IC card | |
| JP7613276B2 (en) | Secure element, device and method for managing non-volatile memory | |
| CN112711378B (en) | Data storage method and read-write equipment | |
| US11347433B2 (en) | Method for performing sudden power off recovery management, associated memory device and controller thereof, and associated electronic device | |
| JP4100160B2 (en) | IC card and IC card data management method | |
| JP4460850B2 (en) | IC card and IC card processing method | |
| JP2019049876A (en) | Electronic information storage medium, IC card, table management method using electronic information storage medium, and table management program | |
| KR100445134B1 (en) | Host equipped with stabilizing function for flash memory and the method thereof | |
| JP7322923B2 (en) | Secure element, transaction control method and device | |
| JP7043886B2 (en) | Information processing method and OS using electronic information storage medium, IC card, electronic information storage medium | |
| JP7438432B1 (en) | Electronic information storage medium, IC chip, IC card, record writing method, and program | |
| JP2022187935A (en) | Secure element, electronic information storage medium and data update method | |
| US20090083273A1 (en) | Portable electronic apparatus and control method for portable electronic apparatus | |
| JP6758910B2 (en) | IC card | |
| US7346730B2 (en) | Mobile electronic device | |
| JP2024139134A (en) | Electronic information storage medium, IC chip, method for writing issuance data, and program | |
| KR101149539B1 (en) | Smart card and method for processing transaction of smart card | |
| JPS63200399A (en) | data processing system |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20240412 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20241119 |
|
| TRDD | Decision of grant or rejection written | ||
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20241126 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20241209 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 7613276 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |