JP2003123030A - File management method, and memory card and terminal apparatus that make use of the method - Google Patents

File management method, and memory card and terminal apparatus that make use of the method

Info

Publication number
JP2003123030A
JP2003123030A JP2002225290A JP2002225290A JP2003123030A JP 2003123030 A JP2003123030 A JP 2003123030A JP 2002225290 A JP2002225290 A JP 2002225290A JP 2002225290 A JP2002225290 A JP 2002225290A JP 2003123030 A JP2003123030 A JP 2003123030A
Authority
JP
Japan
Prior art keywords
area
processing system
information
file
file management
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.)
Granted
Application number
JP2002225290A
Other languages
Japanese (ja)
Other versions
JP4057858B2 (en
Inventor
佳彦 ▲高▼木
Yoshihiko Takagi
Yoshiaki Nakanishi
良明 中西
Osamu Sasaki
理 佐々木
Tsutomu Sekibe
勉 関部
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
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
Application filed by Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP2002225290A priority Critical patent/JP4057858B2/en
Publication of JP2003123030A publication Critical patent/JP2003123030A/en
Application granted granted Critical
Publication of JP4057858B2 publication Critical patent/JP4057858B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To prevent inconsistencies between a file recorded in a memory card and file management information for a terminal without leaking the information of the file made and stored in an in-card processing system. SOLUTION: The in-card processing system 100 is provided with an area change request means 130 that requests reservation of an area of a flash memory 200, a reserve area information receiving means 140 that receives the information of a reserve area, and a management information search means 160 that holds storage position information of card-dedicated file management information 220. A terminal processing system 300 is provided with a file information processing means 330 that updates the file management information for itself, an area reserving means 350 that reserves the area of the flash memory 200 corresponding to an area reserve request, a dummy file information generation means 360 that generates dummy file information of the reserve area, and a reserve area notifying means 370 that transmits the reserve area to the in-card processing system 100.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】本発明は、ファイル管理方法
ならびにそれを用いたメモリカードおよび端末装置に関
し、特に、メモリカードに実際に記録されているファイ
ルとファイル管理情報との不整合を防止するものであ
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a file management method, a memory card and a terminal device using the file management method, and more particularly, to prevent inconsistency between a file actually recorded in a memory card and file management information. Is.

【0002】[0002]

【従来の技術】近年、ICカードは、定期券、テレホン
カード、およびキャッシュカードなどに利用され、メモ
リカードは、パーソナルコンピュータ(PC)、デジタ
ルカメラ、および音楽プレイヤーの記憶媒体などに利用
されるなど、双方とも多方面で利用されている。
2. Description of the Related Art In recent years, IC cards have been used for commuter passes, telephone cards, cash cards, etc., and memory cards have been used for personal computers (PC), digital cameras, storage media for music players, etc. , Both are used in many ways.

【0003】メモリカードは、デジタルカメラや音楽プ
レイヤーなどの内蔵記憶領域を補うことと、可搬性を目
的として利用されている。例えば、デジタルカメラで撮
影した画像の電子データを、装着されたメモリカードに
納め、このメモリカードをPCに装着することで、PC
上で画像を閲覧することが可能になる。
A memory card is used for the purpose of supplementing a built-in storage area of a digital camera, a music player and the like and for portability. For example, by storing electronic data of an image taken by a digital camera in a mounted memory card and mounting this memory card in a PC,
You will be able to view the image above.

【0004】一方、図27に示すように、メモリとCP
Uとを内蔵するICカード20は、データの書き込み・
読み出しが可能な、ICメモリから成る記憶手段22
と、記憶手段22とインタフェース(I/F)23を介
して接続され、記憶手段22へのデータの書き込み・読
み出しを制御する、CPUから成るカード内処理系21
とを備えている。カード内処理系21は、記憶手段22
のファイル管理を担っている。また、端末10は、IC
カード20にデータを書き込んだり、ICカード20か
らデータを読み出したりする際に、互いの通信手段1
1、24を介してカード内処理系21に書き込みまたは
読み出しの要求を送り、カード内処理系21を通じて、
記憶手段22にデータを書き込み、または、記憶手段2
2からデータを読み出す。
On the other hand, as shown in FIG. 27, memory and CP
The IC card 20 containing U and
Readable storage means 22 including an IC memory
And a storage means 22 via an interface (I / F) 23 and controls the writing / reading of data to / from the storage means 22.
It has and. The card processing system 21 includes a storage unit 22.
Is responsible for file management. In addition, the terminal 10 is an IC
When writing data to the card 20 or reading data from the IC card 20, mutual communication means 1
A request for writing or reading is sent to the in-card processing system 21 via 1, 24, and through the in-card processing system 21,
Writing data to the storage means 22 or the storage means 2
Read data from 2.

【0005】このとき、カード内処理系21は、その端
末10が記憶手段22に記憶されたデータの処理資格を
持つ正当な端末であることを認証した上で、端末10か
らの書き込み要求や読み出し要求に応じる。そのため、
そのカードが例えばキャッシュカードである場合には、
銀行端末以外は、そのカードに記憶されたデータへのア
クセスが拒否され、カードに記憶されたデータのセキュ
リティが保持される。
At this time, the in-card processing system 21 authenticates that the terminal 10 is a legitimate terminal that is qualified to process the data stored in the storage means 22, and then makes a write request or read from the terminal 10. On request. for that reason,
If the card is a cash card, for example,
Access to the data stored in the card is denied except for the bank terminal, and the security of the data stored in the card is maintained.

【0006】このように、端末を認証することにより、
記憶されたデータのセキュリティを保持するICカード
が利用される一方で、最近、ユーザが何枚ものカードを
持たなくても良いように、一枚で多目的に使用できる、
ICカード機能を含んだ多機能なメモリカードの開発が
進められている。
By authenticating the terminal in this way,
While IC cards that retain the security of stored data are used, recently, one card can be used for multiple purposes so that the user does not have to have many cards.
Development of a multifunctional memory card including an IC card function is in progress.

【0007】このカード(以下、“セキュアカード”と
呼ぶ)は、図28に示すように、記憶手段32と、記憶
手段32とインタフェース(I/F)33を介して接続
され、記憶手段32へのデータの書き込み・読み出しを
制御するカード内処理系31とを備えているが、記憶手
段32に対しては、インタフェース(I/F)34を介
して端末10が直接アクセスすることも可能である。
As shown in FIG. 28, this card (hereinafter referred to as “secure card”) is connected to the storage means 32 and the storage means 32 via an interface (I / F) 33, and is connected to the storage means 32. In-card processing system 31 for controlling writing / reading of the data is provided, but terminal 10 can directly access storage means 32 through interface (I / F) 34.

【0008】端末10がセキュアカード30の記憶手段
32に対して直接アクセスする場合、上述したICカー
ド20とは異なり認証を伴わないため、どの端末10で
も、データの読み出しが可能である。これはカードの多
目的化に沿うものであるが、データのセキュリティは保
持できない。そのため、秘匿性を要するデータについて
は、直接アクセスができないようにする仕組みが必要と
なる。
When the terminal 10 directly accesses the storage means 32 of the secure card 30, unlike the IC card 20 described above, authentication is not involved, so that any terminal 10 can read data. This is in line with the versatility of cards, but the security of data cannot be maintained. Therefore, it is necessary to have a mechanism to prevent direct access to confidential data.

【0009】この仕組みとして、カード内処理系31が
秘匿性の高いデータのファイルを管理し、そのファイル
管理情報を一切端末10には公表せず、そのファイルの
データの書き込み・読み出しは、カード内処理系31か
ら認証を受けた端末10のみがカード内処理系31を経
由して行う一方、秘匿性の高くないデータのファイルに
関するファイル管理情報は端末10に公表し、そのファ
イルの書き込み・読み出しは直接端末10が行う方式が
考えられている。
As a mechanism for this, the in-card processing system 31 manages a file of highly confidential data, does not disclose the file management information to the terminal 10, and the writing / reading of the data of the file is performed in the card. Only the terminal 10 authenticated by the processing system 31 performs the processing via the in-card processing system 31, while the file management information regarding the file of the data with low confidentiality is disclosed to the terminal 10, and the writing / reading of the file is performed. A method in which the terminal 10 directly performs is considered.

【0010】このような方式を採用したセキュアカード
の利用範囲は多岐に及ぶ。すなわち、PC、デジタルカ
メラ、オーディオ/ビデオプレイヤーなどのメモリカー
ド、銀行端末で使用する電子通帳やキャッシュカード、
店舗の端末で使用するクレジットカードやデビッドカー
ド、あるいは電子マネーの決済/電子領収書受取保存/
使用履歴記録用のカードなどに適用できる。また、音楽
配信のコンテンツを蓄積するとともに、その料金をカー
ド内のクレジット/デビッドなどの決済機能で支払うこ
とが可能である。
The secure card adopting such a method has various uses. That is, memory cards such as PCs, digital cameras, audio / video players, electronic passbooks and cash cards used in bank terminals,
Settlement of credit cards, debit cards, or electronic money used at store terminals / receipt of electronic receipts / storage /
It can be applied to cards for recording usage history. Further, it is possible to store the content of music distribution and pay the fee by a payment function such as credit / david in the card.

【0011】上記の利用範囲のうち、例えばPCやデジ
タルカメラでメモリカードとしてセキュアカードを利用
するような場合には、わざわざ利用者の識別を行うこと
は、利便性を損なう。そのため、こうした利用に際して
は、利用者識別などの認証を行うこと無く、端末10が
カードの記憶手段32に直接アクセスすることが許容さ
れる。
When a secure card is used as a memory card in, for example, a PC or a digital camera within the above range of use, it is not convenient to identify the user. Therefore, in such use, the terminal 10 is allowed to directly access the memory means 32 of the card without performing authentication such as user identification.

【0012】一方、ある店舗で受領した電子領収書が他
の店舗で自由に参照されたり、電子通帳の内容が店舗の
端末で読まれたりすることは、プライバシー保護の観点
から問題がある。そのため、電子領収書データは、所有
者または発行店のみが参照できるように、また、電子通
帳は銀行端末のみがアクセスできるように、セキュアカ
ード30のカード内処理系31によりファイル管理され
る。
On the other hand, it is problematic from the viewpoint of privacy protection that the electronic receipt received at one store is freely referred to at another store, or the contents of the electronic passbook are read by the terminal of the store. Therefore, the electronic receipt data is file-managed by the in-card processing system 31 of the secure card 30 so that only the owner or the issuing store can refer to it and the electronic passbook can be accessed only by the bank terminal.

【0013】また、音楽配信の例では、暗号化コンテン
ツを復号化するための復号鍵は、不正に取り出されない
ように、カード内処理系31を経由して記憶手段32に
格納され、一方、暗号化されたコンテンツ本体は、復号
鍵がないと意味を持たないため、記憶手段32への直接
アクセスで保存される。
In the example of music distribution, the decryption key for decrypting the encrypted content is stored in the storage means 32 via the in-card processing system 31 so as not to be illegally taken out, while The encrypted content body has no meaning without a decryption key, and is stored by direct access to the storage means 32.

【0014】図29は、セキュアカード30の記憶手段
32に端末10が直接アクセスして行うデータ書き込み
と、セキュアカード30のカード内処理系31が行うデ
ータ書き込みとを模式的に示している。なお、ファイル
を管理するシステムには、FAT(File Allocation Ta
ble)を使用するFATファイルシステムや、NTFS
(Windows(登録商標) NT File System)、UFS(Un
ix(登録商標) FileSystem)などが知られているが、
ここでは、FATを使用してファイルを管理する場合に
ついて説明する。
FIG. 29 schematically shows data writing performed by the terminal 10 directly accessing the storage means 32 of the secure card 30 and data writing performed by the in-card processing system 31 of the secure card 30. In addition, the system that manages the file is FAT (File Allocation Ta
ble) using FAT file system and NTFS
(Windows (registered trademark) NT File System), UFS (Un
ix (registered trademark) FileSystem) is known,
Here, a case where files are managed using FAT will be described.

【0015】図29において、セキュアカード30は、
ファイルを管理するためのディレクトリエントリ及びF
AT33がファイル管理情報として記録された記憶手段
32と、カード内処理系31とを具備し、端末10は、
記憶手段32への直接アクセスを制御する端末処理系1
1と、データを一時記憶する端末キャッシュメモリ12
とを具備している。
In FIG. 29, the secure card 30 is
Directory entry for managing files and F
The terminal 10 includes a storage unit 32 in which the AT 33 is recorded as file management information and an in-card processing system 31.
Terminal processing system 1 for controlling direct access to the storage means 32
1 and a terminal cache memory 12 for temporarily storing data
It has and.

【0016】セキュアカード30が端末10に装着さ
れ、端末10からセキュアカード30へのアクセスが開
始されると、まず、記憶手段32に記録されているディ
レクトリエントリ及びFAT33が端末キャッシュメモ
リ12に読み出される(41)。読み出されたディレク
トリエントリ及びFATを、図29では、FAT13と
する。端末処理系11は、セキュアカード30の記憶手
段32にデータ(DAT2)を書き込む場合、FAT1
3にDAT2のファイル管理情報を追加し(42)、同
時にキャッシュメモリ12にDAT2を書き込む(4
3)。キャッシュメモリ12は、時期を見て、FAT3
3をFAT13で上書きし(44)、同時に、FAT1
3に記述されたファイル管理情報に従ってDAT2を記
憶手段32に格納する(45)。
When the secure card 30 is attached to the terminal 10 and the access to the secure card 30 is started from the terminal 10, first, the directory entry and the FAT 33 recorded in the storage means 32 are read into the terminal cache memory 12. (41). The read directory entry and FAT are set to FAT13 in FIG. When the terminal processing system 11 writes the data (DAT2) in the storage means 32 of the secure card 30, the FAT1
The file management information of DAT2 is added to 3 (42), and DAT2 is simultaneously written to the cache memory 12 (4).
3). The cache memory 12 looks at the time, and FAT3
3 is overwritten with FAT13 (44), and at the same time, FAT1
The DAT 2 is stored in the storage means 32 according to the file management information described in 3 (45).

【0017】一方、セキュアカード30のカード内処理
系31は、セキュアカード30の記憶手段32にデータ
(DAT1)を書き込む場合、自らファイルを管理する
ためのディレクトリエントリ及びFAT34にDAT1
のファイル管理情報を追加し(46)、同時にFAT3
4に記述したファイル管理情報に従ってDAT1を記憶
手段32に格納する(47)。
On the other hand, the in-card processing system 31 of the secure card 30 writes the data (DAT1) in the storage means 32 of the secure card 30, the directory entry for managing the file by itself and the DAT1 in the FAT 34.
File management information is added (46) and at the same time FAT3
DAT1 is stored in the storage means 32 according to the file management information described in No. 4 (47).

【0018】前述した音楽配信の例では、カード内処理
系31による復号鍵(DAT1に対応)の記憶手段32
への格納と、端末処理系11による暗号化されたコンテ
ンツ本体(DAT2に対応)の記憶手段32への格納と
がほぼ同時に行われる可能性がある。
In the above-mentioned music distribution example, the storage means 32 of the decryption key (corresponding to DAT1) by the in-card processing system 31.
There is a possibility that the storage of the encrypted content body (corresponding to DAT 2) in the storage means 32 by the terminal processing system 11 and the storage means 32 may be performed substantially at the same time.

【0019】なお、カード内処理系31は、図30に示
すように、自らファイルを管理するためのディレクトリ
エントリ及びFATを、記憶手段32の中に拡張(Exte
nsion)ファイル管理情報であるEXT−ディレクトリ
エントリ及びEXT−FAT35として格納することも
可能である。
As shown in FIG. 30, the in-card processing system 31 expands the directory entry and FAT for managing files by itself into the storage means 32 (Exte
It is also possible to store it as EXT-directory entry and EXT-FAT 35 which are file management information.

【0020】[0020]

【発明が解決しようとする課題】しかし、このセキュア
カードの場合、端末処理系11が知り得る記憶手段32
のファイル管理情報(すなわち、FAT33およびFA
T13)の中には、カード内処理系31により管理され
ているファイル管理情報(すなわち、FAT34)が含
まれていないため、例えば図31に示すように、端末処
理系11は、カード内処理系31によりDAT1が格納
されている領域をDAT2の格納領域としてFAT13
で指定する虞がある。
However, in the case of this secure card, the storage means 32 that the terminal processing system 11 can know.
File management information (ie, FAT33 and FA
Since T13) does not include the file management information (that is, FAT34) managed by the in-card processing system 31, for example, as shown in FIG. The area in which DAT1 is stored by 31 is set as the storage area in DAT2 by FAT13.
May be specified in.

【0021】たとえカード内処理系31がDAT1を書
き込んだ領域に関する情報をFAT33に追加、更新し
ても、端末10は、端末キャッシュメモリ12に読み出
されているFAT13を参照するため、DAT1の書き
込み領域を端末は知ることができない。さらに、FAT
13によるFAT33の上書きにより、カード内処理系
31が更新したFAT33の内容が無効となる。
Even if the in-card processing system 31 adds or updates the information on the area in which DAT1 is written to the FAT33, the terminal 10 refers to the FAT13 read in the terminal cache memory 12, and therefore the writing of DAT1 is performed. The area cannot be known to the terminal. Furthermore, FAT
When the FAT 33 is overwritten by 13, the contents of the FAT 33 updated by the in-card processing system 31 become invalid.

【0022】この場合、端末処理系11で更新されたF
AT13のファイル管理情報に従ってDAT2が書き込
まれると、DAT1は消去されてしまうことになる。
In this case, F updated by the terminal processing system 11
When DAT2 is written according to the file management information of AT13, DAT1 will be erased.

【0023】こうした事態は、端末で管理するファイル
管理情報(FAT13)が、実際に記憶手段32に記録
されているファイルの状態と整合していない(不整合
の)ために生じる。
Such a situation occurs because the file management information (FAT13) managed by the terminal does not match (is inconsistent) with the state of the file actually recorded in the storage means 32.

【0024】このようなファイル管理情報の不整合を防
止するため、従来、記憶装置を複数のホストで共有する
SAN(Storage Area Network)では、サーバがファイ
ル管理情報を一元的に管理する方式が採られている。こ
の方式においては、共有する記憶装置にデータを格納す
る各クライアントは、サーバにファイル名やサイズを伝
えて、データ領域の確保を要求し、サーバから確保領域
が伝えられると、指定された領域にデータを格納した
後、ファイル構成情報をサーバに伝える。
In order to prevent such inconsistency in file management information, conventionally, in a SAN (Storage Area Network) in which a storage device is shared by a plurality of hosts, a method in which a server centrally manages file management information has been adopted. Has been. In this method, each client that stores data in the shared storage device sends the file name and size to the server, requests the data area to be reserved, and when the server notifies the reserved area, the specified area is stored. After storing the data, the file structure information is transmitted to the server.

【0025】しかし、この方式をセキュアカードに適用
した場合には、リムーバブルメディアであるが故に、S
ANのサーバに相当する端末が状況によって異なる。そ
のため、カード内処理系31で管理するファイル管理情
報が不特定の端末に知られることになり、データのセキ
ュリティを確保することが危うくなる。
However, when this system is applied to a secure card, it is S because it is a removable medium.
The terminal corresponding to the AN server differs depending on the situation. Therefore, the file management information managed by the in-card processing system 31 becomes known to an unspecified terminal, which makes it difficult to secure the data security.

【0026】本発明は、かかる点に鑑みてなされたもの
であり、カード内処理系で作成、格納されたファイルの
情報を端末に漏らすことなく、メモリカードに記録され
ているファイルと、端末が管理するためのファイル管理
情報との不整合を防止することができるファイル管理方
法ならびにそれを用いたメモリカードおよび端末装置を
提供することを目的とする。
The present invention has been made in view of the above points, and a file recorded on a memory card and a terminal can be stored without leaking information of the file created and stored in the in-card processing system to the terminal. An object of the present invention is to provide a file management method capable of preventing inconsistency with file management information for management, a memory card and a terminal device using the file management method.

【0027】[0027]

【課題を解決するための手段】本発明のファイル管理方
法は、第1の処理系および第2の処理系からアクセスさ
れる記憶手段を有するメモリカードにおいて使用される
ファイル管理方法であって、前記第1処理系が、前記記
憶手段の領域の確保を前記第2処理系に要求する要求ス
テップと、前記第2処理系が、前記要求ステップでの要
求を受けて前記記憶手段の領域の確保処理を実施する確
保ステップと、前記第2処理系が、前記確保ステップで
確保した領域の情報をファイル管理情報に反映する反映
ステップと、前記第1処理系が、前記確保ステップで前
記第2処理系により確保された領域へのデータの書き込
み処理を行う書込ステップと、を有し、前記第1処理系
は、前記書き込み処理によって生じるファイル管理情報
を前記第2処理系へ通知しないようにした。
A file management method of the present invention is a file management method used in a memory card having a storage means accessed from a first processing system and a second processing system. The first processing system requests the second processing system to secure an area of the storage means, and the second processing system receives the request in the request step and secures an area of the storage means. And a reflection step in which the second processing system reflects the information of the area secured in the securing step in the file management information, and the first processing system uses the second processing system in the securing step. And a writing step of writing data to the area secured by the first processing system, wherein the first processing system stores the file management information generated by the writing process in the second processing system. It was not to notify.

【0028】この方法によれば、第2処理系は、第1処
理系から記憶手段の領域確保の要求を受けて領域の確保
処理を実施し、この領域の情報をファイル管理情報に反
映し、第1処理系は、この領域にデータの書き込み処理
を行い、この結果生じるファイル管理情報を第2処理系
へ通知しないため、第1処理系のみが参照可能なデータ
を書き込む領域に第2処理系が他のデータを書き込むこ
とがないと同時に、第1処理系が書き込むデータの情報
が第2処理系に漏れることがなく、記憶手段に記録され
るデータと、ファイル管理情報との不整合を防止するこ
とができる。
According to this method, the second processing system receives an area reservation request of the storage means from the first processing system, executes the area reservation process, and reflects the information of this area in the file management information. The first processing system writes the data in this area and does not notify the second processing system of the resulting file management information. Therefore, the second processing system writes in the area where only the first processing system can refer to the data. Does not write other data, and at the same time, the information of the data written by the first processing system does not leak to the second processing system, thus preventing the mismatch between the data recorded in the storage means and the file management information. can do.

【0029】本発明のファイル管理方法は、第1の処理
系および第2の処理系からアクセスされる記憶手段を有
するメモリカードにおいて使用されるファイル管理方法
であって、前記第1処理系が、前記記憶手段の領域の確
保を前記第2処理系に要求する要求ステップと、前記第
2処理系が、前記要求ステップでの要求を受けて前記記
憶手段の領域の確保処理を実施する確保ステップと、前
記第2処理系が、前記確保ステップで確保した領域の情
報を自己のためのファイル管理情報に反映する反映ステ
ップと、前記第1処理系が、前記確保ステップで前記第
2処理系により確保された領域への自己のためのファイ
ル管理システムのデータの書込処理を行う書込ステップ
と、を有するようにした。
A file management method of the present invention is a file management method used in a memory card having a storage means accessed from the first processing system and the second processing system, wherein the first processing system comprises: A request step for requesting the second processing system to secure the area of the storage means, and a securing step for the second processing system to carry out the processing of securing the area of the storage means in response to the request in the request step. A reflecting step in which the second processing system reflects the information of the area secured in the securing step in the file management information for itself, and the first processing system secures the second processing system in the securing step. And a writing step of performing writing processing of data of the file management system for itself in the created area.

【0030】この方法によれば、第2処理系は、第1処
理系から記憶手段の領域確保の要求を受けて領域の確保
処理を実施し、この領域の情報を自己のためのファイル
管理情報に反映し、第1処理系は、この領域に自己のた
めのファイル管理システムのデータの書込処理を行うた
め、第1処理系のためのファイル管理システムのデータ
を書き込む領域に第2処理系が他のデータを書き込むこ
とがないと同時に、第1処理系のファイル管理システム
のデータが第2処理系に漏れることがなく、第1処理系
のみが参照可能なデータの秘匿性を高めることができ
る。
According to this method, the second processing system receives an area reservation request of the storage means from the first processing system and performs the area reservation process, and the information of this area is used as the file management information for itself. The first processing system writes the data of the file management system for itself in this area. Therefore, the second processing system writes the data of the file management system for the first processing system in the area. Does not write other data at the same time, the data of the file management system of the first processing system does not leak to the second processing system, and the confidentiality of the data that can be referenced only by the first processing system can be improved. it can.

【0031】本発明のファイル管理方法は、第1の処理
系および第2の処理系からアクセスされる記憶手段を有
するメモリカードにおいて使用されるファイル管理方法
であって、前記第1処理系が、前記記憶手段の領域の確
保を前記第2処理系に要求する要求ステップと、前記第
2処理系が、前記要求ステップでの要求を受けて前記記
憶手段の領域の確保処理を実施する確保ステップと、前
記第2処理系が、前記確保ステップで確保した領域の情
報を自己のためのファイル管理情報に反映する反映ステ
ップと、前記第1処理系が、前記確保ステップで前記第
2処理系により確保された領域への自己のためのファイ
ル管理システムのデータの書き込み処理を行う書込ステ
ップと、を有し、前記第1処理系は、前記書き込み処理
によって生じるファイル管理情報を前記第2処理系へ通
知しないようにした。
A file management method of the present invention is a file management method used in a memory card having a storage means accessed from a first processing system and a second processing system, wherein the first processing system comprises: A request step for requesting the second processing system to secure the area of the storage means, and a securing step for the second processing system to carry out the processing of securing the area of the storage means in response to the request in the request step. A reflecting step in which the second processing system reflects the information of the area secured in the securing step in the file management information for itself, and the first processing system secures the second processing system in the securing step. And a writing step of performing writing processing of data of the file management system for itself to the created area, wherein the first processing system is configured to perform the writing processing performed by the writing processing. Yl management information so as not to notify the second processing system.

【0032】この方法によれば、第2処理系は、第1処
理系から記憶手段の領域確保の要求を受けて領域の確保
処理を実施し、この領域の情報を自己のためのファイル
管理情報に反映し、第1処理系は、この領域に自己のた
めのファイル管理システムのデータの書き込み処理を行
い、この結果生じるファイル管理情報を第2処理系へ通
知しないため、第1処理系のみが参照可能なデータを書
き込む領域に第2処理系が他のデータを書き込むことが
ないと同時に、第1処理系が書き込むデータの情報が第
2処理系に漏れることがなく、記憶手段に記録されるデ
ータと、ファイル管理情報との不整合を防止することが
できる。
According to this method, the second processing system receives an area reservation request of the storage means from the first processing system, executes the area reservation process, and uses the information of this area as file management information for itself. The first processing system writes the data of the file management system for itself in this area and does not notify the resulting file management information to the second processing system. Therefore, only the first processing system At the same time that the second processing system does not write other data in the reference data writing area, information of the data written by the first processing system is recorded in the storage means without leaking to the second processing system. Inconsistency between data and file management information can be prevented.

【0033】本発明の端末装置は、メモリカードの記憶
手段にアクセスしてファイル管理を行う端末装置であっ
て、前記メモリカードの内部の処理系から前記記憶手段
の領域の確保の要求を受信する要求受信手段と、前記要
求受信手段によって受信された要求に基づいて前記記憶
手段の領域の確保処理を行う領域確保手段と、前記領域
確保手段によって確保された領域の情報を自己のための
ファイル管理情報に反映するファイル情報処理手段と、
前記領域確保手段によって確保された領域の情報を前記
メモリカードの内部の処理系に伝達する確保領域伝達手
段と、を有する構成を採る。
The terminal device of the present invention is a terminal device for accessing the storage means of the memory card to manage files, and receives a request for securing an area of the storage means from a processing system inside the memory card. A request receiving unit, an area reserving unit for reserving an area of the storage unit based on the request received by the request receiving unit, and a file management for the information of the area secured by the area reserving unit for itself. File information processing means to be reflected in information,
And a secured area transmitting means for transmitting information on the area secured by the area securing means to a processing system inside the memory card.

【0034】この構成によれば、メモリカード内部の処
理系から記憶手段の領域確保の要求を受けて領域を確保
し、確保された領域の情報を自己のためのファイル管理
情報に反映するとともに、メモリカード内部の処理系に
伝達するため、メモリカード内部の処理系のみが参照可
能なデータを書き込む領域に端末装置が他のデータを書
き込むことがなく、記憶手段に記録されるデータと、端
末装置のためのファイル管理情報との不整合を防止する
ことができる。
According to this structure, an area is secured in response to a request for securing the area of the storage means from the processing system inside the memory card, and the information of the secured area is reflected in the file management information for itself. Since the data is transmitted to the processing system inside the memory card, the terminal device does not write other data in the area for writing the data that can be referenced only by the processing system inside the memory card, and the data recorded in the storage means and the terminal device. It is possible to prevent inconsistency with the file management information for.

【0035】本発明のメモリカードは、メモリカード内
部の処理系と端末装置の処理系とからアクセスされる記
憶手段を有するメモリカードであって、前記メモリカー
ド内部の処理系は、前記端末装置の処理系に対してサイ
ズを指定して前記記憶手段の領域の確保を要求する領域
確保要求手段と、前記端末装置の処理系から確保領域の
通知を受信する確保領域受信手段と、前記記憶手段の前
記確保領域にデータの書き込み処理を行う書込手段と、
前記確保領域に書き込まれたデータの書き込み位置の情
報を前記メモリカード内部の処理系のみが参照可能な状
態で格納する書込位置情報格納手段と、を有する構成を
採る。
A memory card of the present invention is a memory card having a storage means accessed from a processing system inside the memory card and a processing system of the terminal device, and the processing system inside the memory card is the terminal device. The area reservation requesting means for requesting the reservation of the area of the storage means by designating a size to the processing system, the reserved area receiving means for receiving a notification of the reserved area from the processing system of the terminal device, and the storage means Writing means for writing data to the reserved area,
And a writing position information storage means for storing information on the writing position of the data written in the reserved area in a state where only the processing system inside the memory card can refer to the information.

【0036】この構成によれば、端末装置の処理系に対
してサイズを指定して記憶手段の領域確保を要求し、こ
の要求の結果確保された領域の情報を受信し、この領域
にデータを書き込み、書き込んだ位置の情報をメモリカ
ード内部の処理系のみが参照可能な状態で格納するた
め、メモリカード内部の処理系のみが参照可能なデータ
を書き込む領域の情報を端末装置の処理系のためのファ
イル管理情報に反映することができると同時に、上記の
データを書き込んだ位置の情報はメモリカード内部の処
理系のみが参照可能となり、記憶手段に記録されるデー
タと、端末装置の処理系のためのファイル管理情報との
不整合を防止するとともに、データの秘匿性を高めるこ
とができる。
According to this structure, the processing system of the terminal device is requested to secure the area of the storage means by designating the size, the information of the area secured as a result of this request is received, and the data is stored in this area. Since the information of the written and written position is stored in a state that only the processing system inside the memory card can refer to, the information of the area to which the data that can be referred to only by the processing system inside the memory card is written is for the terminal system processing system. Can be reflected in the file management information of the above, and at the same time, the information of the position where the above data is written can be referred only to the processing system inside the memory card, and the data recorded in the storage means and the processing system of the terminal device Therefore, it is possible to prevent inconsistency with the file management information for improving the confidentiality of data.

【0037】本発明のメモリカードは、メモリカード内
部の処理系と端末装置の処理系とからアクセスされる記
憶手段を有するメモリカードであって、前記メモリカー
ド内部の処理系は、前記端末装置の処理系に対してサイ
ズを指定して前記記憶手段の領域の確保を要求する領域
確保要求手段と、前記端末装置の処理系から確保領域の
通知を受信する確保領域受信手段と、前記確保領域を記
憶し、記憶した前記確保領域から書き込み領域を指定し
て残った空き領域を記憶する空き領域記憶手段と、前記
空き領域記憶手段により指定された前記書き込み領域に
データの書き込み処理を行う書込手段と、前記書き込み
領域に書き込んだデータの書き込み位置の情報を前記メ
モリカード内部の処理系のみが参照可能な状態で格納す
る書込位置情報格納手段と、を有する構成を採る。
A memory card of the present invention is a memory card having a storage means accessed from a processing system inside the memory card and a processing system of the terminal device, and the processing system inside the memory card is the terminal device. An area reservation requesting unit that requests a reservation of an area of the storage unit by designating a size to the processing system, a reservation area receiving unit that receives a notification of the reservation area from the processing system of the terminal device, and the reservation area A free area storage unit that stores a free area that is stored by designating a write area from the reserved area that has been stored, and a writing unit that writes data to the write area that is designated by the free area storage unit. And a write position information class for storing information on the write position of the data written in the write area in a state where only the processing system inside the memory card can refer to it. A configuration having a means.

【0038】この構成によれば、端末装置の処理系に対
してサイズを指定して記憶手段の領域確保を要求し、こ
の要求の結果確保された領域の情報を受信して記憶し、
記憶した確保領域から書き込み領域を指定してデータを
書き込むとともに、残った空き領域を記憶し、データを
書き込んだ位置の情報をメモリカード内部の処理系のみ
が参照可能な状態で格納するため、メモリカード内部の
処理系のみが参照可能なデータを書き込む領域の情報を
端末装置の処理系のためのファイル管理情報に反映する
ことができると同時に、上記のデータを書き込んだ位置
の情報はメモリカード内部の処理系のみが参照可能とな
り、記憶手段に記録されるデータと、端末装置の処理系
のためのファイル管理情報との不整合を防止するととも
に、データの秘匿性を高めることができる。
According to this structure, the processing system of the terminal device is requested to secure the area of the storage means by designating the size, and the information of the area secured as a result of this request is received and stored.
The data is written by specifying the write area from the stored reserved area, the remaining free area is stored, and the information of the position where the data was written is stored in a state where only the processing system inside the memory card can refer to it. Information in the area where data that can be referenced only by the processing system inside the card is written can be reflected in the file management information for the processing system of the terminal device, and at the same time, the information at the location where the above data is written is stored in the memory card Only this processing system can be referred to, and it is possible to prevent inconsistency between the data recorded in the storage means and the file management information for the processing system of the terminal device, and to enhance the confidentiality of the data.

【0039】[0039]

【発明の実施の形態】以下、本発明の実施形態につい
て、図面を参照して詳細に説明する。
BEST MODE FOR CARRYING OUT THE INVENTION Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.

【0040】(第1の実施形態)図1は、本発明の第1
の実施形態に係るセキュアカードおよび端末装置の構成
を示すブロック図である。
(First Embodiment) FIG. 1 shows a first embodiment of the present invention.
3 is a block diagram showing the configurations of a secure card and a terminal device according to the embodiment of FIG.

【0041】本発明の第1の実施形態に係るセキュアカ
ードは、図1に示すように、カードに搭載されたアプリ
ケーションプログラムにより実現されるカード内処理系
100と、フラッシュメモリ200(記憶手段)とを有
する。カード内処理系100は、端末装置との通信手段
110と、データを処理するデータ処理手段120と、
データのサイズを端末に通知して、フラッシュメモリ2
00の使用領域の確保および解放などの変更を要求する
領域変更要求手段130と、端末装置から確保領域の情
報を受信する確保領域情報受信手段140と、フラッシ
ュメモリ200へのカード専用ファイルの実データ21
0の書き込み/削除及びカード専用ファイル管理情報2
20の書き込みを行う書き込み/消去手段150と、カ
ード専用ファイル管理情報220を書き込んだフラッシ
ュメモリ200の格納位置情報を保持する管理情報検索
手段160とを具備する。フラッシュメモリ200に
は、いずれの端末も参照可能なファイル管理情報230
とそのファイルの実データ、及び、カード内処理系10
0だけが参照できるカード専用ファイルの実データ21
0と、カード専用ファイルのファイル管理情報220と
が格納される。ここで、「カード専用ファイルのファイ
ル管理情報」とは、カード内処理系100のためのファ
イル管理情報であり、カード処理系100が読み込んだ
り書き込んだりするファイルの情報を格納したものであ
る。本明細書においては、「ある処理系のためのファイ
ル管理情報」とは、ファイル管理情報そのものを書き換
える処理系やファイル管理情報が格納される位置には依
存せず、当該ファイル管理情報が管理するファイルを読
み込んだり書き込んだりする処理系のためのファイル管
理情報を意味する。
As shown in FIG. 1, the secure card according to the first embodiment of the present invention includes an in-card processing system 100 implemented by an application program installed in the card, a flash memory 200 (storage means), and Have. The in-card processing system 100 includes a communication means 110 for communicating with a terminal device, a data processing means 120 for processing data,
Notify the terminal of the size of data, and flash memory 2
Area change requesting means 130 for requesting a change such as reservation and release of the used area of 00, reserved area information receiving means 140 for receiving information on the reserved area from the terminal device, and actual data of the card dedicated file to the flash memory 200. 21
Write / delete 0 and file management information for card 2
20 includes a writing / erasing means 150 for writing 20 and a management information retrieving means 160 for holding storage location information of the flash memory 200 in which the card dedicated file management information 220 is written. The flash memory 200 has file management information 230 that can be referenced by any terminal.
And the actual data of the file, and the card processing system 10
The actual data 21 of the card dedicated file that only 0 can refer to
0 and file management information 220 of a card-dedicated file are stored. Here, the "file management information of the card-dedicated file" is file management information for the in-card processing system 100, and stores information of files that the card processing system 100 reads and writes. In this specification, “file management information for a certain processing system” does not depend on the processing system that rewrites the file management information itself or the position where the file management information is stored, and is managed by the file management information. It means file management information for the processing system that reads and writes files.

【0042】なお、カード専用ファイル管理情報220
と、それを書き込む書き込み/消去手段150と、カー
ド専用ファイル管理情報220の格納位置情報を保持す
る管理情報検索手段160とは、確保領域に書き込んだ
データ210の書き込み位置をカード内処理系100の
みが参照可能な状態に保持する「書込位置情報格納手
段」を構成している。また、カード内処理系100だけ
が参照できるカード専用ファイルの実データ210と、
カード専用ファイルのファイル管理情報220とは、カ
ード内処理系100の「ファイル管理システム」を構成
している。
The card-specific file management information 220
The writing / erasing means 150 for writing the same and the management information searching means 160 for holding the storage position information of the card dedicated file management information 220 make the writing position of the data 210 written in the reserved area only in the in-card processing system 100. Constitutes a "writing position information storage means" for holding the same in a state where it can be referred to. In addition, the actual data 210 of the card-dedicated file that can be referenced only by the in-card processing system 100
The file management information 220 of the file dedicated to the card constitutes the “file management system” of the in-card processing system 100.

【0043】また、本実施形態における端末装置は、図
1に示すように、端末処理系300とキャッシュメモリ
400とを有する。端末処理系300は、カード内処理
系100との通信手段310と、データを処理するデー
タ処理手段320と、キャッシュメモリ400に保持さ
れる端末処理系300のためのファイル管理情報の更新
処理を行うファイル情報処理手段330と、カード内処
理系100から領域確保要求を受信する領域変更要求受
信手段340と、端末処理系300のためのファイル管
理情報を参照してフラッシュメモリ200の空き領域を
確保する領域確保手段350と、カード内処理系100
のために確保した領域の架空ファイル情報を生成する架
空ファイル情報生成手段360と、確保した領域をカー
ド内処理系100に伝達する確保領域通知手段370と
を備えている。また、キャッシュメモリ400は、フラ
ッシュメモリ200から読み出した端末処理系300の
ためのファイル管理情報230を保持するファイル情報
保持手段410と、更新されたファイル管理情報をフラ
ッシュメモリ200に書き込むファイル情報書き込み手
段420とを備えている。
The terminal device in this embodiment has a terminal processing system 300 and a cache memory 400, as shown in FIG. The terminal processing system 300 performs communication means 310 with the in-card processing system 100, data processing means 320 for processing data, and update processing of file management information for the terminal processing system 300 held in the cache memory 400. The file information processing unit 330, the area change request receiving unit 340 that receives an area reservation request from the in-card processing system 100, and the file management information for the terminal processing system 300 are referred to to reserve an empty area of the flash memory 200. Area securing means 350 and in-card processing system 100
A fictitious file information generating means 360 for generating fictitious file information of the reserved area and a reserved area notifying means 370 for transmitting the reserved area to the in-card processing system 100. Further, the cache memory 400 has a file information holding unit 410 that holds the file management information 230 for the terminal processing system 300 read from the flash memory 200, and a file information writing unit that writes the updated file management information to the flash memory 200. And 420.

【0044】本実施形態のようにファイルを管理するシ
ステムには、上述のように、FAT(File Allocation
Table)を使用するFATファイルシステム、NTFS
(Windows(登録商標) NT File System)、およびUF
S(Unix(登録商標) File System)などが知られてい
るが、ここでは、FATを使用してファイルを管理する
場合を例にとって説明する。
As described above, the system for managing files as in the present embodiment uses FAT (File Allocation).
Table) FAT file system, NTFS
(Windows (registered trademark) NT File System) and UF
Although S (Unix (registered trademark) File System) and the like are known, here, a case where a file is managed using FAT will be described as an example.

【0045】ここで、FATの概要について説明してお
く。
Here, the outline of FAT will be described.

【0046】フラッシュメモリ200に格納されるデー
タは、図2に示すように、クラスタ単位で記録され、1
つのクラスタに収まりきらない大きさのファイルのデー
タは、複数のクラスタに分けて保存される。なお、図中
の矢印はデータを記録したクラスタの順序(連結情報)
を示している。このクラスタの使用状況はファイル管理
情報(“メタ情報”とも云う)としてメモリに記録され
る。
The data stored in the flash memory 200 is recorded in cluster units as shown in FIG.
The data of a file that does not fit in one cluster is stored in multiple clusters. The arrows in the figure indicate the order of the clusters that recorded the data (connection information).
Is shown. The usage status of the cluster is recorded in the memory as file management information (also referred to as "meta information").

【0047】FATは、クラスタの使用状況を管理する
テーブルである。図3(A)にはFATの一部を示し、
図3(B)には、FATとともにファイル管理情報を構
成するディレクトリエントリを示している。ディレクト
リエントリには、ファイル名、サイズ、先頭クラスタ等
の情報が含まれる。FATは、記憶領域に含まれるクラ
スタ数分の記述枠を持ち(図中、上段は通し番号、下段
は記述枠、通し番号は実際のテーブルには含まれな
い)、この枠に連結情報(現クラスタの次のクラスタ番
号)が記述される。図3(A)では、クラスタ32〜1
43を示している。各枠の位置から、実データが記述さ
れたクラスタの位置が特定できる。ファイルを参照する
ときは、ファイル名よりディレクトリエントリを検索し
て先頭クラスタを取得し、FATを参照して、先頭クラ
スタから順に連結を追う。−1はファイルの終了を表し
ている。また、ファイルを書き込むときは、ディレクト
リエントリにファイル名、サイズ、先頭クラスタなどを
登録し、FATに連結情報を登録し、FATに登録され
た連結情報に基づいて、該当するクラスタにデータ実体
を書き込んでいく。図1において、端末処理系300の
ためのファイル管理情報230およびカード専用ファイ
ル管理情報220は、上述のようなFATとディレクト
リエントリとから成るものとする。また、フラッシュメ
モリ200に記録されたファイル管理情報230は、ど
の端末装置でも読み出すことができる。端末装置は、こ
れを読み書きすることで、ファイルの管理を行う。
The FAT is a table for managing the usage status of the cluster. Part of FAT is shown in FIG.
FIG. 3B shows a directory entry that constitutes file management information together with the FAT. The directory entry includes information such as file name, size, and first cluster. The FAT has as many description frames as the number of clusters included in the storage area (in the figure, the upper row is a serial number, the lower row is a description frame, and the serial numbers are not included in the actual table). The next cluster number) is described. In FIG. 3A, the clusters 32 to 1
43 is shown. The position of the cluster in which the actual data is described can be specified from the position of each frame. When referring to a file, a directory entry is searched for from the file name to obtain the first cluster, and the FAT is referred to, and the connection is sequentially traced from the first cluster. -1 represents the end of the file. When writing a file, the file name, size, first cluster, etc. are registered in the directory entry, the concatenation information is registered in the FAT, and the data entity is written in the corresponding cluster based on the concatenation information registered in the FAT. Go out. In FIG. 1, the file management information 230 and the card-dedicated file management information 220 for the terminal processing system 300 are composed of the FAT and the directory entry as described above. Further, the file management information 230 recorded in the flash memory 200 can be read by any terminal device. The terminal device manages the file by reading and writing this.

【0048】カード内処理系100は、フラッシュメモ
リ200にデータを新規に書き込んだり、追記したり、
データを削除したりする場合に、そのデータのサイズを
端末装置に伝えて、データ格納領域の変更を要求する。
The in-card processing system 100 newly writes or additionally writes data in the flash memory 200.
When deleting data, the size of the data is transmitted to the terminal device, and the change of the data storage area is requested.

【0049】カード内処理系100からデータ格納領域
の確保要求が出された場合には、端末装置は、自己のた
めのファイル管理情報230上でデータ格納領域を確保
し、そのデータ格納領域に関するファイル管理情報とし
て、クラスタの連結情報を架空に設定した架空ファイル
情報を生成し、その架空ファイル情報を用いてファイル
管理情報230を更新する。そのため、各端末装置は、
そのファイル管理情報230を読み出した場合に、その
データ格納領域が使用済みであることを知ることはでき
るが、ファイルのデータ実体の正確な情報を知ることは
できない。
When a request for securing a data storage area is issued from the in-card processing system 100, the terminal device secures the data storage area on the file management information 230 for itself and the file related to the data storage area is allocated. As the management information, fictitious file information in which the cluster connection information is set to fictitious is generated, and the file management information 230 is updated using the fictitious file information. Therefore, each terminal device
When the file management information 230 is read, it is possible to know that the data storage area has been used, but it is not possible to know the exact information of the data entity of the file.

【0050】一方、カード内処理系100は、確保され
たデータ格納領域の通知を端末処理系300から受ける
と、その領域のクラスタにカード専用ファイルの実デー
タ210を書き込み、そのカード専用ファイルのファイ
ル管理情報220をフラッシュメモリ200に書き込
む。なお、カード専用ファイル管理情報220が書き込
まれているフラッシュメモリ200の領域を表す位置情
報は管理情報検索手段160に保持されており、この管
理情報検索手段160を参照してカード専用ファイル管
理情報220の書き込みが行われる。
On the other hand, upon receiving the notification of the secured data storage area from the terminal processing system 300, the in-card processing system 100 writes the actual data 210 of the card-dedicated file in the cluster of that area, and writes the file of the card-dedicated file. The management information 220 is written in the flash memory 200. The position information indicating the area of the flash memory 200 in which the card dedicated file management information 220 is written is held in the management information searching unit 160, and the card dedicated file management information 220 is referred to by referring to the management information searching unit 160. Is written.

【0051】カード専用ファイル管理情報220は、端
末装置には一切知らせない。そのため、このカード専用
ファイル管理情報220で管理される実データのセキュ
リティは保全される。
The card dedicated file management information 220 does not inform the terminal device at all. Therefore, the security of the actual data managed by this card-dedicated file management information 220 is maintained.

【0052】次いで、カード内処理系100が、端末処
理系300にデータ格納領域の確保を要求する場合の処
理手順を説明する。なお、フラッシュメモリ200のフ
ァイル管理情報230は、あらかじめ端末装置によって
読み出され、キャッシュメモリ400のファイル情報保
持手段410によって保持されているものとする。
Next, a processing procedure when the in-card processing system 100 requests the terminal processing system 300 to secure a data storage area will be described. Note that the file management information 230 of the flash memory 200 is read by the terminal device in advance and is held by the file information holding unit 410 of the cache memory 400.

【0053】まず、カード内処理系100の領域変更要
求手段130は、書き込み/消去手段150が書き込む
データのサイズ情報を含む利用領域変更要求を、通信手
段110を介して端末処理系300に送信する(1)。
端末処理系300の領域変更要求受信手段340は、受
信した利用領域変更要求をファイル情報処理手段330
に伝え、ファイル情報処理手段330は、ファイル情報
保持手段410に保持された端末処理系300のための
ファイル管理情報を参照し(2)、フラッシュメモリ2
00の空き領域を検索する。空き領域が無い場合には、
カード内処理系100にエラーを返信する。
First, the area change request means 130 of the in-card processing system 100 sends a use area change request including the size information of the data written by the writing / erasing means 150 to the terminal processing system 300 via the communication means 110. (1).
The area change request receiving means 340 of the terminal processing system 300 sends the received use area change request to the file information processing means 330.
The file information processing means 330 refers to the file management information for the terminal processing system 300 held in the file information holding means 410 (2), and the flash memory 2
00 free area is searched. If there is no free space,
An error is returned to the in-card processing system 100.

【0054】空き領域が有る場合には、領域確保手段3
50が、端末処理系300のためのファイル管理情報の
中に、利用領域変更要求に含まれたサイズの領域を確保
し(3)、架空ファイル情報生成手段360が、その領
域を利用しているものとするための架空ファイルの管理
情報を生成し(4)、ファイル情報処理手段330は、
この架空ファイル情報を、ファイル情報保持手段410
によって保持されている端末処理系300のためのファ
イル管理情報のディレクトリエントリ及びFATに追加
する(5)。
If there is a free area, area securing means 3
50 secures an area of the size included in the usage area change request in the file management information for the terminal processing system 300 (3), and the fictitious file information generation means 360 uses the area. To generate the fictitious file management information (4), and the file information processing means 330
This fictitious file information is stored in the file information holding means 410.
(5) is added to the directory entry and FAT of the file management information for the terminal processing system 300 held by.

【0055】この場合、ディレクトリエントリのファイ
ル名情報はランダムでも規則的(端末識別子+番号な
ど)でも良い。また、FATの連結情報はランダムでも
シーケンシャルでも良い。
In this case, the file name information of the directory entry may be random or regular (terminal identifier + number etc.). Further, the FAT connection information may be random or sequential.

【0056】更新されたファイル管理情報は、ファイル
情報書き込み手段420により、フラッシュメモリ20
0に上書きされる(6)。なお、このファイル管理情報
の上書きについては、端末の処理方法に依存するため、
このタイミングで発生するとは限らない。
The updated file management information is stored in the flash memory 20 by the file information writing means 420.
It is overwritten with 0 (6). Note that this file management information overwrite depends on the terminal processing method, so
It does not always occur at this timing.

【0057】また、ファイル情報処理手段330は、確
保領域通知手段370を通じて、確保した領域をカード
内処理系100に通知する(7)。
Further, the file information processing means 330 notifies the in-card processing system 100 of the reserved area through the reserved area notifying means 370 (7).

【0058】カード内処理系100の確保領域情報受信
手段140は、端末処理系300から確保領域情報を受
信し、書き込み/消去手段150に通知する。書き込み
/消去手段150は、確保領域情報に従って実データ2
10をフラッシュメモリ200に書き込む(8)。同時
に、管理情報検索手段160に保持されている格納位置
情報を参照してカード専用ファイル管理情報220の記
録位置を知り(9)、カード専用ファイル管理情報22
0に実データ210のファイル管理情報を記録する(1
0)。
The reserved area information receiving means 140 of the in-card processing system 100 receives the reserved area information from the terminal processing system 300 and notifies the writing / erasing means 150. The writing / erasing means 150 uses the real data 2 according to the reserved area information.
10 is written in the flash memory 200 (8). At the same time, the recording position of the card dedicated file management information 220 is known by referring to the storage position information held in the management information retrieval means 160 (9), and the card dedicated file management information 22 is acquired.
The file management information of the actual data 210 is recorded in 0 (1
0).

【0059】カード専用ファイル管理情報220での情
報の持ち方は、管理する実データが後から正常に読み出
せる状態であればどのような形態でも良いが、本明細書
では、FATと同様のフォーマットで保持する場合につ
いて示している。
The card-dedicated file management information 220 may be held in any form as long as actual data to be managed can be normally read later. In this specification, the same format as FAT is used. In the case of holding in.

【0060】次いで、カード内処理系100が、端末処
理系300にデータ格納領域の解放を要求する場合(す
なわち、データが削除される場合)の処理手順を説明す
る。カード内処理系100では、書き込み/消去手段1
50が、実データの消去を行い、カード専用ファイル管
理情報220を修正する。領域変更要求手段130は、
実データ削除領域、つまり、解放位置を指定した領域変
更(解放)要求を端末装置に送信する。解放位置は、解
放領域の先頭アドレスとサイズとで指定する。あるい
は、全アドレスで指定しても良い。
Next, a processing procedure when the card processing system 100 requests the terminal processing system 300 to release the data storage area (that is, when data is deleted) will be described. In the card processing system 100, the writing / erasing means 1
50 erases the actual data and modifies the card dedicated file management information 220. The area change requesting means 130
An actual data deletion area, that is, an area change (release) request specifying the release position is transmitted to the terminal device. The release position is specified by the start address and size of the release area. Alternatively, all addresses may be designated.

【0061】端末処理系300では、この利用領域変更
要求を受信すると、ファイル情報処理手段330が、フ
ァイル情報保持手段410に保持された端末処理系30
0のためのファイル管理情報を参照して、解放を要求さ
れた領域を使用しているファイルを検索し、該当するフ
ァイルのファイル管理情報を修正する。
In the terminal processing system 300, when the usage area change request is received, the file information processing means 330 causes the terminal processing system 30 held in the file information holding means 410.
By referring to the file management information for 0, a file using the area requested to be released is searched, and the file management information of the corresponding file is corrected.

【0062】このとき、図4に示すように、架空ファイ
ルの削除領域をファイル管理情報の連結情報から外す処
理を行う。この処理により、架空ファイル全体が消える
場合には、架空ファイルのファイル管理情報を端末処理
系300のためのファイル管理情報から削除する。
At this time, as shown in FIG. 4, a process of removing the deletion area of the fictitious file from the connection information of the file management information is performed. When the entire fictitious file disappears by this process, the file management information of the fictitious file is deleted from the file management information for the terminal processing system 300.

【0063】次に、カード内処理系100が、端末処理
系300にデータ格納領域を確保する処理の詳細につい
て具体例を2つ挙げて説明する。
Next, the details of the process in which the in-card processing system 100 secures the data storage area in the terminal processing system 300 will be described with two specific examples.

【0064】図5は、カード内処理系100が、端末処
理系300にデータ格納領域の確保を要求する場合の処
理を模式的に示している。ここでは、カード内処理系1
00によりカードのフラッシュメモリ200(記憶手
段)に書き込まれたデータの管理を拡張ファイル管理情
報であるEXT−FATで行う場合を示している。この
EXT−FAT自体も、フラッシュメモリ200に書き
込まれ、端末装置による直接アクセスを抑止する必要が
ある。そのため、EXT−FATの領域を架空ファイル
化して、端末処理系300のためのファイル管理情報の
中に含める処理が必要になる。
FIG. 5 schematically shows the processing when the in-card processing system 100 requests the terminal processing system 300 to secure a data storage area. Here, the card processing system 1
00, the data written in the flash memory 200 (storage means) of the card is managed by the EXT-FAT which is the extended file management information. This EXT-FAT itself is also written in the flash memory 200, and it is necessary to suppress direct access by the terminal device. Therefore, it is necessary to process the EXT-FAT area into a fictitious file and include it in the file management information for the terminal processing system 300.

【0065】図5は、端末処理系300のためのファイ
ル管理情報の中に、EXT−FAT領域を確保するため
の処理について模式的に示している。
FIG. 5 schematically shows the processing for securing the EXT-FAT area in the file management information for the terminal processing system 300.

【0066】まず、フラッシュメモリ200に格納され
ているFAT’(ファイル管理情報230に対応)をキ
ャッシュメモリ400にFAT”として読み出す
(1)。カード内処理系のアプリケーション(C−Ap
p)は、EXT−FATのサイズを端末処理系300に
通知する(2)。端末処理系300は、領域確保処理を
行い、架空ファイル(以下、“DMY”という)として
EXT−FATサイズ分のファイル管理情報を作成して
(3)、FAT”にDMYの情報を追加する(4)。端
末処理系300は、カード内処理系100に確保領域を
通知する(5)。カード内処理系100のC−App
は、通知された領域情報に従ってEXT−FATを作成
し(6)、EXT−FATの格納位置をカード内処理系
100で保持する(7)。
First, FAT '(corresponding to the file management information 230) stored in the flash memory 200 is read as FAT "in the cache memory 400 (1). Application in card processing system (C-Ap)
p) notifies the terminal processing system 300 of the size of the EXT-FAT (2). The terminal processing system 300 performs area reservation processing, creates file management information of EXT-FAT size as a fictitious file (hereinafter referred to as "DMY") (3), and adds DMY information to FAT "( 4) The terminal processing system 300 notifies the in-card processing system 100 of the reserved area (5) C-App of the in-card processing system 100.
Creates an EXT-FAT according to the notified area information (6), and holds the storage position of the EXT-FAT in the in-card processing system 100 (7).

【0067】このEXT−FATは、端末装置にはキャ
ッシュメモリ400におけるファイル管理情報FAT”
によってDMYに見える。また、端末装置によるEXT
−FATの実データへのアクセスは、例えば各ファイル
/ブロックごとに設定されている読み出し不可・書き込
み不可などのアクセス制御を示す情報(アクセス制御情
報)により拒否される。
This EXT-FAT is the file management information FAT ″ in the cache memory 400 for the terminal device.
Looks like DMY. In addition, EXT by the terminal device
-Access to the actual data of FAT is denied due to information (access control information) indicating access control such as read / write not set for each file / block.

【0068】なお、ここでは、EXT−FATについて
のみ示したが、EXTディレクトリエントリの領域につ
いても、EXT−FATと同様に、架空ファイル化し
て、端末が管理するファイル管理情報FAT”の中に含
める処理を行う。また、EXT−FATと同様に、EX
Tディレクトリエントリに関しても、その格納位置情報
をカード処理系100内部で保持する。
Although only the EXT-FAT is shown here, the area of the EXT directory entry is also made into a fictitious file and included in the file management information FAT "managed by the terminal, like the EXT-FAT. In addition, like the EXT-FAT, the EX
Regarding the T directory entry, the storage position information is held inside the card processing system 100.

【0069】なお、EXT−FAT、及びルートディレ
クトリに関するEXTディレクトリエントリは、固定サ
イズであり、カード内処理系100がカード専用ファイ
ルを作成するためには必要なものであるため、あらかじ
め、例えばカード発行機によって、端末装置からの直接
アクセスが不可能な固定領域に作成してもよい。
The EXT-FAT and the EXT directory entry for the root directory have a fixed size and are necessary for the in-card processing system 100 to create a card-dedicated file. Depending on the machine, it may be created in a fixed area where direct access from the terminal device is impossible.

【0070】図6は、カード内処理系100内部の管理
情報検索手段160に保持されたEXT−FAT及びE
XTディレクトリエントリの格納位置情報の例を示して
いる。ここではEXT−FATの領域が複数に分割され
ている場合を示しており、分割された全ての領域に関す
る先頭アドレスとサイズとでEXT−FATの領域を表
している。管理情報検索手段160は、これらの情報
を、端末からはアクセス不可能でありカード内処理系1
00からのみアクセス可能なTRM(タンパレジスタン
トモジュール)領域内部に保持する。
FIG. 6 shows the EXT-FAT and E held in the management information retrieval means 160 inside the in-card processing system 100.
The example of the storage position information of an XT directory entry is shown. Here, the case where the EXT-FAT area is divided into a plurality of areas is shown, and the start address and size of all the divided areas represent the EXT-FAT area. The management information retrieving means 160 cannot access these pieces of information from the terminal, and the in-card processing system 1
It is held in the TRM (tamper resistant module) area accessible only from 00.

【0071】図7は、カード内処理系100が、端末処
理系300にデータ格納領域の確保を要求する場合の他
の処理を模式的に示している。ここでは、カード内処理
系100によりカード専用ファイルのデータ(以下、
“DAT1”という)が新規作成される場合を示してい
る。
FIG. 7 schematically shows another process when the in-card processing system 100 requests the terminal processing system 300 to secure a data storage area. Here, the data in the file dedicated to the card (hereinafter,
“DAT1”) is newly created.

【0072】まず、フラッシュメモリ200に格納され
ているFAT’をキャッシュメモリ400にFAT”と
して読み出す(1)。カード内処理系100のアプリケ
ーション(C−App)は、DAT1のサイズを端末処
理系300に通知する(2)。端末処理系300は、領
域確保処理を行い、架空ファイル(以下、“DMY1”
という)としてDAT1サイズ分のファイル管理情報を
作成して(3)、FAT”にDMY1の情報を追加する
(4)。端末処理系300は、カード内処理系100に
確保領域を通知する(5)。C−Appは、通知された
領域情報に従って、EXT−FATにDAT1のファイ
ル管理情報を追加し(6)、同時にファイル管理情報に
従ってDAT1を書き込む(7)。
First, the FAT ′ stored in the flash memory 200 is read as FAT ″ into the cache memory 400 (1). The application (C-App) of the in-card processing system 100 sets the size of DAT1 to the terminal processing system 300. (2) The terminal processing system 300 performs area reservation processing, and creates a fictitious file (hereinafter, "DMY1").
The file management information for the size of DAT1 is created (3), and the information of DMY1 is added to FAT ″ (4). The terminal processing system 300 notifies the in-card processing system 100 of the reserved area (5). The C-App adds the file management information of DAT1 to EXT-FAT according to the notified area information (6), and simultaneously writes DAT1 according to the file management information (7).

【0073】図8(A)は、DMY1の情報が追加され
る前のFAT’を、図8(B)は、その時のディレクト
リエントリをそれぞれ示し、図9(A)は、DMY1の
情報が追加された後のFAT”を、図9(B)は、その
時のディレクトリエントリをそれぞれ示している。図9
(A)、図9(B)において、端末処理系300は、カ
ード内処理系100から14クラスタ分の確保要求を受
けて、DMY1として“dummy1”という架空ファ
イルの情報をFAT”に追加している。
FIG. 8A shows the FAT 'before the DMY1 information is added, FIG. 8B shows the directory entry at that time, and FIG. 9A shows the DMY1 information added. FIG. 9B shows the FAT "after being written, and FIG. 9B shows the directory entry at that time.
9A and 9B, the terminal processing system 300 receives a request for securing 14 clusters from the in-card processing system 100, and adds the information of the fictitious file "dummy1" as DMY1 to FAT. There is.

【0074】このように、端末処理系300のためのフ
ァイル管理情報の中に、カード専用ファイルの架空ファ
イルを含めることにより、図7に示すように、端末処理
系300がデータ(DAT2)の情報をFAT”に追加
した(510)後に、DAT2を端末処理系300から
キャッシュメモリ400に書き込み(520)、さらに
DAT2をフラッシュメモリ200に書き込む処理(5
30)や、FAT”をFAT’に上書きする処理(54
0)が何時発生しても、カード専用ファイルのデータ
(すなわち、DAT1)の書き込み領域に対する排他制
御が可能になる。
In this way, by including the fictitious file of the card-dedicated file in the file management information for the terminal processing system 300, as shown in FIG. 7, the terminal processing system 300 provides information on the data (DAT2). After adding (5) to FAT "(510), write DAT2 from the terminal processing system 300 to the cache memory 400 (520), and write DAT2 to the flash memory 200 (5
30) or a process of overwriting FAT ″ with FAT ′ (54
0) occurs at any time, exclusive control for the writing area of the data (that is, DAT1) of the card-dedicated file becomes possible.

【0075】なお、端末処理系300が、カード内処理
系100に確保領域を知らせる場合、領域が連続してい
るときは、先頭のアドレスとサイズとを通知する。ある
いは、カード内処理系100がサイズを把握しているの
で、先頭アドレスのみを通知するだけでも良い。また、
領域が複数に分割されているときは、分割された全ての
領域に関する先頭アドレスとサイズとを通知する。ある
いは、全アドレス(クラスタ番号)を通知しても良い。
When the terminal processing system 300 notifies the in-card processing system 100 of the reserved area, if the areas are continuous, the head address and size are notified. Alternatively, since the in-card processing system 100 knows the size, only the head address may be notified. Also,
When the area is divided into a plurality of areas, the start address and size of all the divided areas are notified. Alternatively, all addresses (cluster numbers) may be notified.

【0076】次に、架空ファイルの作成方法について説
明する。
Next, a method of creating a fictitious file will be described.

【0077】例えば、図7に示す処理において、DAT
1が記録された後、新たなカード専用ファイルのデータ
(以下、“DAT3”という)を記録するための領域確
保要求が出されると、端末処理系300は、DAT1を
記録する場合と同様の手順で、領域を確保し、架空ファ
イルを作成し、確保領域をカード内処理系100に通知
する。そして、カード内処理系100は、領域確保の通
知を受けて、EXT−FATにDAT3の情報を追加
し、同時に、通知された領域情報に従って、DAT3を
フラッシュメモリ200に書き込む。
For example, in the processing shown in FIG.
After 1 is recorded, when an area reservation request for recording data of a new card dedicated file (hereinafter referred to as “DAT3”) is issued, the terminal processing system 300 performs the same procedure as in the case of recording DAT1. Then, the area is secured, a fictitious file is created, and the secured area is notified to the in-card processing system 100. Then, in-card processing system 100 receives the notification of area reservation, adds the information of DAT3 to EXT-FAT, and at the same time, writes DAT3 in flash memory 200 in accordance with the notified area information.

【0078】このとき、端末処理系300は、図10に
示すように、既存の架空ファイル(クラスタ1〜7)と
は独立に、確保領域(クラスタ10〜12)を新規の架
空ファイルとしても良いし、図11に示すように、既存
の架空ファイルに新たな連結情報を追加して、1つの架
空ファイルとしても良い。また、図12に示すように、
固定サイズ(この例では8クラスタ、すなわち、クラス
タ1〜7および10)単位で1つの架空ファイルを作成
するようにしても良い。
At this time, the terminal processing system 300 may use the reserved area (clusters 10 to 12) as a new virtual file, independently of the existing virtual files (clusters 1 to 7), as shown in FIG. Then, as shown in FIG. 11, new connection information may be added to the existing fictitious file to form one fictitious file. In addition, as shown in FIG.
One fictitious file may be created in units of fixed size (8 clusters in this example, that is, clusters 1 to 7 and 10).

【0079】図13(A)は、図10に示す方法で架空
ファイルを作成した場合のFAT”を、図13(B)
は、その場合のディレクトリエントリをそれぞれ示して
いる。図13(B)に示すディレクトリエントリにおい
て、“dummy1”は既存架空ファイル、“dumm
y2”は新たに作成された架空ファイルを示している。
また、図14(A)は、図11に示す方法で架空ファイ
ルを作成した場合のFAT”を、図14(B)は、その
場合のディレクトリエントリをそれぞれ示している。図
14(A)に示すFAT”において、クラスタ98〜1
00は、既存架空ファイルに新たに連結されたクラスタ
である。
FIG. 13A shows "FAT" when a fictitious file is created by the method shown in FIG.
Indicates the directory entries in that case, respectively. In the directory entry shown in FIG. 13B, "dummy1" is an existing fictitious file, and "dummy".
"y2" indicates a newly created fictitious file.
Further, FIG. 14A shows the FAT ″ when the fictitious file is created by the method shown in FIG. 11, and FIG. 14B shows the directory entry in that case. In FAT "shown, clusters 98-1
00 is a cluster newly connected to the existing fictitious file.

【0080】一方、図15(A)は、カード専用ファイ
ルのファイル管理情報であるEXT−FATを、図15
(B)は、同じくカード専用ファイルのファイル管理情
報であるEXT−ディレクトリエントリをそれぞれ示し
ている。ここには、実際のカード専用ファイルの構成情
報が格納されている。この情報はカード内処理系100
からしか見ることができない。図15(A)に示すEX
T−FATと図13(A)または図14(A)に示すF
AT”とを比べると連結情報が異なっている。また、1
つの架空ファイルが、1つのカード専用ファイルに対応
しているとは限らない。そのため、FAT”しか見えな
い端末装置は、カード専用ファイルを例え読み出せたと
しても、データを正確に理解することが困難である。こ
れにより、カード専用ファイルのデータのセキュリティ
は、より強化される。
On the other hand, FIG. 15A shows the EXT-FAT which is the file management information of the file dedicated to the card.
(B) shows the EXT-directory entry which is the file management information of the card dedicated file. Here, the configuration information of the actual file dedicated to the card is stored. This information is stored in the card processing system 100.
Can only be seen from the outside. EX shown in FIG.
T-FAT and F shown in FIG. 13 (A) or FIG. 14 (A)
Compared with AT ", the connection information is different.
One fictitious file does not necessarily correspond to one card-only file. Therefore, it is difficult for a terminal device that can only see FAT "to correctly understand the data even if it can read the card-dedicated file. This further enhances the security of the data in the card-dedicated file. .

【0081】次に、カード内処理系100によるカード
専用ファイルへのアペンド(追記)処理、ならびにカー
ド専用ファイルの削除または縮小する場合の処理につい
て説明する。
Next, the appending process to the card-dedicated file by the in-card processing system 100 and the process for deleting or reducing the card-dedicated file will be described.

【0082】図16は、カード内処理系100によるカ
ード専用ファイルへのアペンド(追記)処理を模式的に
示している。同図を用いて、カード専用ファイルのデー
タ(DAT1)のうち、カード内処理系100が、既に
記録しているデータ(以下、“DAT1(1)”とい
う)に、新たなデータ(以下、“DAT1(2)”とい
う)を追記する場合について説明する。
FIG. 16 schematically shows an appending process (additional writing) to a card-dedicated file by the in-card processing system 100. Using the same figure, of the data (DAT1) of the file dedicated to the card, new data (hereinafter, "DAT1") is added to the data already recorded by the in-card processing system 100 (hereinafter, "DAT1 (1)"). A case of additionally writing DAT1 (2) "will be described.

【0083】まず、フラッシュメモリ200に格納され
ているFAT’をキャッシュメモリ400にFAT”と
して読み出す(1)。カード内処理系100のアプリケ
ーション(C−App)は、DAT1(2)のサイズを
端末処理系300に通知する(2)。端末処理系300
は、領域確保処理を行い、架空ファイル(以下、“DM
Y2”という)としてDAT1(2)サイズ分のファイ
ル管理情報を作成して(3)、FAT”にDMY2の情
報を追加する(4)。端末処理系300は、カード内処
理系100に確保領域を通知する(5)。C−App
は、通知された領域情報に従って、EXT−FATに記
録されたDAT1の情報を更新し(6)、同時に、DA
T1(2)を書き込む(7)。
First, FAT ′ stored in the flash memory 200 is read as FAT ″ into the cache memory 400 (1). The application (C-App) of the in-card processing system 100 sets the size of DAT1 (2) to the terminal. Notify the processing system 300 (2). Terminal processing system 300
Performs area reservation processing, and creates a fictitious file (hereinafter "DM
The file management information for the size of DAT1 (2) is created as (Y2 ″) (3), and the information of DMY2 is added to FAT ″ (4). The terminal processing system 300 notifies the in-card processing system 100 of the reserved area (5). C-App
Updates the information of DAT1 recorded in EXT-FAT according to the notified area information (6), and at the same time, DA
Write T1 (2) (7).

【0084】このように、カード専用ファイルへのアペ
ンド処理であっても、端末処理系300での処理は図7
の場合と全く変わらない。カード専用ファイルへの追記
の関係は、カード内処理系100のみが参照可能なEX
T−FATの中だけに記録される。
As described above, even in the append processing to the card-dedicated file, the processing in the terminal processing system 300 is as shown in FIG.
Is no different from the case of. Regarding the relationship of additional writing to the file dedicated to the card, only the in-card processing system 100 can refer to EX
It is recorded only in T-FAT.

【0085】図17は、上記の処理でDAT1(1)に
追記したDAT1(2)を削除する処理を模式的に示し
ている。
FIG. 17 schematically shows the processing for deleting DAT1 (2) added to DAT1 (1) in the above processing.

【0086】まず、フラッシュメモリ200に格納され
ているFAT’をキャッシュメモリ400にFAT”と
して読み出す(1)。カード内処理系100のアプリケ
ーション(C−App)は、DAT1(2)を消去し
(2)、同時にEXT−FATに記録されたDAT1の
情報を更新する(3)。C−Appは、DAT1(2)
の位置を通知する(4)。端末処理系300は、位置情
報から該当ファイルを検索し、DMY2がヒットする
(5)。そして、端末処理系300は、DMY2のファ
イル管理情報を修正(縮小/削除)する(6)。
First, the FAT ′ stored in the flash memory 200 is read as FAT ″ into the cache memory 400 (1). The application (C-App) of the in-card processing system 100 erases DAT1 (2) ( 2) At the same time, the information of DAT1 recorded in EXT-FAT is updated (3) C-App is DAT1 (2)
Notify the position of (4). The terminal processing system 300 searches for the corresponding file from the position information, and hits DMY2 (5). Then, the terminal processing system 300 corrects (reduces / deletes) the file management information of DMY2 (6).

【0087】図18(A)は、図14(A)に示すFA
Tの状態から、クラスタ87〜89の3クラスタの解放
要求を受け、架空ファイル“dummy1”のサイズを
3クラスタ分減らしたときのFATの状態を、図18
(B)は、そのときのディレクトリエントリの状態をそ
れぞれ示している。
FIG. 18A shows the FA shown in FIG.
18 shows the FAT state when the size of the fictitious file “dummy1” is reduced by 3 clusters in response to the release request for the 3 clusters 87 to 89 from the T state.
(B) shows the states of the directory entries at that time.

【0088】このように、本実施形態によれば、カード
専用ファイルのための確保領域に架空ファイルを設定す
ることにより、端末処理系300のためのファイル管理
情報と実際のフラッシュメモリ上のデータ記録との不整
合を除くことができ、また、カード専用ファイルが記憶
された領域に他のファイルが記憶されないように排他制
御を行うことができる。
As described above, according to the present embodiment, by setting the fictitious file in the reserved area for the card-dedicated file, the file management information for the terminal processing system 300 and the actual data recording on the flash memory are recorded. It is possible to eliminate inconsistency with the above, and it is possible to perform exclusive control so that other files are not stored in the area where the card-dedicated file is stored.

【0089】なお、本実施形態においては、カード専用
ファイルのための確保領域に架空ファイルを設定した
が、この架空ファイルを設定する代わりに、図19
(A)に示すように、FATの確保領域に不良セクタ
(図19(A)では「−2」で表示)を設定しても、カ
ード専用ファイルに対する排他制御が可能である。この
場合、ディレクトリエントリには何も情報を追加しない
(図19(B)参照)。但し、EXT−FAT及びEX
Tディレクトリは、確保領域を架空ファイル化する場合
と同じである。
In the present embodiment, the fictitious file is set in the reserved area for the card-dedicated file.
As shown in (A), even if a defective sector (indicated by "-2" in FIG. 19 (A)) is set in the reserved area of FAT, exclusive control for the card-dedicated file is possible. In this case, no information is added to the directory entry (see FIG. 19 (B)). However, EXT-FAT and EX
The T directory is the same as when the reserved area is made into a fictitious file.

【0090】(第2の実施形態)図20は、本発明の第
2の実施形態に係るセキュアカードおよび端末装置の構
成を示すブロック図である。なお、同図において、図1
と同じ部分には同じ符号を付し、詳しい説明を省略す
る。
(Second Embodiment) FIG. 20 is a block diagram showing configurations of a secure card and a terminal device according to a second embodiment of the present invention. In addition, in FIG.
The same reference numerals are given to the same portions as, and detailed description will be omitted.

【0091】図20に示すセキュアカードのカード内処
理系100aは、図1に示すセキュアカードのカード内
処理系100に空き領域記憶手段170および書き込み
順序決定手段180を追加し、管理情報検索手段160
に代えて拡張ファイル管理情報検索手段190を備えた
構成を採る。また、図20に示すセキュアカードのフラ
ッシュメモリ200aは、図1に示すセキュアカードの
フラッシュメモリ200のカード専用ファイル管理情報
220に代えて拡張ファイル管理情報240を有する構
成を採る。
The in-card processing system 100a of the secure card shown in FIG. 20 has a free area storage means 170 and a writing order determination means 180 added to the in-card processing system 100 of the secure card shown in FIG.
Instead of this, a configuration including the extended file management information search means 190 is adopted. The secure card flash memory 200a shown in FIG. 20 has extended file management information 240 instead of the card dedicated file management information 220 of the secure card flash memory 200 shown in FIG.

【0092】本実施形態の特徴は、カード内処理系10
0は、書き込みに必要なデータサイズよりも大きい領域
をファイル(本実施形態においては、これを“架空ファ
イル”と云う)で使用するものとして、例えば128キ
ロバイトを1単位としてn単位分の領域を1架空ファイ
ル用に要求して確保する点である。
The feature of this embodiment is that the card processing system 10 is used.
0 indicates that an area larger than the data size required for writing is used as a file (in the present embodiment, this is called a “fictitious file”), for example, 128 kilobytes as one unit and an area for n units. It is a point to reserve for one fictitious file.

【0093】空き領域記憶手段170は、架空ファイル
用の確保領域を記憶し、この確保領域から書き込みに使
用する領域を指定する。
The free area storage means 170 stores a reserved area for a fictitious file and designates an area to be used for writing from this reserved area.

【0094】書き込み順序決定手段180は、領域にデ
ータを書き込んでいく順序(クラスタの連結順序)を決
定する。
The writing order determining means 180 determines the order of writing data in the area (cluster connecting order).

【0095】また、拡張ファイル管理情報検索手段19
0は、書き込み順序決定手段180が決定する順序で書
き込まれたカード専用ファイル管理情報(以下、“拡張
ファイル管理情報”と云う)240の格納位置情報を保
持する。
Further, the extended file management information retrieval means 19
0 holds the storage position information of the card-dedicated file management information (hereinafter referred to as “extended file management information”) 240 written in the order determined by the writing order determination means 180.

【0096】このセキュアカードのカード内処理系10
0aは、図20に示すように、確保領域を記憶し、記憶
した確保領域から書き込み領域を指定する空き領域記憶
手段170と、端末装置に対して架空ファイルのサイズ
を指定してフラッシュメモリ200aの領域確保を要求
する領域変更要求手段130と、端末装置から確保領域
とその領域に端末が登録した架空ファイル名との情報を
受信する確保領域情報受信手段140と、空き領域記憶
手段170より指定された書き込み領域への実データ2
10の書き込み/削除及び拡張ファイル管理情報240
の書き込みを実行する書き込み/消去手段150と、書
き込み/消去手段150にデータの書き込み順序を指定
する書き込み順序決定手段180と、拡張ファイル管理
情報240の格納位置情報を保持する拡張ファイル管理
情報検索手段190とを備えている。
In-card processing system 10 of this secure card
As shown in FIG. 20, 0a stores a reserved area, and a free area storage unit 170 for designating a writing area from the stored reserved area, and a flash memory 200a by designating a fictitious file size to the terminal device. The area change request means 130 for requesting the area reservation, the reserved area information receiving means 140 for receiving information about the reserved area and the fictitious file name registered in the area from the terminal device, and the free area storage means 170 are designated. Actual data to write area 2
10 write / delete and extended file management information 240
Writing / erasing means 150 for executing writing, a writing order determining means 180 for designating a writing order of data to the writing / erasing means 150, and an extended file management information searching means for holding storage location information of the extended file management information 240. And 190.

【0097】この拡張ファイル管理情報検索手段19
0、書き込み/消去手段150及び拡張ファイル管理情
報240は、このカード内処理系100aでの「書込位
置情報格納手段」を構成している。
This extended file management information search means 19
0, the write / erase means 150, and the extended file management information 240 constitute "write position information storage means" in the in-card processing system 100a.

【0098】このカード内処理系100aの書き込み/
消去手段150は、書き込むデータのサイズを空き領域
記憶手段170に通知する。空き領域記憶手段170
は、書き込み/消去手段150が書き込むデータのサイ
ズ分の空き領域を保持していない場合に、そのデータの
サイズと現在の空き領域のサイズの差分より大きな領域
の確保を領域変更要求手段130を通じて端末処理系3
00に要求する。カード内処理系100aの領域変更要
求手段130は、空き領域記憶手段170が要求したサ
イズ情報を含む利用領域変更要求を端末装置に送信す
る。
Writing / writing in this card processing system 100a
The erasing means 150 notifies the free area storage means 170 of the size of the data to be written. Free space storage means 170
When the writing / erasing means 150 does not hold a free area corresponding to the size of the data to be written, the area change requesting means 130 is used to secure an area larger than the difference between the size of the data and the size of the current free area. Processing system 3
Request to 00. The area change requesting means 130 of the in-card processing system 100a transmits a use area change request including the size information requested by the free area storing means 170 to the terminal device.

【0099】端末処理系300の領域変更要求受信手段
340は、受信した利用領域変更要求をファイル情報処
理手段330に伝え、ファイル情報処理手段330は、
ファイル情報保持手段410に保持された端末処理系3
00のためのファイル管理情報を参照し、フラッシュメ
モリ200aの空き領域を検索する。
The area change request receiving means 340 of the terminal processing system 300 transmits the received use area change request to the file information processing means 330, and the file information processing means 330
Terminal processing system 3 held in the file information holding means 410
00 for the free area of the flash memory 200a.

【0100】空き領域が有る場合には、領域確保手段3
50が、端末処理系300のためのファイル管理情報の
中に、利用領域変更要求に含まれたサイズの領域を確保
し、架空ファイル情報生成手段360が、その領域を利
用しているものとするための架空ファイルの管理情報を
生成し、ファイル情報処理手段330は、この架空ファ
イル情報を端末処理系300のためのファイル管理情報
に登録する。
If there is a free area, area securing means 3
It is assumed that 50 secures an area of the size included in the usage area change request in the file management information for the terminal processing system 300, and the fictitious file information generation means 360 uses the area. To generate the fictitious file management information, and the file information processing means 330 registers the fictitious file information in the file management information for the terminal processing system 300.

【0101】ファイル情報処理手段330は、確保領域
通知手段370を通じて、確保した領域と、対応する架
空ファイルの名前とをカード内処理系100aに通知す
る。
The file information processing means 330 notifies the in-card processing system 100a of the reserved area and the name of the corresponding fictitious file through the reserved area notifying means 370.

【0102】カード内処理系100aの確保領域情報受
信手段140は、端末処理系300から受信した確保領
域及び架空ファイル名を含む確保領域情報を空き領域記
憶手段170に伝え、空き領域記憶手段170は、確保
領域情報を記憶する。
The reserved area information receiving means 140 of the in-card processing system 100a transmits the reserved area information including the reserved area and the fictitious file name received from the terminal processing system 300 to the free area storage means 170, and the free area storage means 170 , Secure area information is stored.

【0103】空き領域記憶手段170は、書き込むべき
領域を書き込み順序決定手段180に通知する。
The free area storage means 170 notifies the write order determining means 180 of the area to be written.

【0104】図21(A)は、空き領域記憶手段170
が管理するデータ実体の一例を示している。架空ファイ
ルの先頭クラスタであるクラスタ44には、この架空フ
ァイル名“dummy1.dmy”と、先頭クラスタを
除く使用クラスタ数13とが格納されている。なお、図
21(A)において、“Data”は、カード専用ファ
イルが格納されていることを表し、“Null”は、デ
ータが格納されていない、つまり空き領域であることを
表している。
FIG. 21A shows a free area storage means 170.
2 shows an example of a data entity managed by. In the cluster 44, which is the first cluster of the fictitious file, the fictitious file name “dummy1.dmy” and the number of used clusters 13 excluding the first cluster are stored. In FIG. 21A, “Data” indicates that a card-dedicated file is stored, and “Null” indicates that no data is stored, that is, an empty area.

【0105】空き領域記憶手段170から書き込むべき
領域を通知された書き込み順序決定手段180は、通知
された領域にデータを書き込んでいく順序を決定する。
The writing order determining means 180, which has been notified of the area to be written from the free area storing means 170, determines the order of writing data in the notified area.

【0106】このとき、書き込み順序決定手段180
は、書き込むべき領域に対して変則的な書き込み順序を
決定し、決定した順序を、書き込み/消去手段150に
通知する。ここで、「変則的」とは、シーケンシャルで
ないと云う意味であり、完全にばらばらな配置、あるい
は、逆順にしただけなど、あらゆる順序を含む。
At this time, the writing order determining means 180
Determines an irregular writing order for the area to be written, and notifies the writing / erasing means 150 of the determined order. Here, "anomalous" means not sequential, and includes any order, such as completely disjointed arrangements or only reversed order.

【0107】書き込み/消去手段150は、書き込み順
序決定手段180が決定した順序に従ってデータ実体を
フラッシュメモリ200aに書き込む。同時に、拡張フ
ァイル管理情報検索手段190に保持された拡張ファイ
ル管理情報240の格納位置情報を参照して、拡張ファ
イル管理情報240に、データ実体を書き込んだ位置を
記録する。
The writing / erasing means 150 writes the data entity in the flash memory 200a in the order determined by the writing order determining means 180. At the same time, the storage location information of the extension file management information 240 held in the extension file management information searching means 190 is referred to, and the location where the data entity is written is recorded in the extension file management information 240.

【0108】なお、第1の実施形態において説明したよ
うに、データ実体を書き込んだ位置を記録するための拡
張ファイル管理情報240もフラッシュメモリ200a
に記録されている。したがって、拡張ファイル管理情報
240は、領域変更要求手段130によって領域の確保
が要求された結果、フラッシュメモリ200aの既に確
保された領域に書き込まれている。ここで、「既に確保
された領域」とは、拡張ファイル管理情報240が書き
込まれる直前に領域変更要求手段130の要求に応じて
端末処理系300が確保した領域、およびそれ以前に端
末処理系300が確保した領域を意味しており、拡張フ
ァイル管理情報240がフラッシュメモリ200aに書
き込まれる時点で確保されているすべての領域を含む。
As described in the first embodiment, the extended file management information 240 for recording the position where the data entity is written is also the flash memory 200a.
It is recorded in. Therefore, the extended file management information 240 has been written in the already secured area of the flash memory 200a as a result of the area securing requesting unit 130 requesting the securing of the area. Here, the "already secured area" is an area secured by the terminal processing system 300 in response to a request from the area change requesting unit 130 immediately before the extended file management information 240 is written, and the terminal processing system 300 before that. Means an area reserved by the file, and includes all areas reserved when the extended file management information 240 is written in the flash memory 200a.

【0109】この拡張ファイル管理情報検索手段190
及び拡張ファイル管理情報240については後に詳述す
る。
This extended file management information search means 190
The extended file management information 240 will be described later in detail.

【0110】図22は、カード内処理系100aに空き
領域記憶手段170と書き込み順序決定手段180とを
備える場合の、DAT1に関するファイルが新規作成さ
れる場合の処理を模式的に示している。端末側の処理は
図7と同様であるので省略する。
FIG. 22 schematically shows the processing when a file relating to DAT1 is newly created when the in-card processing system 100a is provided with the free area storage means 170 and the writing order determination means 180. The processing on the terminal side is the same as in FIG.

【0111】カード内処理系100のアプリケーション
(C−App)は、DAT1のサイズ分の空き領域をカ
ード内処理系で保持しているか否かを調べ(1)、DA
T1のサイズ分の空き領域がなければ、端末に要求する
確保サイズを決定する(2)。このサイズは、DAT1
を格納するのに不足しているサイズ以上のサイズであ
り、かつ毎回同じサイズ、またはある固定サイズの倍数
長であることが望ましい(例えば、32kバイトを基本
として、不足分にあわせて64kバイト、96kバイト
と云うように、32kバイトの倍数長とする)。
The application (C-App) of the in-card processing system 100 checks whether the in-card processing system holds an empty area of the size of DAT1 (1), DA
If there is no free area for the size of T1, the secured size requested to the terminal is determined (2). This size is DAT1
It is desirable that the size is equal to or larger than the size that is insufficient to store, and is the same size each time, or a multiple length of a certain fixed size (for example, based on 32 kbytes, 64 kbytes are added to the shortage, It is a multiple of 32 kbytes, such as 96 kbytes).

【0112】そして、C−Appは、端末処理系300
に(2)で決定したサイズを通知し(3)、端末処理系
300から確保領域情報と確保領域に対応した架空ファ
イル名とを受信する(4)。その後、C−Appは、端
末処理系300から受信した確保領域情報を空き領域記
憶手段170に一旦記憶させ(5)、空き領域記憶手段
170は、DAT1を書き込みする領域を決定し、C−
Appへ通知する(6)。さらに、書き込み順序決定手
段180は、書き込み領域にDAT1を書き込む順序を
決定してC−Appへ通知し(7)、C−Appは、通
知された順序に従ってEXT−FATにDAT1のファ
イル管理情報を追加し(8)、同時にファイル管理情報
に従ってDAT1を書き込む(9)。
C-App is the terminal processing system 300.
Is notified of the size determined in (2) (3), and secure area information and a fictitious file name corresponding to the secure area are received from the terminal processing system 300 (4). After that, C-App temporarily stores the reserved area information received from the terminal processing system 300 in the free area storage means 170 (5), and the free area storage means 170 determines the area to write DAT1, and C-App
Notify App (6). Further, the writing order determination unit 180 determines the order of writing DAT1 in the writing area and notifies the C-App (7), and the C-App writes the file management information of DAT1 to the EXT-FAT according to the notified order. Add (8) and simultaneously write DAT1 according to the file management information (9).

【0113】こうすることで、カード内処理系100a
で作成するファイルのサイズ情報を端末装置に開示する
必要がなくなるという効果が得られる。また、DAT1
のサイズ分空き領域を保持していれば、端末処理系30
0に確保要求を出すことなくDAT1の書き込みが可能
となるので、ファイルの書き込みタイミングと領域確保
要求タイミングとが完全には一致しなくなり、カード内
処理系100aのファイル作成動作が端末処理系300
に知られにくくなるという効果がある。また、確保処理
の回数が減り、処理が軽くなるという効果もある。
By doing so, the card processing system 100a
The effect that there is no need to disclose the size information of the file created in 1. to the terminal device is obtained. Also, DAT1
If a free area corresponding to the size of
Since DAT1 can be written without issuing a reservation request to 0, the file write timing and the area reservation request timing do not completely match, and the file creation operation of the in-card processing system 100a is performed by the terminal processing system 300.
There is an effect that it becomes difficult to be known. There is also an effect that the number of securing processes is reduced and the process becomes light.

【0114】また、このセキュアカードでは、書き込み
順序決定手段180を設け、特別な処理を追加しなけれ
ば、通常選択されるであろう(おそらくアドレスの若い
方からシーケンシャルな)書き込み順序を、敢えて変則
的な順序に変換している。このように、書き込み順序を
明示的に変則的にしたことにより、たとえ端末装置によ
って不正にカード専用ファイルの実データの読み出しが
行われたとしても、連結情報を推測することが困難とな
り、データを正確に読み出すことができない。即ち、秘
匿性を高める効果がある。
Further, in this secure card, the writing order determining means 180 is provided, and unless special processing is added, the writing order that is normally selected (probably sequential from the younger address) is intentionally changed. Have been converted to the standard order. In this way, by explicitly making the writing order irregular, even if the terminal device illegally reads the actual data of the card-dedicated file, it becomes difficult to guess the connection information and the data is It cannot be read correctly. That is, there is an effect of increasing confidentiality.

【0115】なお、ここでは、カード内処理系100a
に、空き領域記憶手段170と書き込み順序決定手段1
80との両方を備える場合について説明したが、いずれ
か一方だけを備える構成としても良い。
In this example, the card processing system 100a is used.
In addition, the free space storage means 170 and the writing order determination means 1
Although the case where both 80 and 80 are provided has been described, the configuration may be provided only with one of them.

【0116】次いで、カード内処理系100aが、端末
処理系300にデータ格納領域の解放を要求する場合
(すなわち、データが削除される場合)の処理手順を説
明する。
Next, the processing procedure when the in-card processing system 100a requests the terminal processing system 300 to release the data storage area (that is, when the data is deleted) will be described.

【0117】図23は、カード内処理系100aに空き
領域記憶手段170を備える場合の解放処理を模式的に
示している。
FIG. 23 schematically shows the release processing when the in-card processing system 100a is provided with the free area storage means 170.

【0118】カード内処理系がDAT1のデータ実体を
消去し(1)、EXT−FATを更新して(2)、DA
T1が消去された領域をカード内処理系での未使用領域
とする(3)。
The in-card processing system erases the data substance of DAT1 (1), updates EXT-FAT (2), and DA
The area where T1 is erased is set as an unused area in the processing system in the card (3).

【0119】このとき、空き領域が1つの架空ファイル
全体の領域を含んでいれば、該架空ファイル名を指定し
て(4)、端末に領域解放要求を行う(5)。これを受
けて、端末装置は、指定された架空ファイルのファイル
管理情報を削除する(6)。
At this time, if the empty area includes the area of one entire fictitious file, the fictitious file name is designated (4) and an area release request is issued to the terminal (5). In response to this, the terminal device deletes the file management information of the designated fictitious file (6).

【0120】空き領域が1つの架空ファイル全体の領域
を含んでいるか否かの判定方法を、空き領域記憶手段1
70を備えるときのEXT−FATおよびEXTディレ
クトリエントリをそれぞれ示す図24(A)および図2
4(B)と、空き領域記憶手段170で保持されたデー
タをそれぞれ示す図21(A)、図21(B)および図
21(C)とを用いて説明する。
A method for determining whether or not the empty area includes the area of one fictitious file is as follows:
24 (A) and FIG. 2 showing EXT-FAT and EXT directory entries, respectively, when equipped with 70.
4 (B) and FIGS. 21 (A), 21 (B) and 21 (C) showing the data held in the free area storage means 170, respectively.

【0121】図24(A)に示すEXT−FATには、
連結情報に加えて、確保時の架空ファイルの先頭クラス
タ情報が記録されている。すなわち、図24(A)にお
いては、上段が通し番号、中段が連結情報記述枠、下段
が先頭クラスタ番号記述枠である。図24(A)に示す
EXT−FATによって管理される領域、すなわち、ク
ラスタ44〜47、クラスタ64〜67、クラスタ86
〜89、およびクラスタ96〜100の17クラスタ
が、1つの架空ファイル“dummy1.dmy”とし
て確保されているものとする。なお、架空ファイル“d
ummy1.dmy”として確保された領域のうち、9
8〜100が空き領域となっている。
The EXT-FAT shown in FIG.
In addition to the concatenation information, the top cluster information of the fictitious file at the time of securing is recorded. That is, in FIG. 24A, the upper part is the serial number, the middle part is the connection information description frame, and the lower part is the top cluster number description frame. Areas managed by EXT-FAT shown in FIG. 24A, that is, clusters 44 to 47, clusters 64 to 67, and cluster 86.
˜89, and 17 clusters of clusters 96 to 100 are secured as one fictitious file “dummy1.dmy”. The fictitious file "d
ummy1. 9 out of the area secured as "dmy"
8 to 100 are free areas.

【0122】図21(A)は、図24(A)に対応した
データ実体を示している。架空ファイルの先頭クラスタ
である44番クラスタには、この架空ファイル名“du
mmy1.dmy”と、先頭クラスタを除く使用クラス
タ数13が格納されている。なお、“Data”は、カ
ード処理系100a内で作成されたファイル、ここでは
“sfile3”が格納されていることを表し、“Nu
ll”はデータが格納されていない、つまり空き領域で
あることを表している。
FIG. 21 (A) shows the data entity corresponding to FIG. 24 (A). In the 44th cluster, which is the first cluster of the fictitious file, this fictitious file name "du
mmy1. "dmy" and the number of used clusters excluding the first cluster are stored 13. Note that "Data" indicates that a file created in the card processing system 100a, here "sfile3" is stored, "Nu
"ll" represents that no data is stored, that is, it is a free area.

【0123】この状態からファイル“sfile3”の
最終2クラスタ、つまりクラスタ87とクラスタ47を
消去した状態が図21(B)である。このとき、クラス
タ44における使用クラスタ数を2減らして11とす
る。
FIG. 21B shows a state in which the last two clusters of the file "sfile3", that is, the cluster 87 and the cluster 47 are deleted from this state. At this time, the number of used clusters in the cluster 44 is reduced by 2 to 11.

【0124】さらに、“sfile3”全体を消去した
状態が図21(C)である。このとき、クラスタ44に
おける使用クラスタ数を11減らして0とする。クラス
タ44に格納された使用クラスタ数が0となったとき
に、同じくクラスタ44に格納された架空ファイル名
“dummy1.dmy”を取り出すとともに、クラス
タ44のデータを消去することで、1つの架空ファイル
全体が空き領域となったことを判別することができる。
Further, FIG. 21C shows a state in which the entire "sfile3" is erased. At this time, the number of used clusters in the cluster 44 is reduced by 11 to 0. When the number of used clusters stored in the cluster 44 becomes 0, the fictitious file name “dummy1.dmy” also stored in the cluster 44 is taken out, and the data in the cluster 44 is erased to obtain one fictitious file. It is possible to determine that the entire area has become a free area.

【0125】これにより、端末装置は1つの架空ファイ
ルとして見えている領域をまとめて解放するので、通常
ファイルの削除時と同じ処理によって解放作業を行うこ
とができるという効果がある。
As a result, since the terminal device collectively releases the areas that are viewed as one fictitious file, there is an effect that the release work can be performed by the same processing as when the normal file is deleted.

【0126】また、データ実体の消去タイミングと端末
処理系300への解放要求タイミングとが完全には一致
しなくなり、カード内処理系100aのデータ消去動作
が端末装置に知られにくくなるという効果がある。
Further, there is an effect that the timing of erasing the data entity and the timing of the release request to the terminal processing system 300 do not completely match, and the data erasing operation of the in-card processing system 100a becomes difficult to be known to the terminal device. .

【0127】なお、ここでは、領域確保に架空ファイル
を設定する場合について説明したが、第1の実施形態で
説明したように、端末処理系300のためのファイル管
理情報の確保領域に不良セクタを設定して、カード専用
ファイルに対する排他制御を行う方式においても、この
空き領域記憶手段170を備えるセキュアカードを使用
することができる。
Although the case of setting a fictitious file to secure the area has been described here, as described in the first embodiment, a defective sector is set in the secure area of the file management information for the terminal processing system 300. The secure card having the free space storage means 170 can also be used in the method of setting and performing exclusive control on the card dedicated file.

【0128】ただし、この場合、端末装置は、架空ファ
イルという単位では無く、クラスタ単位で領域を確保し
ているため、空き領域記憶手段170でも、クラスタ単
位での使用/未使用フラグ設定を行う必要がある。ま
た、解放時も、ファイル単位という概念がないので、あ
る一定量の連続領域が空きとなった場合、あるいは、あ
る一定量(連続領域に限らず)が空き領域となった場合
などに解放要求を行う。
However, in this case, since the terminal device secures the area not in units of fictitious files but in units of clusters, it is necessary to set the used / unused flag in units of clusters also in the free area storage means 170. There is. Also, since there is no concept of a file unit at the time of release, a release request is issued when a certain fixed amount of continuous area becomes free, or when a certain fixed amount (not limited to continuous area) becomes free. I do.

【0129】次いで、拡張ファイル管理情報240につ
いて説明する。
Next, the extended file management information 240 will be described.

【0130】EXT−FATを除く、データやディレク
トリエントリは、書き込み順序決定手段180により、
書き込み順序をランダムに決定しても、問題なく読み出
すことができる。なぜなら、EXT−FATに格納位置
と順序とが記憶されるため、ランダムに配置しても、E
XT−FATを参照して正しい順序で読み出すことが可
能であるためである。
Data and directory entries other than EXT-FAT are written by the write order determining means 180.
Even if the writing order is randomly determined, the reading can be performed without any problem. Because the storage position and the order are stored in the EXT-FAT, even if they are randomly arranged, E
This is because it is possible to read out in the correct order with reference to XT-FAT.

【0131】しかし、EXT−FAT自体をランダム配
置する場合にはEXT−FATの順序を示す情報が必要
となる。
However, when the EXT-FATs are randomly arranged, information indicating the order of the EXT-FATs is required.

【0132】このEXT−FATの順序を示す情報が拡
張ファイル管理情報検索手段190によって保持され
る。
Information indicating the order of the EXT-FAT is held by the extended file management information searching means 190.

【0133】図25(A)は、正順に整列されたEXT
−FATの一例を示している。このEXT−FATは、
一定サイズ(この例ではクラスタ1つのサイズであり、
32クラスタ分の連結情報を保持するサイズである)で
分割され、書き込み順序決定手段180により並び替え
られて、図中(x)に示すクラスタ番号のように変則的
な順序で格納される。
FIG. 25A shows the EXTs arranged in the normal order.
-Shows an example of FAT. This EXT-FAT is
Fixed size (in this example, the size of one cluster,
The data is divided into 32 clusters (which is the size for holding the connection information), rearranged by the writing order determining unit 180, and stored in an irregular order like the cluster numbers shown in (x) in the figure.

【0134】このとき、拡張ファイル管理情報検索手段
190では、図26に示すように、EXT−FAT格納
順序(図25(A)中の(x)に示す格納クラスタ番
号)と、EXT−FAT1クラスタ当たりで保持する連
結情報数とを含むEXT−FAT順序情報が保持され
る。
At this time, in the extended file management information searching means 190, as shown in FIG. 26, the EXT-FAT storage order (the storage cluster number shown in (x) in FIG. 25A) and the EXT-FAT1 cluster. EXT-FAT order information including the number of pieces of connection information held per hit is held.

【0135】図25(A)に示すように変則的な順序で
格納されたEXT−FATからファイルを読み出す場合
は、次のように行う。なお、図25(A)は、EXT−
FATの先頭16クラスタ分(0〜511番の連結情
報)を抜粋したものである。
When a file is read from the EXT-FAT stored in an irregular order as shown in FIG. 25 (A), it is performed as follows. Note that FIG. 25A shows EXT-
This is an extract of the first 16 clusters of FAT (connection information of Nos. 0 to 511).

【0136】まず、参照したいファイル名“sfile
1”を図25(B)のEXTディレクトリエントリより
検索し、ファイルの先頭クラスタ(クラスタ322)を
取得する。次に、先頭クラスタに連結される次クラスタ
の番号を取得するために、EXT−FATにおける1ク
ラスタ当たりの連結情報数(この例では32クラスタ
分)を取得し、クラスタ番号と、EXT−FATにおけ
る1クラスタ当たりの連結情報数より、クラスタ322
の次クラスタ情報は、(322+1)/32+1=1
1.09375より、EXT−FATの11クラスタ
目、つまり527番クラスタ内に存在し、(322+
1)−(11−1)×32=3より、3つめの枠に記述
されていることを導くことができる。
First, the file name "sfile" to be referenced
1 "is searched from the EXT directory entry in FIG. 25B to obtain the first cluster (cluster 322) of the file. Next, in order to obtain the number of the next cluster connected to the first cluster, EXT-FAT The number of linked information per cluster (32 clusters in this example) is acquired, and the cluster 322 is obtained from the cluster number and the number of linked information per cluster in EXT-FAT.
Next cluster information is (322 + 1) / 32 + 1 = 1
Since 1.09375, it exists in the 11th cluster of EXT-FAT, that is, in the 527th cluster, and (322+
From 1)-(11-1) × 32 = 3, it is possible to derive what is described in the third frame.

【0137】これにより、次データの格納クラスタを取
得する。以降ファイル終端(連結情報に−1が格納)ま
で繰り返すことで、“sfile1”全体を参照するこ
とができる。
As a result, the storage cluster of the next data is acquired. After that, the entire "sfile1" can be referred to by repeating until the end of the file (-1 is stored in the connection information).

【0138】新規作成したファイルの情報をEXT−F
ATに追加する場合でも、書き込み順序決定手段180
により指定された、ファイルを格納するクラスタ番号よ
り、ファイル参照時と同様に、該クラスタに連結する次
クラスタの番号、つまり連結情報を格納すべき位置を導
くことができる。
The information of the newly created file is sent to EXT-F.
Even when adding to the AT, the writing order determination unit 180
From the cluster number storing the file designated by, the number of the next cluster connected to the cluster, that is, the position where the connection information should be stored can be derived in the same manner as when the file is referenced.

【0139】なお、本実施形態においては、拡張ファイ
ル管理情報検索手段190が、拡張ファイル管理情報2
40の格納位置を保持する構成としており、フラッシュ
メモリ200a内におけるデータの格納位置などのメタ
データは、一括管理されるものとしているが、このよう
なメタデータは、データ実体を記録するために確保され
た領域にデータ実体と共に記録されるようにしても良
い。
In the present embodiment, the extension file management information search means 190 is used as the extension file management information 2
The storage positions of 40 are held, and the metadata such as the storage position of the data in the flash memory 200a is supposed to be collectively managed. However, such metadata is secured for recording the data entity. It may be recorded in the created area together with the data entity.

【0140】また、上記各実施形態ではFATファイル
システムを例に説明したが、NTFSやUFS等、その
他のファイル管理システムを用いることも勿論可能であ
る。
Although the FAT file system has been described as an example in each of the above embodiments, it is of course possible to use other file management systems such as NTFS and UFS.

【0141】以上のように本発明によれば、本発明のフ
ァイル管理方法では、カード内の処理により記録したカ
ード専用ファイルの使用領域に対し、端末の直接アクセ
スを排する排他制御を実現することができる。
As described above, according to the present invention, in the file management method of the present invention, it is possible to realize the exclusive control for eliminating the direct access of the terminal to the use area of the card-dedicated file recorded by the processing in the card. it can.

【0142】また、カード専用ファイルの情報秘匿が可
能である。
Further, it is possible to conceal the information of the card-dedicated file.

【0143】また、このメモリカードに対して、端末
は、従来のメモリカードに適用していたファイルシステ
ムをそのまま利用することができ、端末の従来機種に対
する互換性を維持している。
Further, for this memory card, the terminal can use the file system applied to the conventional memory card as it is, and the compatibility with the conventional model of the terminal is maintained.

【0144】また、カード専用ファイルの使用可能領域
は可変であり、メモリカードの機能を効率的な利用する
ことができる。
The usable area of the card-dedicated file is variable, and the functions of the memory card can be efficiently used.

【0145】また、カード内処理系で作成、格納された
ファイルの情報を端末に漏らすことなく、メモリカード
に記録されているファイルと、端末処理系のためのファ
イル管理情報との不整合を防止するために、カード作成
時にあらかじめ、直接アクセス不可能な領域を固定サイ
ズで作成しておく方式が考えられるが、この方式と比較
して、本発明は、直接アクセス不可能な領域のサイズが
可変であるため、使用履歴や電子領収書などは、利用さ
れる領域のサイズを予め想定することが困難であり、そ
のため、サイズを固定する方式が適切でない場合にも適
用することができる。
[0145] In addition, the inconsistency between the file recorded in the memory card and the file management information for the terminal processing system is prevented without leaking the information of the file created and stored in the card processing system to the terminal. In order to do so, it is conceivable to create a directly inaccessible area with a fixed size in advance when creating a card. Compared to this method, the present invention has a variable inaccessible area size. Therefore, it is difficult to predict the size of the area used in advance in the usage history or the electronic receipt, and therefore, it can be applied even when the method of fixing the size is not appropriate.

【0146】また、カード内処理系がフラッシュメモリ
に格納した実データを保護するため、カード内処理系が
データを書き込んだ領域には、端末処理系から直接アク
セスができないようにアクセス制御する方式も考えられ
るが、この場合、データの書き込み領域に対する端末処
理系の書き込みトライは、エラーとして処理されるにも
かかわらず、端末からは、データの書き込み領域が使用
可能な領域に見えるため、同領域への書き込みトライが
繰り返され、エラーが頻発する事態が予想される。しか
しながら、本発明によれば、端末処理系にてカード内処
理系の確保領域を認識しているので、このような書き込
みトライが発生することがない。
Further, in order to protect the actual data stored in the flash memory by the in-card processing system, an access control method may be considered so that the area in which the in-card processing system has written data cannot be directly accessed by the terminal processing system. However, in this case, although the writing attempt of the terminal processing system for the data writing area is processed as an error, the data writing area looks like an usable area to the terminal, so It is expected that write attempts will be repeated and errors will occur frequently. However, according to the present invention, since the terminal processing system recognizes the reserved area of the in-card processing system, such a write try does not occur.

【0147】[0147]

【発明の効果】以上説明したように、本発明によれば、
端末装置が管理するファイル管理情報と、メモリカード
の記憶手段に実際に記録されるファイルとの不整合を防
止することができ、カード内の処理により記録したカー
ド専用ファイルの使用領域に対し、端末の直接アクセス
を排する排他制御を実現することができる。
As described above, according to the present invention,
It is possible to prevent inconsistency between the file management information managed by the terminal device and the file actually recorded in the storage means of the memory card. Exclusive control that eliminates the direct access of

【図面の簡単な説明】[Brief description of drawings]

【図1】本発明の第1の実施形態に係るセキュアカード
および端末装置の構成を示すブロック図
FIG. 1 is a block diagram showing configurations of a secure card and a terminal device according to a first embodiment of the present invention.

【図2】セキュアカードでの実データの記録形態の一例
を示す図
FIG. 2 is a diagram showing an example of a recording form of actual data on a secure card.

【図3】FATおよびディレクトリエントリの一例を示
す図
FIG. 3 is a diagram showing an example of a FAT and a directory entry.

【図4】第1の実施形態における架空ファイルの縮小方
法を示す図
FIG. 4 is a diagram showing a method of reducing a fictitious file according to the first embodiment.

【図5】第1の実施形態におけるEXT−FAT領域の
排他制御手順を示す図
FIG. 5 is a diagram showing an exclusive control procedure of an EXT-FAT area in the first embodiment.

【図6】第1の実施形態における管理情報検索手段で保
持されるデータの一例を示す図
FIG. 6 is a diagram showing an example of data held by a management information search unit according to the first embodiment.

【図7】第1の実施形態におけるカード専用ファイルの
作成処理手順を示す図
FIG. 7 is a diagram showing a procedure for creating a card-dedicated file according to the first embodiment.

【図8】第1の実施形態におけるFATおよびディレク
トリエントリの一例を示す図
FIG. 8 is a diagram showing an example of a FAT and a directory entry according to the first embodiment.

【図9】第1の実施形態における架空ファイルを作成し
た状態のFATおよびディレクトリエントリの一例を示
す図
FIG. 9 is a diagram showing an example of a FAT and a directory entry in a state in which a fictitious file is created in the first embodiment.

【図10】第1の実施形態における架空ファイルの第1
の作成形態を示す図
FIG. 10 is a first fictitious file according to the first embodiment.
Figure showing how to create

【図11】第1の実施形態における架空ファイルの第2
の作成形態を示す図
FIG. 11 is a second fictitious file according to the first embodiment.
Figure showing how to create

【図12】第1の実施形態における架空ファイルの第3
の作成形態を示す図
FIG. 12 is a third fictitious file according to the first embodiment.
Figure showing how to create

【図13】第1の実施形態における架空ファイルを新設
した状態のFATおよびディレクトリエントリの一例を
示す図
FIG. 13 is a diagram showing an example of a FAT and a directory entry in a state in which a fictitious file is newly provided in the first embodiment.

【図14】第1の実施形態における架空ファイルに追記
した状態のFATおよびディレクトリエントリの一例を
示す図
FIG. 14 is a diagram showing an example of a FAT and a directory entry in a state of being additionally written in a fictitious file in the first embodiment.

【図15】第1の実施形態におけるEXT−FATおよ
びEXTディレクトリエントリの一例を示す図
FIG. 15 is a diagram showing an example of EXT-FAT and EXT directory entries in the first embodiment.

【図16】第1の実施形態におけるアペンド処理手順を
示す図
FIG. 16 is a diagram showing an append processing procedure according to the first embodiment.

【図17】第1の実施形態における領域解放処理手順を
示す図
FIG. 17 is a diagram showing an area release processing procedure in the first embodiment.

【図18】第1の実施形態における架空ファイルの一部
を解放した状態のFATおよびディレクトリエントリの
一例を示す図
FIG. 18 is a diagram showing an example of a FAT and a directory entry in a state in which a part of a fictitious file is released in the first embodiment.

【図19】第1の実施形態における確保領域を不良セク
タとしたFATおよびディレクトリエントリの一例を示
す図
FIG. 19 is a diagram showing an example of a FAT and a directory entry in which a reserved area is a defective sector in the first embodiment.

【図20】本発明の第2の実施形態におけるセキュアカ
ードおよび端末装置の構成を示すブロック図
FIG. 20 is a block diagram showing configurations of a secure card and a terminal device according to a second embodiment of the present invention.

【図21】第2の実施形態における空き領域記憶手段で
保持されるデータの一例を示す図
FIG. 21 is a diagram showing an example of data stored in a free area storage unit according to the second embodiment.

【図22】第2の実施形態におけるカード専用ファイル
のデータ書き込み手順を示す図
FIG. 22 is a diagram showing a data writing procedure of a card dedicated file according to the second embodiment.

【図23】第2の実施形態におけるデータ削除手順を示
す図
FIG. 23 is a diagram showing a data deletion procedure according to the second embodiment.

【図24】第2の実施形態におけるEXT−FATおよ
びEXTディレクトリエントリの一例を示す図
FIG. 24 is a diagram showing an example of an EXT-FAT and an EXT directory entry in the second embodiment.

【図25】第2の実施形態におけるEXT−FATおよ
びEXTディレクトリエントリの他の一例を示す図
FIG. 25 is a diagram showing another example of the EXT-FAT and the EXT directory entry in the second embodiment.

【図26】第2の実施形態における管理情報検索手段で
保持されるデータの一例を示す図
FIG. 26 is a diagram showing an example of data held by a management information search means according to the second embodiment.

【図27】ICカードの構成の一例を示す図FIG. 27 is a diagram showing an example of the configuration of an IC card.

【図28】セキュアカードの構成の一例を示す図FIG. 28 is a diagram showing an example of the configuration of a secure card.

【図29】セキュアカードへのデータ書き込み処理の一
例を説明するための図
FIG. 29 is a diagram for explaining an example of a data writing process to a secure card.

【図30】セキュアカードへのデータ書き込み処理の他
の一例を説明するための図
FIG. 30 is a diagram for explaining another example of the data writing process to the secure card.

【図31】セキュアカードにおける問題点を説明するた
めの図
FIG. 31 is a diagram for explaining problems with a secure card.

【符号の説明】[Explanation of symbols]

130 領域変更要求手段 140 確保領域情報受信手段 150 書き込み/消去手段 160 管理情報検索手段 170 空き領域記憶手段 180 書き込み順序決定手段 190 拡張ファイル管理情報検索手段 220 カード専用ファイル管理情報 230 ファイル管理情報 240 拡張ファイル管理情報 330 ファイル情報処理手段 340 領域変更要求受信手段 350 領域確保手段 360 架空ファイル情報生成手段 370 確保領域通知手段 410 ファイル情報保持手段 420 ファイル情報書き込み手段 130 Area Change Request Means 140 Reserved area information receiving means 150 writing / erasing means 160 Management information search means 170 Free space storage means 180 Writing order determining means 190 Extended file management information search means 220 Card-only file management information 230 File management information 240 Extended file management information 330 File information processing means 340 Area Change Request Receiving Means 350 Area securing means 360 fictitious file information generation means 370 Reserved area notification means 410 File information holding means 420 File information writing means

───────────────────────────────────────────────────── フロントページの続き (72)発明者 佐々木 理 大阪府門真市大字門真1006番地 松下電器 産業株式会社内 (72)発明者 関部 勉 大阪府門真市大字門真1006番地 松下電器 産業株式会社内 Fターム(参考) 5B017 AA07 BA06 BB10 CA16 5B035 AA00 BB09 BB11 CA11 CA29 5B058 CA23 CA26 KA01 KA04 KA40 5B082 CA01 EA11 JA06    ─────────────────────────────────────────────────── ─── Continued front page    (72) Inventor Osamu Osamu             1006 Kadoma, Kadoma-shi, Osaka Matsushita Electric             Sangyo Co., Ltd. (72) Inventor Tsutomu Sekibe             1006 Kadoma, Kadoma-shi, Osaka Matsushita Electric             Sangyo Co., Ltd. F term (reference) 5B017 AA07 BA06 BB10 CA16                 5B035 AA00 BB09 BB11 CA11 CA29                 5B058 CA23 CA26 KA01 KA04 KA40                 5B082 CA01 EA11 JA06

Claims (22)

【特許請求の範囲】[Claims] 【請求項1】 第1の処理系および第2の処理系からア
クセスされる記憶手段を有するメモリカードにおいて使
用されるファイル管理方法であって、 前記第1処理系が、前記記憶手段の領域の確保を前記第
2処理系に要求する要求ステップと、 前記第2処理系が、前記要求ステップでの要求を受けて
前記記憶手段の領域の確保処理を実施する確保ステップ
と、 前記第2処理系が、前記確保ステップで確保した領域の
情報をファイル管理情報に反映する反映ステップと、 前記第1処理系が、前記確保ステップで前記第2処理系
により確保された領域へのデータの書き込み処理を行う
書込ステップと、を有し、 前記第1処理系は、前記書き込み処理によって生じるフ
ァイル管理情報を前記第2処理系へ通知しないことを特
徴とするファイル管理方法。
1. A file management method used in a memory card having a storage means accessed from a first processing system and a second processing system, wherein the first processing system stores an area of the storage means. A request step for requesting the second processing system to secure; a securing step for the second processing system to secure the area of the storage means in response to the request in the request step; and the second processing system Includes a step of reflecting the information of the area secured in the securing step in the file management information, and the first processing system performs a process of writing data to the area secured by the second processing system in the securing step. And a writing step to be performed, wherein the first processing system does not notify the second processing system of file management information generated by the writing process. Law.
【請求項2】 前記第1処理系は、使用領域のサイズを
前記第2処理系に伝え、前記第2処理系は、前記第1処
理系から伝えられた前記サイズに見合う前記記憶手段の
領域を確保することを特徴とする請求項1記載のファイ
ル管理方法。
2. The first processing system conveys the size of the used area to the second processing system, and the second processing system corresponds to the size transmitted from the first processing system. The file management method according to claim 1, further comprising:
【請求項3】 前記第1処理系は、使用領域のサイズよ
り大きいサイズを前記第2処理系に伝え、前記第2処理
系は、前記第1処理系から伝えられた前記サイズに見合
う前記記憶手段の領域を確保し、前記第1処理系は、確
保された前記領域の中で使用領域を決定することを特徴
とする請求項1記載のファイル管理方法。
3. The first processing system transmits a size larger than the size of the used area to the second processing system, and the second processing system stores the memory corresponding to the size transmitted from the first processing system. 2. The file management method according to claim 1, wherein an area for the means is reserved, and the first processing system determines an area to be used in the reserved area.
【請求項4】 前記第2処理系は、前記確保ステップで
確保した領域のファイル管理情報として架空ファイルを
登録し、前記第1処理系は、前記領域に書き込んだデー
タの書き込み位置の情報を自分自身だけが参照できる場
所に格納することを特徴とする請求項1記載のファイル
管理方法。
4. The second processing system registers a fictitious file as the file management information of the area secured in the securing step, and the first processing system uses the information of the write position of the data written in the area itself. The file management method according to claim 1, wherein the file is stored in a place where only the user can refer to it.
【請求項5】 前記第2処理系は、前記確保ステップで
確保した領域を不良領域としてファイル管理情報に登録
し、前記第1処理系は、前記領域に書き込んだデータの
書き込み位置の情報を自分自身だけが参照できる場所に
格納することを特徴とする請求項1記載のファイル管理
方法。
5. The second processing system registers the area secured in the securing step as a defective area in the file management information, and the first processing system uses the information of the write position of the data written in the area itself. The file management method according to claim 1, wherein the file is stored in a place where only the user can refer to it.
【請求項6】 前記第1処理系は、前記記憶手段の使用
領域に格納されているデータの一部を削除し、削除した
データの領域の解放を前記第2処理系に要求し、当該要
求を受けて前記第2処理系は、前記記憶手段の領域のう
ちデータが削除された領域の解放処理を実施し、解放し
た領域の情報を自己のためのファイル管理情報に反映す
ることを特徴とする請求項1記載のファイル管理方法。
6. The first processing system deletes a part of the data stored in the used area of the storage means, requests the second processing system to release the area of the deleted data, and makes the request. In response to this, the second processing system performs release processing of the area of the storage means in which the data has been deleted, and reflects the information of the released area in the file management information for itself. The file management method according to claim 1.
【請求項7】 前記第1処理系は、メモリカード内部の
処理系であり、前記第2処理系は、前記記憶手段に直接
アクセス可能な端末装置の処理系であることを特徴とす
る請求項1記載のファイル管理方法。
7. The first processing system is a processing system inside a memory card, and the second processing system is a processing system of a terminal device that can directly access the storage means. File management method described.
【請求項8】 第1の処理系および第2の処理系からア
クセスされる記憶手段を有するメモリカードにおいて使
用されるファイル管理方法であって、 前記第1処理系が、前記記憶手段の領域の確保を前記第
2処理系に要求する要求ステップと、 前記第2処理系が、前記要求ステップでの要求を受けて
前記記憶手段の領域の確保処理を実施する確保ステップ
と、 前記第2処理系が、前記確保ステップで確保した領域の
情報を自己のためのファイル管理情報に反映する反映ス
テップと、 前記第1処理系が、前記確保ステップで前記第2処理系
により確保された領域への自己のためのファイル管理シ
ステムのデータの書込処理を行う書込ステップと、 を有することを特徴とするファイル管理方法。
8. A file management method used in a memory card having a storage means accessed from a first processing system and a second processing system, wherein the first processing system is an area of the storage means. A request step for requesting the second processing system to secure; a securing step for the second processing system to secure the area of the storage means in response to the request in the request step; and the second processing system And a reflecting step of reflecting the information of the area secured in the securing step in the file management information for itself, and the first processing system controls the area secured by the second processing system in the securing step. And a writing step of performing a data writing process of a file management system for the file management method.
【請求項9】 第1の処理系および第2の処理系からア
クセスされる記憶手段を有するメモリカードにおいて使
用されるファイル管理方法であって、 前記第1処理系が、前記記憶手段の領域の確保を前記第
2処理系に要求する要求ステップと、 前記第2処理系が、前記要求ステップでの要求を受けて
前記記憶手段の領域の確保処理を実施する確保ステップ
と、 前記第2処理系が、前記確保ステップで確保した領域の
情報を自己のためのファイル管理情報に反映する反映ス
テップと、 前記第1処理系が、前記確保ステップで前記第2処理系
により確保された領域への自己のためのファイル管理シ
ステムのデータの書き込み処理を行う書込ステップと、
を有し、 前記第1処理系は、前記書き込み処理によって生じるフ
ァイル管理情報を前記第2処理系へ通知しないことを特
徴とするファイル管理方法。
9. A file management method used in a memory card having a storage means accessed from a first processing system and a second processing system, wherein the first processing system is an area of the storage means. A request step for requesting the second processing system to secure; a securing step for the second processing system to secure the area of the storage means in response to the request in the request step; and the second processing system And a reflecting step of reflecting the information of the area secured in the securing step in the file management information for itself, and the first processing system controls the area secured by the second processing system in the securing step. Writing step for writing data of the file management system for
The first processing system does not notify the second processing system of file management information generated by the writing process.
【請求項10】 メモリカードの記憶手段にアクセスし
てファイル管理を行う端末装置であって、 前記メモリカードの内部の処理系から前記記憶手段の領
域の確保の要求を受信する要求受信手段と、 前記要求受信手段によって受信された要求に基づいて前
記記憶手段の領域の確保処理を行う領域確保手段と、 前記領域確保手段によって確保された領域の情報を自己
のためのファイル管理情報に反映するファイル情報処理
手段と、 前記領域確保手段によって確保された領域の情報を前記
メモリカードの内部の処理系に伝達する確保領域伝達手
段と、 を有することを特徴とする端末装置。
10. A terminal device for accessing a storage unit of a memory card to manage files, the request receiving unit receiving a request for securing an area of the storage unit from a processing system inside the memory card, Area securing means for securing the area of the storage means based on the request received by the request receiving means, and a file for reflecting information of the area secured by the area securing means in the file management information for itself A terminal device comprising: an information processing unit; and a reserved area transmitting unit for transmitting information on the area secured by the area securing unit to a processing system inside the memory card.
【請求項11】 前記ファイル情報処理手段は、 前記領域確保手段によって確保された領域のファイル管
理情報として架空ファイルを登録することを特徴とする
請求項10記載の端末装置。
11. The terminal device according to claim 10, wherein the file information processing unit registers a fictitious file as file management information of the area secured by the area securing unit.
【請求項12】 前記ファイル情報処理手段は、 前記領域確保手段によって確保された領域を不良領域と
して前記ファイル管理情報に登録することを特徴とする
請求項10記載の端末装置。
12. The terminal device according to claim 10, wherein the file information processing unit registers the area secured by the area securing unit as a defective area in the file management information.
【請求項13】 メモリカード内部の処理系と端末装置
の処理系とからアクセスされる記憶手段を有するメモリ
カードであって、 前記メモリカード内部の処理系は、 前記端末装置の処理系に対してサイズを指定して前記記
憶手段の領域の確保を要求する領域確保要求手段と、 前記端末装置の処理系から確保領域の通知を受信する確
保領域受信手段と、 前記記憶手段の前記確保領域にデータの書き込み処理を
行う書込手段と、 前記確保領域に書き込まれたデータの書き込み位置の情
報を前記メモリカード内部の処理系のみが参照可能な状
態で格納する書込位置情報格納手段と、 を有することを特徴とするメモリカード。
13. A memory card having storage means accessed from a processing system inside the memory card and a processing system of the terminal device, wherein the processing system inside the memory card is different from the processing system of the terminal device. An area reservation requesting unit that requests a reservation of the area of the storage unit by specifying a size, a reservation area receiving unit that receives a notification of the reservation area from the processing system of the terminal device, and a data in the reservation area of the storage unit. And a write position information storage unit for storing information on the write position of the data written in the reserved area in a state where only the processing system inside the memory card can refer to the write position information. A memory card characterized by that.
【請求項14】 メモリカード内部の処理系と端末装置
の処理系とからアクセスされる記憶手段を有するメモリ
カードであって、 前記メモリカード内部の処理系は、 前記端末装置の処理系に対してサイズを指定して前記記
憶手段の領域の確保を要求する領域確保要求手段と、 前記端末装置の処理系から確保領域の通知を受信する確
保領域受信手段と、 前記確保領域を記憶し、記憶した前記確保領域から書き
込み領域を指定して残った空き領域を記憶する空き領域
記憶手段と、 前記空き領域記憶手段により指定された前記書き込み領
域にデータの書き込み処理を行う書込手段と、 前記書き込み領域に書き込んだデータの書き込み位置の
情報を前記メモリカード内部の処理系のみが参照可能な
状態で格納する書込位置情報格納手段と、 を有することを特徴とするメモリカード。
14. A memory card having storage means accessed from a processing system inside the memory card and a processing system of the terminal device, wherein the processing system inside the memory card is different from the processing system of the terminal device. An area reservation requesting unit that requests a reservation of an area of the storage unit by specifying a size, a reservation area receiving unit that receives a notification of the reservation area from the processing system of the terminal device, and the reservation area is stored and stored. A free area storage unit that stores a remaining free area by designating a write area from the reserved area; a writing unit that performs data writing processing to the write area designated by the free area storage unit; Write position information storage means for storing the write position information of the data written in the memory card in a state in which only the processing system inside the memory card can refer to it. Memory card, characterized in that.
【請求項15】 前記空き領域記憶手段は、 新たにデータを書き込むために必要な前記記憶手段の領
域が前記空き領域より小さい場合には、前記空き領域を
書き込み領域として指定し、前記必要領域が前記空き領
域より大きい場合には、新たな領域の確保を前記領域確
保要求手段を通じて前記端末装置の処理系に要求するこ
とを特徴とする請求項14記載のメモリカード。
15. The free area storage means, when the area of the storage means required to newly write data is smaller than the free area, designates the free area as a write area, 15. The memory card according to claim 14, wherein, when the area is larger than the free area, a new area is requested to the processing system of the terminal device through the area reservation requesting means.
【請求項16】 前記空き領域記憶手段は、 前記記憶手段の領域に格納されているデータの一部が削
除されたときには、データが削除された領域を空き領域
として記憶し、前記空き領域が一定の条件を満たしたと
きに、前記空き領域の解放を、前記領域確保要求手段を
通じて前記端末装置の処理系に要求することを特徴とす
る請求項14記載のメモリカード。
16. The free space storage means, when a part of the data stored in the area of the storage means is deleted, stores the deleted area of the data as a free space, and the free space is fixed. 15. The memory card according to claim 14, wherein the processing system of the terminal device is requested to release the empty area through the area reservation requesting means when the condition of is satisfied.
【請求項17】 前記書込位置情報格納手段は、 前記データの書き込み位置の情報を前記記憶手段の既に
確保された領域に書き込む位置情報書込手段と、 前記位置情報書込手段が前記書き込み位置の情報を書き
込んだ格納位置を記憶する管理情報検索手段と、 から成ることを特徴とする請求項13または請求項14
のいずれかに記載のメモリカード。
17. The write position information storage means writes position information of the data in a previously secured area of the storage means, and the position information write means writes the write position. 15. A management information searching means for storing a storage position in which the information of (1) is written, and
A memory card according to any one of.
【請求項18】 前記確保領域へのデータ書き込み順序
を決定する書込順序決定手段をさらに有し、前記書込手
段は、前記書込順序決定手段によって決定された書き込
み順序に従ってデータの書き込み処理を行うことを特徴
とする請求項13または請求項14のいずれかに記載の
メモリカード。
18. A writing order determining means for determining a writing order of data to the reserved area is further provided, and the writing means performs a data writing process in accordance with the writing order determined by the writing order determining means. 15. The memory card according to claim 13, wherein the memory card is executed.
【請求項19】 前記確保領域へのデータ書き込み順序
を決定する書込順序決定手段をさらに有し、前記データ
の書き込み位置の情報を書き込む位置情報書込手段は、
前記書込順序決定手段によって決定された書き込み順序
で前記書き込み位置の情報を書き込み、前記管理情報検
索手段は、前記書き込み順序を記憶することを特徴とす
る請求項17記載のメモリカード。
19. A position information writing unit for writing information of a writing position of the data, further comprising a writing order deciding unit for deciding a writing order of data in the reserved area.
18. The memory card according to claim 17, wherein the information of the writing position is written in the writing order determined by the writing order determining means, and the management information searching means stores the writing order.
【請求項20】 メモリカードの記憶手段にアクセスし
てファイル管理を行う端末装置のためのコンピュータプ
ログラムであって、 コンピュータに、 前記メモリカードから前記記憶手段の領域の確保の要求
を受け付ける要求受付手順と、 前記要求受付手順で受け付けた要求に基づいて前記記憶
手段の領域を確保する領域確保手順と、 前記領域確保手順で確保した領域の情報を自己のための
ファイル管理情報に反映させるファイル情報処理手順
と、 前記領域確保手順で確保した領域の情報を前記メモリカ
ードに伝える確保領域通知手順と、 を実行させるためのプログラム。
20. A computer program for a terminal device for accessing a storage unit of a memory card to perform file management, the request receiving procedure for receiving a request to secure an area of the storage unit from the memory card to a computer. An area reservation procedure for reserving an area of the storage unit based on a request received in the request reception procedure, and file information processing for reflecting information of the area reserved in the area reservation procedure in self-owned file management information A program for executing a procedure, and a reserved area notification procedure for transmitting information on the area secured in the area securing procedure to the memory card.
【請求項21】 メモリカード内部の処理系と端末装置
の処理系とからアクセスされる記憶手段を有するメモリ
カードのためのコンピュータプログラムであって、 コンピュータに、 前記端末装置に対してサイズを指定して前記記憶手段の
領域の確保を要求する領域確保要求手順と、 前記端末装置から確保領域の通知を受信する確保領域受
信手順と、 前記記憶手段の前記確保領域にデータを書き込むデータ
書込手順と、 前記確保領域に書き込んだデータの書き込み位置の情報
を前記記憶手段の既に確保された領域に書き込む書き込
み位置情報書込手順と、 前記書き込み位置の情報を書き込んだ格納位置を記録す
る書込領域記録手順と、 を実行させるためのプログラム。
21. A computer program for a memory card having storage means accessed from a processing system inside a memory card and a processing system of a terminal device, the computer program specifying a size for the terminal device. Area reservation requesting procedure for requesting an area reservation of the storage means, a reserved area receiving procedure for receiving a notification of the reserved area from the terminal device, and a data writing procedure for writing data in the reserved area of the storage means. A write position information writing procedure for writing information on the write position of the data written in the reserved region to the already secured region of the storage means, and a write region recording for recording the storage position where the write position information is written A program that causes you to perform steps and.
【請求項22】 カード内の処理系と端末装置とからア
クセスされる記憶手段を有するメモリカードのためのコ
ンピュータプログラムであって、 コンピュータに、 前記端末装置に対してサイズを指定して前記記憶手段の
領域の確保を要求する領域確保要求手順と、 前記端末装置から確保領域の通知を受信する確保領域受
信手順と、 前記確保領域の中から選択した書き込み領域にデータを
書き込むデータ書込手順と、 前記書き込み領域に書き込んだデータの書き込み位置の
情報を前記記憶手段の既に確保された領域に書き込む書
込位置情報書込手順と、 前記書き込み位置の情報を書き込んだ格納位置を記録す
る書込領域記録手順と、 を実行させるためのプログラム。
22. A computer program for a memory card having a storage means accessed from a processing system in the card and a terminal device, wherein the storage means specifies to a computer a size for the terminal device. An area reservation request procedure for requesting an area reservation, a reserved area reception procedure for receiving a notification of a reserved area from the terminal device, and a data writing procedure for writing data to a write area selected from the reserved area, A write position information writing procedure for writing information on the write position of the data written in the write region to the already secured region of the storage means, and a write region record for recording the storage position where the information on the write position is written A program that causes you to perform steps and.
JP2002225290A 2001-08-09 2002-08-01 File management method and memory card and terminal device using the same Expired - Fee Related JP4057858B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002225290A JP4057858B2 (en) 2001-08-09 2002-08-01 File management method and memory card and terminal device using the same

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP2001-242499 2001-08-09
JP2001242499 2001-08-09
JP2002225290A JP4057858B2 (en) 2001-08-09 2002-08-01 File management method and memory card and terminal device using the same

Publications (2)

Publication Number Publication Date
JP2003123030A true JP2003123030A (en) 2003-04-25
JP4057858B2 JP4057858B2 (en) 2008-03-05

Family

ID=26620292

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002225290A Expired - Fee Related JP4057858B2 (en) 2001-08-09 2002-08-01 File management method and memory card and terminal device using the same

Country Status (1)

Country Link
JP (1) JP4057858B2 (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006059261A (en) * 2004-08-23 2006-03-02 Sony Corp Memory card and reproducer
JP2006065401A (en) * 2004-08-24 2006-03-09 Sony Corp Memory card and its producing method
JP2006285669A (en) * 2005-03-31 2006-10-19 Toshiba Corp Host apparatus
WO2007007493A1 (en) * 2005-07-12 2007-01-18 Megachips Corporation Content moving method
JP2011192318A (en) * 2004-01-26 2011-09-29 Panasonic Corp Semiconductor memory device
JP2011243149A (en) * 2010-05-21 2011-12-01 Renesas Electronics Corp Semiconductor device
JP2012181611A (en) * 2011-02-28 2012-09-20 Toshiba Corp Memory system

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011192318A (en) * 2004-01-26 2011-09-29 Panasonic Corp Semiconductor memory device
JP2006059261A (en) * 2004-08-23 2006-03-02 Sony Corp Memory card and reproducer
JP4655545B2 (en) * 2004-08-23 2011-03-23 ソニー株式会社 Memory card and playback device
JP2006065401A (en) * 2004-08-24 2006-03-09 Sony Corp Memory card and its producing method
JP4655547B2 (en) * 2004-08-24 2011-03-23 ソニー株式会社 Memory card and method for making the same
JP2006285669A (en) * 2005-03-31 2006-10-19 Toshiba Corp Host apparatus
WO2007007493A1 (en) * 2005-07-12 2007-01-18 Megachips Corporation Content moving method
JP2011243149A (en) * 2010-05-21 2011-12-01 Renesas Electronics Corp Semiconductor device
JP2012181611A (en) * 2011-02-28 2012-09-20 Toshiba Corp Memory system
US9454495B2 (en) 2011-02-28 2016-09-27 Kabushiki Kaisha Toshiba Memory system capable of prohibiting access to application software and system software

Also Published As

Publication number Publication date
JP4057858B2 (en) 2008-03-05

Similar Documents

Publication Publication Date Title
JP4322021B2 (en) Memory card
US6378071B1 (en) File access system for efficiently accessing a file having encrypted data within a storage device
US6829676B2 (en) Semiconductor memory card access apparatus, a computer-readable recording medium, an initialization method, and a semiconductor memory card
KR20050088121A (en) Memory device and electronic device using the same
JP4395302B2 (en) Semiconductor memory card and control method thereof
JPH01500379A (en) System for portable data carriers
US8266391B2 (en) Method for writing data of an atomic transaction to a memory device
US20080320253A1 (en) Memory device with circuitry for writing data of an atomic transaction
JP2013506910A (en) Write Once Read Many (WORM) Memory Device Authentication and Secure Ring
US7024532B2 (en) File management method, and memory card and terminal apparatus that make use of the method
US7013392B1 (en) File processing unit
CN107679371A (en) Software license control method, device, computer equipment and readable storage medium storing program for executing
US7167943B2 (en) Memory apparatus
KR100841982B1 (en) Memory card storing host identification information and access method thereof
JP4057858B2 (en) File management method and memory card and terminal device using the same
US9531541B2 (en) Cryptographic storage device controller
CN112632517A (en) Authentication method, system and device of USB storage equipment
JP2023081374A (en) Method and system for session-based secured access control on data storing system
JPH11232177A (en) Information recording and reproducing method
JP2004295405A (en) Data access device
JP2001035092A (en) Removable memory, removable memory drive and security control method
JP4434428B2 (en) Information terminal equipment
JP2006302241A5 (en)
JP2006301950A (en) Storage device and management module for the same
JP3660364B2 (en) IC card and IC card handling device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050524

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20070824

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070828

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20071025

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: 20071120

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20071214

R150 Certificate of patent or registration of utility model

Ref document number: 4057858

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20101221

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20101221

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20111221

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20111221

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20121221

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20121221

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20131221

Year of fee payment: 6

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313113

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees