JP4529156B2 - Method for confirming data writing to portable storage medium, portable storage medium, server, and system, - Google Patents

Method for confirming data writing to portable storage medium, portable storage medium, server, and system, Download PDF

Info

Publication number
JP4529156B2
JP4529156B2 JP2003146202A JP2003146202A JP4529156B2 JP 4529156 B2 JP4529156 B2 JP 4529156B2 JP 2003146202 A JP2003146202 A JP 2003146202A JP 2003146202 A JP2003146202 A JP 2003146202A JP 4529156 B2 JP4529156 B2 JP 4529156B2
Authority
JP
Japan
Prior art keywords
check value
server
storage medium
portable storage
data
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.)
Expired - Fee Related
Application number
JP2003146202A
Other languages
Japanese (ja)
Other versions
JP2004348542A (en
Inventor
宗志 深谷
太一 金子
和義 入澤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Dai Nippon Printing Co Ltd
Original Assignee
Dai Nippon Printing 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 Dai Nippon Printing Co Ltd filed Critical Dai Nippon Printing Co Ltd
Priority to JP2003146202A priority Critical patent/JP4529156B2/en
Publication of JP2004348542A publication Critical patent/JP2004348542A/en
Application granted granted Critical
Publication of JP4529156B2 publication Critical patent/JP4529156B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明は通信機能を有する情報処理端末内の携帯記憶媒体と通信網を介した遠隔地サーバ間におけるデータ書き込みの確認方法に関する。
【0002】
【従来の技術】
ICカードがセットされる携帯電話機等の携帯端末を介してネットワークで接続されたサーバーとの間にセキュアな通信を確立し、電子決済等を行えるようにすることなどがいろいろ提案されている(特許文献1)。
このような遠隔地のサーバーと携帯端末間で行われる処理は、携帯端末の断電や通信網の障害が発生することで処理が中断した場合は、もう一度同じ処理を最初から開始したり、処理自体を中止することになる。
【0003】
【特許文献1】
特開2002−324202号公報
【0004】
【発明が解決しようとする課題】
このように通信網を介した各エンティティ(実体)間の処理が中断してしまうことは十分に発生し得る。しかし、暗号化鍵のような機密性の高いデータを書き込む処理が中断したときに、カード内に正しくデータが書き込まれたかどうかを確認できないと、サーバー側の処理手続きの流れが不定となってしまう。例えば、データの書き込みに失敗し、処理要求の命令(コマンド)が消失した場合、ICカードに到達する前にデータ書き込みコマンドが消失したのか、データ書き込みコマンドのレスポンスがサーバーに到達する前に消失したのか不明である。このような場合、データの書き込みを確認するために、書き込んだであろうデータを読み出す方法も考えられるが機密性の高いデータを安易に耐タンパデバイスの外に出力することはセキュリティ面において適当ではない。また、同じように暗号鍵のような機密性の高いデータを連続で複数回書き込む試みを許すことは外部からの攻撃者に利用されかねない。このような点まで上記特許文献1には開示されていない。
【0005】
【課題を解決するための手段】
本発明は上記課題を解決しようとするもので、遠隔地のサーバーから携帯端末内のICカードへデータを書き込む場合、書き込まれたデータを読み出すことなく、書き込みが正常に行われたか否かを確認可能にすることを目的とする。
そのために本発明は、携帯記憶媒体とサーバーとが同じマスター鍵と、マスター鍵から生成した同じセッション鍵セットを有し、こられのセッション鍵セットを通信セッション毎に生成し、レスポンス認証コードを利用してセキュアな通信を行う環境において、携帯記憶媒体はサーバからデータ書き込みコマンドを受け取ってデータを書き込んだ際、前記コマンドとレスポンスデータとをセッション鍵で暗号化して生成したレスポンス認証コードをチェックバリューとして記憶するとともに、レスポンスメッセージを送信してサーバで前記チェックバリューを保存し、レスポンスメッセージが消失したとき、サーバは取得コマンドを送信してチェックバリューを取得し、保存してあるチェックバリューと比較検証することで機密性の高いデータが正しく書き込めたか否かを確認する方法であって、
セキュアチャンネル開設時、サーバから機密性を要しないデータをチェックバリューとして携帯記憶媒体へ送り、携帯記憶媒体では送られたチェックバリューをメモリに格納した後、レスポンスメッセージを返し、これをサーバで受け取ってチェックバリューとして保存することでチェックバリューの初期化を行い、
サーバからデータ書き込みコマンドを送ったとき、携帯記憶媒体側では、正常に処理が終了すると、記憶しているチェックバリューを新たに生成したチェックバリューに更新し、エラー処理時には、チェックバリューを別の値に更新するか、或いは初期化時のチェックバリューを保持し、
携帯記憶媒体からのレスポンスメッセージが消失したとき、セキュアチャンネルを閉塞して新たにセキュアチャンネルを開設し、サーバーから携帯記憶媒体へチェックバリュー取得コマンドを送信し、携帯記憶媒体からのレスポンスをサーバが受信できるまでセキュアチャンネルの閉塞と新たなセキュアチャンネルの開設、チェックバリュー取得コマンドの送信を行い、サーバはチェックバリューの取得ができたとき、既に取得保持しているチェックバリューと比較し、比較結果によりデータが正しく書き込めたか否かを確認することを特徴とする。
また、本発明は、複数のアプリケーションを格納し、各アプリケーション毎にチェックバリューを記憶し、上記確認方法において利用される携帯記憶媒体を特徴とする。
また、本発明は、複数のアプリケーションを格納し、各アプリケーション毎にチェックバリューを記憶する携帯記憶媒体とレスポンス認証コードを利用してセキュアな通信を行う上記確認方法において利用されるサーバーを特徴とする。
また、本発明は、上記携帯記憶媒体と上記サーバーとからなるシステムを特徴とする。
【0006】
【発明の実施の形態】
以下、本発明の実施の形態について説明する。なお、以下の実施の形態においては、ICカードを例にして説明するが、本発明はこれに限定されるものではなく、演算処理・記憶機能を有する携帯可能な情報処理記憶媒体(以下では、携帯記憶媒体と言う)に適用可能であり、また、以下の実施の形態における携帯端末は、携帯電話機に限らず、パソコン等の通信機能を有するあらゆる情報処理端末に適用可能である。
図1は本実施形態のシステムを説明する概念図である。
ICカード1は携帯電話機等の携帯端末2にセットされ、無線或いは有線でインターネット網等のネットワークを介して遠隔地のサーバー3と接続される。携帯端末を介したICカード1とサーバー3との間の通信は、処理要求の命令(コマンド)と、そのコマンドに対する応答(レスポンス)の対からなり、セキュアな通信チャンネルを開設して行われる。そのために、ICカードとサーバー側はそれぞれ同じマスター鍵を有していて、通信を開始するに際しては、相互に発生させた乱数とマスター鍵を用いた認証演算を行って相互認証するとともに、マスター鍵から生成したC−MAC生成用、コマンドデータ暗号化用、R−MAC生成用の同じセッション鍵セットを互いにもち、これらのセッション鍵セットは通信セッション毎に生成される。
【0007】
MAC(Message Authenticate Code )は、データが改ざんされていないか否かの確認のために送信データを暗号化したメッセージ認証コードであり、送信データとともに送られる。C−MACはサーバー側でコマンドをセッション鍵で暗号化して生成したコマンドメッセージ認証コード、R−MACはICカード側で復号化したコマンドとレスポンスデータとをセッション鍵で暗号化して生成したレスポンスメッセージ認証コードである。
【0008】
サーバー側からICカードに対して送信するコマンドは、図2に示すように、コマンドの内容や送信するデータの長さ等を示すヘッダとコマンドデータとからなり、このコマンドをC−MAC生成用セッション鍵で暗号化してC−MACを生成し、コマンドデータ暗号化用セッション鍵を用いてコマンドデータを暗号化し、(ヘッダ+暗号化したコマンドデータ+C−MAC)をコマンドメッセージとしてICカードへ送信する。
ICカード側では、受信したコマンドを復号してその処理を実行し、復号化したコマンドとレスポンスデータをR−MAC生成用セッション鍵で暗号化してR−MACを生成して不揮発性メモリに記憶するとともに、(レスポンスデータ+R−MAC)をレスポンスメッセージとしてサーバーへ返す。
【0009】
図3は本実施形態で用いるMAC生成アルゴリズムを説明する図である。
この例ではDES暗号のCBC(Cypher Block Chaining )モードで生成する。サーバー側では、コマンド(ヘッダ+コマンドデータ)を8バイト単位に分割し、C−MAC生成用のセッション鍵でDES暗号化し、前の8バイトの暗号化データとの排他的論理和を順次生成してC−MACを生成する。なお、最初の8バイトの排他的論理和の相手がICV(Initial Chaining Vector )であり、MAC生成のための初期値である。
ICカード側では復号化したコマンドとレスポンスデータをR−MAC生成用のセッション鍵を用い、C−MAC生成と同様にDES暗号のCBCモードでR−MACを生成する。なお、ここでの例ではMAC生成にDES暗号を用いているが、他の暗号方法を用いてもよいことは言うまでもない。
【0010】
本実施形態では、ICカードへデータを書き込む場合、書き込まれたデータを読み出すことなく、書き込まれたことを確認するために、ICカード側では受信した書き込みコマンドを実行するごとに生成するR−MAC値をチェックバリューとして記憶し、サーバーはこのチェックバリューを取得するコマンドを使用する。そして、ICカードではこのコマンドを受信すると、記憶しているチェックバリューをサーバー側へ返す。このR−MACはコマンドまたはレスポンスのシーケンスを保証することに利用できる。
【0011】
この点についてさらに説明すると、例えば、以下のシーケンス、
▲1▼機密性の高いデータを書き込むコマンドをICカードが受け取る。
▲2▼ICカードでは書き込み処理を実行する。
▲3▼ICカードでは、R−MACを生成してカード内に格納し、レスポンスデータ+R−MACをサーバーに対して送信する。
▲4▼何らかの理由で通信路においてレスポンスメッセージが消失する。
▲5▼サーバーはレスポンスが戻ってこないので異常と判断し、セキュアチャンネルを閉塞する。この時点でICカードはまだセキュアチャンネルを開設状態にある。
▲6▼サーバーは書き込み結果を知るために再度セキュアチャンネルを開設するコマンドをICカードに対して発行する。
▲7▼ICカードはセキュアチャンネル開設コマンド(このコマンドは開設中のコマンドと異なり、コマンドデータの暗号化やC−MACなどが付随していない)を受け取ると、条件に合わないコマンドと判断し、一旦現在のセキュアチャンネルセッションを閉塞し(サーバー側ではこのセッションを閉塞済み)、改めてセキュアチャンネルを開設するための処理を行う。
において、サーバーとICカード間で開設されたセッションが無効になると、セッション鍵も無効になる。
【0012】
なお、レスポンスメッセージの消失は、
・通信中にICカード自身の電源が落ちた場合
・通信経路に障害が発生した場合
などに起こり、セキュアチャンネルの閉塞は、
・サーバー側から命令的にセッションを終了するというコマンドを送った場合
・不正なコマンドや、データの暗号化の約束が履行されていない場合
・条件に合わないコマンドを受信した場合
などに起こる。
【0013】
このようにレスポンスメッセージが消失した場合、その時のセキュアチャンネルセッションは閉塞され、サーバーはコマンドの実行結果を確かめるために、次のセキュアチャンネルセッションでチェックバリューとしてのR−MAC値を取得するコマンドをICカードに対して発行する。サーバー側では既に取得したR−MAC値やR−MAC生成用セッション鍵を保持しているので、取得したR−MACを検証し、前セキュアチャンネルセッションのR−MACであるか否かにより書き込みが正常であるか否かを確認できる。すなわち、取得したR−MACが初期値もしくは前回レスポンスが消失した結果に対する確認済みのR−MAC値である(前セキュアチャンネルセッションのR−MAC値ではない)と、書き込みは正常に行われなかったことになり、取得したR−MACが初期値もしくは前回レスポンスが消失した結果に対する確認済みのR−MAC値でない(前セキュアチャンネルセッションのR−MAC値である)と、書き込みは正常に行われたが、通信過程でレスポンスが消失したものであることが分かる。
【0014】
このようなレスポンスメッセージが消失した場合の書き込み確認の処理シーケンスを図4により説明する。
サーバーから機密性の高いデータをICカードに書き込む場合、相互認証を行い、セョション鍵セットを生成してセキュアチャンネルを開設し、チェックバリューの初期化を行う。チェックバリューの初期化は、機密性を要しない8バイトのデータをチェックバリューとしてICカードへ送り、ICカードではチェックバリューを不揮発性メモリに格納した後、レスポンスを返し、これをサーバーで受け取って保存することで行われる。この処理は正常にレスポンスが返るまで実施される。
【0015】
チェックバリューが初期化され、サーバーから秘密データの書き込みコマンドを送ったとき、ICカード側では、正常に処理が終了すると、記憶しているチェックバリューを生成したR−MACに更新し、エラー処理時にはチェックバリューを別の値に更新するか、或いは初期化時のチェックバリューを保持する。このとき何らかの理由によりレンスポンスメッセージが消失すると、前述したように、新たにセキュアチャンネルを開設する。そして、サーバー側からチェックバリューを取得するコマンドを送ってみて、レスポンスを受信できない場合は、このセキュアチャンネルを閉塞し、再びセキュアチャンネルを開設してチェックバリューを取得するコマンドを送る。こうしてレスポンスが取得できたとき、サーバーではセッション鍵、送信したコマンド、チェックバリューを保持しているので、R−MACを取得し、初期化されたチェックバリューから作成されたR−MAC値であれば、初めて書き込みが正常に行われたことが分かり、書き込みが正常に行われなかったときは、チェックバリューとして初期化されたままの8バイトのデータを取得することになる。
【0016】
さらに、以降のセキュアチャンネルセッションにおいて、機密データの書き込みコマンドを送り、何らかの理由でレスポンスが得られなかったときはそのセキュアチャンネルは閉塞し、次のセキュアチャンネル開設してチェックバリューを取得するコマンドを再度送信する。そして、このセキュアチャンネルセッションでチェックバリューを取得したとき、前セキュアチャンネルセッションのR−MAC値か、前々回のセキュアチャンネルセッションのR−MAC値かにより書き込みが正常に行われたか否かを確認することができる。
【0017】
なお、上記説明においては、ICカード側でサーバーとセェキュア通信するアプリケーションは1つで、1つのR−MACを生成して保持する例について説明したが、ICカードに複数のアプリケーションが格納され、それぞれのアプリケーションがサーバーとセキュアな通信をする場合には、アプリケーション毎にR−MACを生成して保持するようにすれば、アプリケーション毎にデータの書き込みの確認を行うことができる。
〔実施例〕
前提として、携帯端末内のICカードと遠隔地のサーバー間はGlobal Platform が策定したGlobal Platform Gard Specification 2.1.1内に規定されている Secure Channel Protocol 02を使用すると共に、要求されるSecurity Levelを、・コマンドデータの暗号化
・送信メッセージのメッセージ認証コードC−MAC有り(DES暗号のCBCモードにより生成)
・レスポンスメッセージのメッセージ認証コードR−MAC有り(DES暗号のCBCモードにより生成)
とする。CBCモードのICVには前セッションのメッセージ認証コードを使用する。
【0018】
機密性の高いデータを書き込むコマンドがサーバーからアプリケーションへ届き、処理が正常に行われてR−MACが生成されるとカード内に保持する。もしこのコマンドのレスポンスがサーバーへ送信される途中で消失した場合、サーバーはR−MAC値を取得するコマンドを送信して取得する。サーバー側はコマンドが正常終了したときのレスポンスは予想することが可能なため、取得したR−MACを検証することができ、書き込みが正常に終了したか、失敗したかを改めてデータを読み出したり上書きすることなく判断することできる。
【0019】
【発明の効果】
以上のように本発明によれば、遠隔地のサーバーから携帯記憶媒体へ機密性の高い読み出すことができないデータを書き込む場合、書き込まれたデータを読み出すことなく、チェックバリューを取得することにより書き込みが正常に終了したか、失敗したかを確認することが可能となる。
また、データ書き込みコマンドが携帯記憶媒体に到達する前に消失したのか、データ書き込みコマンドのレスポンスがサーバーに到達する前に消失したのかを明らかにすることが可能となる。
【図面の簡単な説明】
【図1】 本実施形態のシステムを説明する概念図である。
【図2】 コマンドを説明する図である。
【図3】 MAC生成アルゴリズムを説明する図である。
【図4】 書き込み確認の処理シーケンスを説明する図である。
【符号の説明】
1…ICカード、2…携帯端末、3…サーバー。
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a method for confirming data writing between a portable storage medium in an information processing terminal having a communication function and a remote server via a communication network.
[0002]
[Prior art]
Various proposals have been made to establish secure communication with a server connected via a network via a portable terminal such as a cellular phone in which an IC card is set so that electronic payment can be performed (patents). Reference 1).
If the processing is interrupted due to the power failure of the mobile device or the failure of the communication network, the same processing can be started again from the beginning, It will cancel itself.
[0003]
[Patent Document 1]
Japanese Patent Laid-Open No. 2002-324202
[Problems to be solved by the invention]
As described above, it is sufficiently possible that processing between entities (substances) via the communication network is interrupted. However, if the process of writing highly confidential data such as an encryption key is interrupted, it cannot be confirmed whether the data has been correctly written in the card. . For example, when data writing fails and a processing request instruction (command) is lost, the data writing command is lost before reaching the IC card, or the response to the data writing command is lost before reaching the server It is unknown. In such a case, in order to confirm the data writing, there may be a method of reading the data that would have been written. However, it is not appropriate in terms of security to easily output confidential data outside the tamper-resistant device. Absent. Similarly, it may be used by external attackers to allow attempts to write highly confidential data such as encryption keys multiple times in succession. Such a point is not disclosed in Patent Document 1.
[0005]
[Means for Solving the Problems]
The present invention is intended to solve the above-mentioned problem, and when writing data from a remote server to an IC card in a portable terminal, it is confirmed whether or not the writing is normally performed without reading the written data. The purpose is to make it possible.
For this purpose, the present invention provides that the portable storage medium and the server have the same master key and the same session key set generated from the master key, generate these session key sets for each communication session, and use the response authentication code. In a secure communication environment, when the portable storage medium receives a data write command from the server and writes the data, the response authentication code generated by encrypting the command and response data with the session key is used as a check value. The server stores the check value by sending a response message, and when the response message disappears, the server sends an acquisition command to acquire the check value, and compares it with the stored check value. It ’s a highly sensitive day Is a method for confirming whether or not correctly written,
When establishing a secure channel, data that does not require confidentiality is sent from the server to the portable storage medium as a check value, and after the stored check value is stored in the memory, a response message is returned and received by the server. Initialize the check value by storing it as a check value,
When a data write command is sent from the server, on the portable storage medium side, when the processing is completed normally, the stored check value is updated to the newly generated check value. Or check value at the time of initialization,
When the response message from the portable storage medium disappears, the secure channel is closed, a new secure channel is opened, a check value acquisition command is sent from the server to the portable storage medium, and the server receives the response from the portable storage medium The secure channel is blocked, a new secure channel is opened, and a check value acquisition command is sent until the check value is acquired. When the check value is acquired, the server compares it with the check value that has already been acquired and holds the data based on the comparison result. It is characterized by confirming whether or not can be written correctly.
In addition, the present invention is characterized by a portable storage medium that stores a plurality of applications, stores a check value for each application, and is used in the confirmation method.
In addition, the present invention is characterized by a server used in the confirmation method for storing a plurality of applications, storing a check value for each application, and performing secure communication using a response authentication code. .
Further, the present invention is characterized by a system including the portable storage medium and the server.
[0006]
DETAILED DESCRIPTION OF THE INVENTION
Embodiments of the present invention will be described below. In the following embodiments, an IC card will be described as an example. However, the present invention is not limited to this, and a portable information processing storage medium having an arithmetic processing / storage function (hereinafter, The portable terminal in the following embodiments is not limited to a cellular phone, and can be applied to any information processing terminal having a communication function such as a personal computer.
FIG. 1 is a conceptual diagram illustrating the system of this embodiment.
The IC card 1 is set in a portable terminal 2 such as a cellular phone, and is connected to a remote server 3 via a network such as the Internet by wireless or wired. Communication between the IC card 1 and the server 3 via the portable terminal is made up of a pair of a processing request command (command) and a response (response) to the command, and is established by establishing a secure communication channel. For this purpose, the IC card and the server side have the same master key, and when starting communication, mutual authentication is performed by performing an authentication operation using a random number and a master key that are generated mutually. Have the same session key set for C-MAC generation, command data encryption, and R-MAC generation, and these session key sets are generated for each communication session.
[0007]
The MAC (Message Authenticate Code) is a message authentication code obtained by encrypting transmission data to check whether or not the data has been tampered with, and is sent together with the transmission data. C-MAC is a command message authentication code generated by encrypting a command with a session key on the server side, and R-MAC is a response message authentication generated by encrypting a command and response data decrypted on the IC card side with a session key. Code.
[0008]
As shown in FIG. 2, the command transmitted from the server side to the IC card is composed of a header indicating the content of the command, the length of data to be transmitted, and the command data. C-MAC is generated by encryption with a key, command data is encrypted using a session key for command data encryption, and (header + encrypted command data + C-MAC) is transmitted as a command message to the IC card.
On the IC card side, the received command is decrypted and processed, and the decrypted command and response data are encrypted with the R-MAC generation session key to generate the R-MAC and store it in the nonvolatile memory. At the same time, (response data + R-MAC) is returned to the server as a response message.
[0009]
FIG. 3 is a diagram for explaining a MAC generation algorithm used in this embodiment.
In this example, the DES encryption is generated in a CBC (Cypher Block Chaining) mode. On the server side, the command (header + command data) is divided into 8-byte units, DES encrypted with the session key for C-MAC generation, and exclusive OR with the previous 8-byte encrypted data is generated sequentially. To generate a C-MAC. The partner of the first 8-byte exclusive OR is ICV (Initial Chaining Vector), which is an initial value for generating a MAC.
On the IC card side, the decrypted command and response data are generated using the session key for R-MAC generation, and the R-MAC is generated in the CBC mode of DES encryption in the same manner as the C-MAC generation. In this example, DES encryption is used for MAC generation, but it goes without saying that other encryption methods may be used.
[0010]
In this embodiment, when data is written to the IC card, the IC card side generates an R-MAC each time the received write command is executed in order to confirm that the data has been written without reading the written data. The value is stored as a check value, and the server uses a command to obtain this check value. When the IC card receives this command, it returns the stored check value to the server side. This R-MAC can be used to guarantee a command or response sequence.
[0011]
To further explain this point, for example, the following sequence:
(1) The IC card receives a command for writing highly confidential data.
(2) The IC card executes a writing process.
(3) In the IC card, R-MAC is generated and stored in the card, and response data + R-MAC is transmitted to the server.
(4) The response message disappears in the communication path for some reason.
(5) Since the response does not return, the server determines that the server is abnormal and closes the secure channel. At this point, the IC card is still in a state of opening a secure channel.
(6) The server issues a command to open a secure channel again to the IC card in order to know the writing result.
(7) When the IC card receives a secure channel opening command (this command is different from the command being opened and does not include command data encryption or C-MAC), the IC card determines that the command does not meet the conditions, Once the current secure channel session is closed (the session is already closed on the server side), a process for establishing a secure channel is performed again.
When the session established between the server and the IC card becomes invalid, the session key becomes invalid.
[0012]
In addition, the loss of the response message
・ When the power of the IC card itself drops during communication ・ When a failure occurs in the communication path, the secure channel is blocked.
・ When a command to end a session is sent from the server side. ・ An illegal command or a data encryption promise has not been fulfilled. ・ A command that does not meet the conditions is received.
[0013]
When the response message is lost as described above, the secure channel session at that time is blocked, and the server obtains an R-MAC value as a check value in the next secure channel session in order to confirm the execution result of the command. Issue to card. Since the server side already holds the acquired R-MAC value and R-MAC generation session key, the acquired R-MAC is verified, and writing is performed depending on whether or not the R-MAC is the previous secure channel session. Whether it is normal can be confirmed. That is, if the acquired R-MAC is the initial value or the confirmed R-MAC value for the result of the previous response disappearing (not the R-MAC value of the previous secure channel session), the writing was not performed normally. Therefore, if the acquired R-MAC is not the initial value or the confirmed R-MAC value for the result of the previous response disappearing (the R-MAC value of the previous secure channel session), the writing was performed normally. However, it can be seen that the response is lost in the communication process.
[0014]
A write confirmation processing sequence when such a response message is lost will be described with reference to FIG.
When writing highly confidential data from the server to the IC card, mutual authentication is performed, a session key set is generated, a secure channel is opened, and a check value is initialized. The initialization of the check value sends 8-byte data that does not require confidentiality to the IC card as the check value. The IC card stores the check value in the non-volatile memory, returns a response, and receives it at the server for storage. It is done by doing. This process is performed until a response is returned normally.
[0015]
When the check value is initialized and the secret data write command is sent from the server, the IC card side updates the stored check value to the generated R-MAC when processing is completed normally. Update the check value to another value, or retain the check value at the time of initialization. If the response message disappears for some reason at this time, a new secure channel is established as described above. Then, when a command for obtaining a check value is sent from the server side and a response cannot be received, this secure channel is closed, a secure channel is opened again, and a command for obtaining the check value is sent. When the response can be acquired in this way, the server holds the session key, the transmitted command, and the check value. Therefore, the R-MAC is acquired and the R-MAC value created from the initialized check value is obtained. When it is found that writing has been performed normally for the first time and writing has not been performed normally, 8-byte data that has been initialized as a check value is acquired.
[0016]
Furthermore, in subsequent secure channel sessions, a command to write confidential data is sent, and if a response is not obtained for some reason, the secure channel is blocked, and the command to open the next secure channel and acquire the check value is again executed. Send. Then, when the check value is acquired in this secure channel session, it is confirmed whether or not the writing is normally performed based on the R-MAC value of the previous secure channel session or the R-MAC value of the previous secure channel session. Can do.
[0017]
In the above description, there is one application that performs secure communication with the server on the IC card side, and an example in which one R-MAC is generated and held is described. However, a plurality of applications are stored in the IC card, When the application performs secure communication with the server, it is possible to confirm data writing for each application by generating and holding the R-MAC for each application.
〔Example〕
As a premise, the Secure Channel Protocol 02 defined in Global Platform Gard Specification 2.1.1 established by Global Platform is used between the IC card in the mobile terminal and the remote server, and the required Security Level is -Encryption of command data-Message authentication code C-MAC for transmission messages (generated by DES encryption CBC mode)
・ With message authentication code R-MAC for response message (generated by CBC mode of DES encryption)
And The message authentication code of the previous session is used for the ICV in the CBC mode.
[0018]
When a command for writing highly confidential data arrives from the server to the application, processing is normally performed and an R-MAC is generated, the command is stored in the card. If the response of this command disappears in the middle of being sent to the server, the server sends and obtains a command for obtaining the R-MAC value. Since the server side can predict the response when the command is completed normally, the acquired R-MAC can be verified, and data can be read or overwritten to determine whether the writing has been completed normally or failed. It can be judged without doing.
[0019]
【The invention's effect】
As described above, according to the present invention, when writing data that cannot be read with high confidentiality from a remote server to a portable storage medium, writing is performed by acquiring the check value without reading the written data. It is possible to check whether the process has been completed normally or has failed.
It is also possible to clarify whether the data write command has disappeared before reaching the portable storage medium or whether the response to the data write command has disappeared before reaching the server.
[Brief description of the drawings]
FIG. 1 is a conceptual diagram illustrating a system according to an embodiment.
FIG. 2 is a diagram illustrating a command.
FIG. 3 is a diagram illustrating a MAC generation algorithm.
FIG. 4 is a diagram for explaining a write confirmation processing sequence;
[Explanation of symbols]
1 ... IC card, 2 ... mobile terminal, 3 ... server.

Claims (4)

携帯記憶媒体とサーバーとが同じマスター鍵と、マスター鍵から生成した同じセッション鍵セットを有し、こられのセッション鍵セットを通信セッション毎に生成し、レスポンス認証コードを利用してセキュアな通信を行う環境において、携帯記憶媒体はサーバからデータ書き込みコマンドを受け取ってデータを書き込んだ際、前記コマンドとレスポンスデータとをセッション鍵で暗号化して生成したレスポンス認証コードをチェックバリューとして記憶するとともに、レスポンスメッセージを送信してサーバで前記チェックバリューを保存し、レスポンスメッセージが消失したとき、サーバは取得コマンドを送信してチェックバリューを取得し、保存してあるチェックバリューと比較検証することで機密性の高いデータが正しく書き込めたか否かを確認する方法であって、
セキュアチャンネル開設時、サーバから機密性を要しないデータをチェックバリューとして携帯記憶媒体へ送り、携帯記憶媒体では送られたチェックバリューをメモリに格納した後、レスポンスメッセージを返し、これをサーバで受け取ってチェックバリューとして保存することでチェックバリューの初期化を行い、
サーバからデータ書き込みコマンドを送ったとき、携帯記憶媒体側では、正常に処理が終了すると、記憶しているチェックバリューを新たに生成したチェックバリューに更新し、エラー処理時には、チェックバリューを別の値に更新するか、或いは初期化時のチェックバリューを保持し、
携帯記憶媒体からのレスポンスメッセージが消失したとき、セキュアチャンネルを閉塞して新たにセキュアチャンネルを開設し、サーバーから携帯記憶媒体へチェックバリュー取得コマンドを送信し、携帯記憶媒体からのレスポンスをサーバが受信できるまでセキュアチャンネルの閉塞と新たなセキュアチャンネルの開設、チェックバリュー取得コマンドの送信を行い、サーバはチェックバリューの取得ができたとき、既に取得保持しているチェックバリューと比較し、比較結果によりデータが正しく書き込めたか否かを確認することを特徴とする携帯記憶媒体へのデータ書き込み確認方法。
The portable storage medium and the server have the same master key and the same session key set generated from the master key. These session key sets are generated for each communication session, and secure communication is performed using the response authentication code. In the environment where the portable storage medium receives the data write command from the server and writes the data , the portable storage medium stores the response authentication code generated by encrypting the command and the response data with the session key as a check value , and the response message When the server stores the check value and the response message is lost, the server sends an acquisition command to acquire the check value, and compares it with the stored check value for high confidentiality. Data was written correctly A method for confirming whether or not,
When establishing a secure channel, data that does not require confidentiality is sent from the server to the portable storage medium as a check value, and after the stored check value is stored in the memory, a response message is returned and received by the server. It initializes the check value by saving as a check value,
When a data write command is sent from the server, on the portable storage medium side, when the processing is completed normally, the stored check value is updated to the newly generated check value. Or check value at the time of initialization,
When the response message from the portable storage medium disappears, the secure channel is closed, a new secure channel is opened, a check value acquisition command is sent from the server to the portable storage medium, and the server receives the response from the portable storage medium The secure channel is blocked, a new secure channel is opened, and a check value acquisition command is sent until the check value is acquired. When the check value is acquired, the server compares it with the check value that has already been acquired and holds the data based on the comparison result. A method for confirming data writing to a portable storage medium, comprising: confirming whether or not the data has been correctly written.
複数のアプリケーションを格納し、各アプリケーション毎にチェックバリューを記憶することを特徴とする請求項1記載の確認方法において利用される携帯記憶媒体。  The portable storage medium used in the confirmation method according to claim 1, wherein a plurality of applications are stored and a check value is stored for each application. 複数のアプリケーションを格納し、各アプリケーション毎にチェックバリューを記憶する携帯記憶媒体とレスポンス認証コードを利用してセキュアな通信を行うことを特徴とする請求項1記載の確認方法において利用されるサーバー。  2. The server used in the confirmation method according to claim 1, wherein a secure communication is performed using a response authentication code and a portable storage medium storing a plurality of applications and storing a check value for each application. 請求項2記載の携帯記憶媒体と、請求項3記載のサーバーとからなるシステム。  A system comprising the portable storage medium according to claim 2 and the server according to claim 3.
JP2003146202A 2003-05-23 2003-05-23 Method for confirming data writing to portable storage medium, portable storage medium, server, and system, Expired - Fee Related JP4529156B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003146202A JP4529156B2 (en) 2003-05-23 2003-05-23 Method for confirming data writing to portable storage medium, portable storage medium, server, and system,

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003146202A JP4529156B2 (en) 2003-05-23 2003-05-23 Method for confirming data writing to portable storage medium, portable storage medium, server, and system,

Publications (2)

Publication Number Publication Date
JP2004348542A JP2004348542A (en) 2004-12-09
JP4529156B2 true JP4529156B2 (en) 2010-08-25

Family

ID=33533128

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003146202A Expired - Fee Related JP4529156B2 (en) 2003-05-23 2003-05-23 Method for confirming data writing to portable storage medium, portable storage medium, server, and system,

Country Status (1)

Country Link
JP (1) JP4529156B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013246672A (en) * 2012-05-28 2013-12-09 Toppan Printing Co Ltd Portable recording medium and terminal
JP2014063292A (en) * 2012-09-20 2014-04-10 Toshiba Corp Ic card, portable electronic device, and ic card reader/writer

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02187785A (en) * 1989-01-17 1990-07-23 Toshiba Corp Authenticating system
JP2000322535A (en) * 1999-05-06 2000-11-24 Ntt Data Corp Information processing method and system for ic card
JP2001195362A (en) * 2000-01-06 2001-07-19 Nippon Telegr & Teleph Corp <Ntt> Device and method for processing transaction and ic card with transaction processing function

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02187785A (en) * 1989-01-17 1990-07-23 Toshiba Corp Authenticating system
JP2000322535A (en) * 1999-05-06 2000-11-24 Ntt Data Corp Information processing method and system for ic card
JP2001195362A (en) * 2000-01-06 2001-07-19 Nippon Telegr & Teleph Corp <Ntt> Device and method for processing transaction and ic card with transaction processing function

Also Published As

Publication number Publication date
JP2004348542A (en) 2004-12-09

Similar Documents

Publication Publication Date Title
JP6592621B2 (en) Authentication network
US10565400B2 (en) Implementation of an integrity-protected secure storage
EP1801721B1 (en) Computer implemented method for securely acquiring a binding key for a token device and a secured memory device and system for securely binding a token device and a secured memory device
CN1717893B (en) Device keys
KR101714108B1 (en) Verifiable, leak-resistant encryption and decryption
US20060195402A1 (en) Secure data transmission using undiscoverable or black data
US10650373B2 (en) Method and apparatus for validating a transaction between a plurality of machines
US20030079122A1 (en) Method, system and computer program product for a trusted counter in an external security element for securing a personal communication device
KR20050084877A (en) Secure implementation and utilization of device-specific security data
WO2004002054A1 (en) Secure data transfer in mobile terminals and methods therefor
CN113691502B (en) Communication method, device, gateway server, client and storage medium
CN101999125A (en) System and method for improving restrictiveness on accessingsoftware applications
CN106789024B (en) A kind of remote de-locking method, device and system
CN111401901B (en) Authentication method and device of biological payment device, computer device and storage medium
JPH10145354A (en) Remote function changing method
US20030076957A1 (en) Method, system and computer program product for integrity-protected storage in a personal communication device
CN112787813A (en) Identity authentication method based on trusted execution environment
US20060053288A1 (en) Interface method and device for the on-line exchange of content data in a secure manner
JPS63278438A (en) Cryptographic system by secret cryptograph procedure
CN114513345A (en) Information transmission system, user device and information security hardware module
CN116455572A (en) Data encryption method, device and equipment
JP4529156B2 (en) Method for confirming data writing to portable storage medium, portable storage medium, server, and system,
JP3905170B2 (en) Processing system and client device
CN109302442A (en) A kind of data storage method of proof and relevant device
CN111651740B (en) Trusted platform sharing system for distributed intelligent embedded system

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060426

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20090608

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090612

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090807

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090911

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20091102

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20100122

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100421

A911 Transfer to examiner for re-examination before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20100506

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

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20100528

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

Ref document number: 4529156

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20130618

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20140618

Year of fee payment: 4

LAPS Cancellation because of no payment of annual fees