JP2005109869A - Method for managing encryption key - Google Patents

Method for managing encryption key Download PDF

Info

Publication number
JP2005109869A
JP2005109869A JP2003340459A JP2003340459A JP2005109869A JP 2005109869 A JP2005109869 A JP 2005109869A JP 2003340459 A JP2003340459 A JP 2003340459A JP 2003340459 A JP2003340459 A JP 2003340459A JP 2005109869 A JP2005109869 A JP 2005109869A
Authority
JP
Japan
Prior art keywords
key
management
file
content
encryption
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.)
Withdrawn
Application number
JP2003340459A
Other languages
Japanese (ja)
Inventor
Akira Yuasa
晶 湯浅
Yoshinori Hiramitsu
美紀 平光
Hiroyuki Wada
紘幸 和田
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 JP2003340459A priority Critical patent/JP2005109869A/en
Publication of JP2005109869A publication Critical patent/JP2005109869A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Storage Device Security (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To solve problems that a correct decryption key cannot be obtained even though a normal key management number is transmitted later if the encryption key is stored together with a wrong key management number when the encryption key is written and that a situation that the encryption key is stored together with the wrong key management number cannot be prevented because of having no means for verifying the wrong key management number when transmitted. <P>SOLUTION: A method for managing an encryption key comprises: a process for determining a management number for identifying contents, a process for retrieving an unused key number from a management file, a process for confirming that information representing the used/unused state of a key storage area corresponding to the key number retrieved in a key storage file is in an unused state, a process for registering the retrieved key number in an area corresponding to the determined management number in the management file, a process for setting the information representing the used/unused state of the key storage area corresponding to the retrieved key number in the key storage file to the used state, and a process for recording the encryption key in the key storage area corresponding to the retrieved key number in the key storage file. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

近年、デジタルネットワーク機器の高機能化や記録メディアの高速大容量化、特にSDメモリーカードに代表される小型大容量のメモリーカードシステムの低価格化と普及に伴って、これら小型大容量の記録メディアに画像情報、特に映画等を含む動画像情報や音楽情報、或いはこれらの幾つかを含むマルチメディアコンテンツを記録することが多く行われている。   In recent years, with the increase in functionality of digital network devices and the high-speed and large-capacity recording media, especially the low price and widespread use of small-sized and large-capacity memory card systems represented by SD memory cards, these small-sized and large-capacity recording media In many cases, image information, particularly moving image information including music or the like, music information, or multimedia contents including some of them is recorded.

しかしながら、これらマルチメディアコンテンツはそれぞれ著作権によって保護されているものであり、これら記録メディアには著作権を管理するためのセキュリティ機能、例えばコンテンツを暗号化して記録し、その読み出しと再生は所定の認証を経なければ行うことを許可しない制御機能が強く要請されている。   However, these multimedia contents are each protected by copyright, and security functions for managing the copyright, for example, the contents are encrypted and recorded on these recording media. There is a strong demand for a control function that does not allow to perform without authentication.

例えばSDメモリーカードは頑健なセキュリティ機能を標準で装備しており、画像情報や音楽情報の著作権管理、即ち正当な著作権者から正当な許諾を受けた者に対してのみ、その再生視聴を許可するような制御が簡単な構成で実現可能であり、このこともこれらのメモリーカードが画像情報や音楽情報の記録に多く利用されている一因である。   For example, an SD memory card is equipped with a robust security function as standard, and copyright management of image information and music information, that is, playback and viewing only for those who have received a valid license from a valid copyright holder Control that permits is possible with a simple configuration, which is one of the reasons why these memory cards are often used for recording image information and music information.

本特許出願に係る発明(以後単に、本発明とも言う)は、このようなSDメモリーカードを始めとする各種メモリーカードやその他各種の記録媒体に、各種の情報やコンテンツを暗号化して記録するための暗号鍵を記録して保存し、その暗号鍵が常に正常な状態に維持されるよう管理するための方法、及びこの方法をコンピュータによって実行するためのプログラム、及びこのプログラムを記録した記録媒体、更にこの方法を実行することのできる装置に関するものである。   The invention according to the present patent application (hereinafter simply referred to as the present invention) is for encrypting and recording various information and contents on various memory cards such as SD memory cards and various other recording media. A method for recording and storing the encryption key and managing the encryption key so that the encryption key is always maintained in a normal state, a program for executing the method by a computer, and a recording medium on which the program is recorded, Furthermore, it relates to an apparatus capable of carrying out this method.

従来の、メモリーカードにコンテンツを暗号化して記録し、そのための暗号鍵を管理するための方法に関しては、例えば下記特許文献1のICカード及びICカード利用装置に記載されたものがあった。   A conventional method for encrypting and recording content in a memory card and managing the encryption key therefor has been described, for example, in the IC card and IC card using device of Patent Document 1 below.

図12に下記特許文献1に記載された従来の暗号鍵管理法を実行するICカードとICカード利用装置の主要部のブロック構成図を示す。   FIG. 12 shows a block configuration diagram of main parts of an IC card and an IC card using device that execute the conventional encryption key management method described in Patent Document 1 below.

カード発行者が使用するICカード利用装置930は、カード発行用アプリケーション931とカード暗号化機能モジュール932と、R/Wドライバ部933及びカードR/W部934とを有している。   The IC card utilization device 930 used by the card issuer has a card issuing application 931, a card encryption function module 932, an R / W driver unit 933, and a card R / W unit 934.

カード発行用アプリケーション931は、カード発行者にカード発行のためのユーザインタフェースを提供し、発行者の要求に応じてカード暗号化機能モジュール932を利用してカード発行手続を実現するものであって、例えばJava(米国、サン・マイクロシステムズ社の登録商標)アプリケーションとして実装されている。   The card issuing application 931 provides a card issuer with a user interface for issuing a card, and implements a card issuing procedure using the card encryption function module 932 in response to a request from the issuer. For example, it is implemented as a Java (registered trademark of Sun Microsystems, Inc., USA) application.

カード発行用アプリケーション931は、カード発行処理を実行するための上位アプリケーションであり、カード発行者の要求に応じて、暗号化機能モジュール932のそれぞれのJava(米国、サン・マイクロシステムズ社の登録商標)メソッドを呼出すように、Java(米国、サン・マイクロシステムズ社の登録商標)メソッド毎に対応するカードアクセス要求(以下、カード命令ともいう)をカード暗号化機能モジュール932に送出する。   The card issuing application 931 is a host application for executing card issuing processing, and each Java (registered trademark of Sun Microsystems, Inc.) of the encryption function module 932 in response to a request from the card issuer. A card access request (hereinafter also referred to as a card command) corresponding to each Java (registered trademark of Sun Microsystems, USA) method is sent to the card encryption function module 932 so as to call the method.

カード発行用アプリケーション931が呼出すJava(米国、サン・マイクロシステムズ社の登録商標)メソッドには、例えば「鍵の選択」、「鍵のインポート」、「パーソナライズ」の各メソッドがあり、それぞれ「鍵の選択」、「鍵のインポート」、「パーソナライズ」の各カード命令を、カード暗号化機能モジュール932へ送出することによって呼び出され、戻り値をカード発行用アプリケーション931へ返送することによって終了する。   The Java (registered trademark of Sun Microsystems, USA) method called by the card issuing application 931 includes, for example, “key selection”, “key import”, and “personalization” methods. Each card command of “select”, “import key”, and “personalize” is called by sending it to the card encryption function module 932, and the return value is returned to the card issuing application 931, and the process is terminated.

カード暗号化機能モジュール932は、ICカード940内の鍵を利用したデータ暗号化機能を提供するモジュールであり、ICカード940へのコマンド送信を隠蔽し、上位アプリケーションへ直感的なインタフェースを提供するもので、例えばJava(米国、サン・マイクロシステムズ社の登録商標)クラスライブラリとして実装されている。   The card encryption function module 932 is a module that provides a data encryption function using a key in the IC card 940, conceals command transmission to the IC card 940, and provides an intuitive interface to a host application. For example, it is implemented as a Java (registered trademark of Sun Microsystems, Inc.) class library.

カード暗号化機能モジュール932は、これら上位のアプリケーション931から受け取るカード命令を解釈し、「鍵の選択」、「鍵のインポート」、「パーソナライズ」、「暗号化」、「復号」という5種類のJava(米国、サン・マイクロシステムズ社の登録商標)メソッドの何れかに移行し、対応するコマンドをR/Wドライバ部933及びカードR/W部934を経由してICカード940に送出し、この送出に対応してICカード940から受け取る実行結果(応答)情報を上位のアプリケーション931に返送し、Java(米国、サン・マイクロシステムズ社の登録商標)メソッドから復帰する。   The card encryption function module 932 interprets the card commands received from these higher-level applications 931 and provides five types of Java: “key selection”, “key import”, “personalization”, “encryption”, and “decryption”. (Registered trademark of Sun Microsystems, Inc., USA) The method is transferred to one of the methods, and the corresponding command is sent to the IC card 940 via the R / W driver unit 933 and the card R / W unit 934. The execution result (response) information received from the IC card 940 is returned to the higher-level application 931 and returned from the Java (registered trademark of Sun Microsystems, USA) method.

カード暗号化機能モジュール932は、例えばカード命令の1つである「オプションリスト取得」に相当するJava(米国、サン・マイクロシステムズ社の登録商標)メソッドに対しては、ICカード940が接続された時点で、最初にオプションリスト取得コマンドをR/Wドライバ部933とカードR/W部934とを経由してICカード940に送出する。   In the card encryption function module 932, for example, an IC card 940 is connected to a Java (registered trademark of Sun Microsystems, USA) method corresponding to “option list acquisition” which is one of card instructions. At this time, an option list acquisition command is first sent to the IC card 940 via the R / W driver unit 933 and the card R / W unit 934.

R/Wドライバ部933はカード暗号化機能モジュール932によって制御され、カードR/W部934を駆動するICカード・リーダライタ・ドライバである。   The R / W driver unit 933 is an IC card reader / writer driver that is controlled by the card encryption function module 932 and drives the card R / W unit 934.

例えばR/Wドライバ部933は、PC/SC用の各種ICカードR/Wドライバを一括管理するソフトウェア(例えば、PC/SCリソースマネージャ)と各種ICカードR/Wドライバとの組合せによって構成することもできる。   For example, the R / W driver unit 933 is configured by a combination of software (for example, a PC / SC resource manager) that collectively manages various IC card R / W drivers for PC / SC and various IC card R / W drivers. You can also.

尚、PC/SCとは、Windows(米国、マイクロソフト社の登録商標)上で、ICカードにアクセスするための仕組みである。   PC / SC is a mechanism for accessing an IC card on Windows (registered trademark of Microsoft Corporation, USA).

カードR/W部934はR/Wドライバ部933によって制御され、ICカード940内の情報を読み出し、書き込むことが可能なICカード・リーダライタである。   The card R / W unit 934 is an IC card reader / writer that is controlled by the R / W driver unit 933 and can read and write information in the IC card 940.

ICカード940は、一般的な(汎用的なものであってもよい)カードOS941、受信バッファ942、送信バッファ943、暗号化カードアプレット944、DES暗号装置945、及びトリプルDES暗号装置946を有しており、例えばJava(米国、サン・マイクロシステムズ社の登録商標)カードOSの搭載されたICカード(Java(米国、サン・マイクロシステムズ社の登録商標)カード)である。   The IC card 940 includes a general (may be general-purpose) card OS 941, a reception buffer 942, a transmission buffer 943, an encryption card applet 944, a DES encryption device 945, and a triple DES encryption device 946. For example, an IC card (Java (registered trademark of Sun Microsystems, Inc.) card) on which a Java (registered trademark of Sun Microsystems, USA) card OS is mounted.

カードOS941は、複数のカードアプレットを個別に実行可能であり、例えばJava(米国、サン・マイクロシステムズ社の登録商標)カードOSであって、暗号化カードアプレット944を制御する機能と、ICカード利用装置930から受けたデータを受信バッファ942に記憶する機能と、送信バッファ943内のデータをICカード利用装置930に送信する機能とを有している。   The card OS 941 can individually execute a plurality of card applets. For example, the card OS 941 is a Java (registered trademark of Sun Microsystems, Inc.) card OS that controls the encryption card applet 944 and uses an IC card. It has a function of storing data received from the device 930 in the reception buffer 942 and a function of transmitting data in the transmission buffer 943 to the IC card utilization device 930.

暗号化カードアプレット944はJava(米国、サン・マイクロシステムズ社の登録商標)カードOS上で動作するアプリケーション・ソフトウェアであり、ソースコードはJava(米国、サン・マイクロシステムズ社の登録商標)言語で記述され、この例ではパラメータ管理クラス947と、暗号化と鍵管理アプレットの機能を有する暗号化/鍵管理アプレットクラス948とから構成されている。   The encryption card applet 944 is application software that operates on a Java (registered trademark of Sun Microsystems, Inc.) card OS, and the source code is written in the Java (registered trademark of Sun Microsystems, Inc.) language. In this example, it is composed of a parameter management class 947 and an encryption / key management applet class 948 having encryption and key management applet functions.

パラメータ管理クラス947は、ICカード940に実装される鍵の種類と個数(管理パラメータ)を保持するものである。   The parameter management class 947 holds the type and number of keys (management parameters) mounted on the IC card 940.

暗号化/鍵管理アプレットクラス948は、利用者IDメモリ981と、パーソナライズ状態メモリ982と、鍵メモリ983と、この鍵メモリ983内の鍵(個別パラメータ)を用いて動作が記述されているメソッド(アルゴリズム)からなるプログラムであり、鍵の指定を含むプログラム実行要求を受け取った時、この指定された鍵を使い、CPUによって実行され、送信バッファ943及び受信バッファ941を経由してICカード940の外部と通信を行う。   The encryption / key management applet class 948 has a user ID memory 981, a personalized state memory 982, a key memory 983, and a method in which an operation is described using a key (individual parameter) in the key memory 983 ( When a program execution request including a key designation is received, the program is executed by the CPU using the designated key, and the outside of the IC card 940 via the transmission buffer 943 and the reception buffer 941 Communicate with.

暗号化/鍵管理アプレットクラス948はアプレットインストール時の初期化機能と、ICカード利用装置930から受信バッファ942に送られた「鍵の選択」コマンドと、「鍵のインポート」コマンドと、「パーソナライズ」コマンドと、「オプションリスト取得」コマンドと、「暗号化」コマンド又は「復号」コマンドとに対応して処理を実行し、実行結果を送信バッファ943を経由してICカード利用装置930に返送する。   The encryption / key management applet class 948 has an initialization function at the time of applet installation, a “key selection” command sent from the IC card utilization device 930 to the reception buffer 942, a “key import” command, and a “personalization”. The processing is executed in response to the command, the “option list acquisition” command, the “encryption” command, or the “decryption” command, and the execution result is returned to the IC card utilization apparatus 930 via the transmission buffer 943.

DES暗号装置945は、暗号化カードアプレット944によって制御され、暗号化カードアプレット944から与えられたデータに対して、DES方式による暗号化処理又は復号化処理を実行し、実行結果を暗号化カードアプレット944に送出する。   The DES encryption device 945 is controlled by the encryption card applet 944, executes encryption processing or decryption processing by the DES method for the data given from the encryption card applet 944, and the execution result is stored in the encryption card applet. 944.

トリプルDES暗号装置946も、暗号化カードアプレット944によって制御され、暗号化カードアプレット944から与えられたデータに対して、トリプルDES方式による暗号化処理又は復号化処理を実行し、実行結果を暗号化カードアプレット944に送出する。
特開2000−348146号公報
The triple DES encryption device 946 is also controlled by the encryption card applet 944, executes encryption processing or decryption processing by the triple DES method for the data given from the encryption card applet 944, and encrypts the execution result. Send to card applet 944.
JP 2000-348146 A

しかしながらこのような従来の暗号鍵管理方法では、暗号化の鍵は復号化の鍵を選択するために使用する鍵管理番号と共にICカード内に記憶され、ICカード利用装置から送られた鍵管理番号に対応するものが選択され、読み出されてICカード利用装置に送信され、ICカード利用装置において復号化が実行される。   However, in such a conventional encryption key management method, the encryption key is stored in the IC card together with the key management number used to select the decryption key, and is sent from the IC card using device. Is selected, read out, transmitted to the IC card using device, and decryption is executed in the IC card using device.

そこでこのICカード利用装置において入力された鍵管理番号が間違っていた時、本来の復号鍵に相当しない鍵管理番号がICカードに送信され、この鍵管理番号によって復号鍵が選択されて読み出され、この復号鍵がICカードに送信され、この復号鍵によって復号化が実行されるため、本来は正常な復号化ができなければならないにも拘らず、正常な復号化が行われず、ICカード利用装置の使用者が正当な権限を有するものでないとか、或いはICカードが正当なものでない、と判断されてしまうこととなった。   Therefore, when the key management number input in this IC card using device is wrong, a key management number not corresponding to the original decryption key is transmitted to the IC card, and the decryption key is selected and read by this key management number. Since this decryption key is transmitted to the IC card and decryption is executed with this decryption key, normal decryption is not performed even though normal decryption must be possible. It is determined that the user of the apparatus is not authorized or the IC card is not authorized.

又、新たな暗号鍵をICカードに書き込む時、誤った鍵管理番号と共にICカード内に記憶されてしまったならば、それ以後いくら正常な鍵管理番号をICカードに送信したとしても永久に本来の復号鍵を取り出すことはできず、その弊害はより一層深刻なものとなった。   Also, if a new encryption key is written in the IC card, if it is stored in the IC card together with an incorrect key management number, no matter how much the normal key management number is transmitted to the IC card after that, it is permanently The decryption key could not be extracted, and the adverse effect became even more serious.

そしてこのような従来のICカード内暗号鍵管理方法では、誤った鍵管理番号が送信された時にも、それを検証する手段を有していなかったため、暗号鍵を誤った鍵管理番号と共に記憶してしまう事態を未然に防止することができなかった。   In such a conventional IC card encryption key management method, even when an incorrect key management number is transmitted, there is no means for verifying it, so the encryption key is stored together with the incorrect key management number. It was not possible to prevent this situation.

更に又、誤った鍵管理番号がICカード内に記憶された状態で、新しいデータがその鍵管理番号に対応する鍵によって暗号化され記録されてしまうと、そのデータは正当な鍵管理番号や復号鍵によって復号化することはできないため、どの鍵管理番号や復号鍵で復号することができるのか解らず、そのデータは永久に失われてしまう結果となった。   Furthermore, if new data is encrypted and recorded with a key corresponding to the key management number in a state where an incorrect key management number is stored in the IC card, the data is stored in a valid key management number or a decryption key. Since it cannot be decrypted with a key, it does not know which key management number or decryption key can be used for decryption, and the data is lost forever.

本発明は上記課題を解決するために行われたもので、
本特許出願に係る請求項1に記載の発明は、
コンテンツを暗号化して記録再生するための暗号鍵を、管理する暗号鍵管理方法であって、
管理ファイルにおいて前記コンテンツを識別するための管理番号を決定する工程と、
前記管理ファイルから未使用の鍵番号を検索する工程と、
鍵保存ファイル内の前記検索した鍵番号に対応する鍵保存領域の使用未使用状態を表す情報が、未使用状態であることを確認する工程と、
前記管理ファイルの前記決定した管理番号に対応する領域に、前記検索した鍵番号を登録する工程と、
前記鍵保存ファイル内の前記検索した鍵番号に対応する鍵保存領域の使用未使用状態を表す情報を、使用状態に設定する工程と、
前記鍵保存ファイル内の前記検索した鍵番号に対応する鍵保存領域に、前記コンテンツの暗号鍵を記録する工程と、
前記決定した管理番号に対応するコンテンツを、前記暗号鍵によって暗号化して記録する工程と、
を有する暗号鍵管理方法である。
The present invention has been made to solve the above problems,
The invention according to claim 1 of the present patent application is
An encryption key management method for managing an encryption key for encrypting and recording and reproducing content,
Determining a management number for identifying the content in the management file;
Searching for an unused key number from the management file;
Confirming that the information indicating the unused state of the key storage area corresponding to the searched key number in the key storage file is in an unused state;
Registering the searched key number in an area corresponding to the determined management number of the management file;
Setting information indicating a used / unused state of a key storage area corresponding to the searched key number in the key storage file to a used state;
Recording an encryption key of the content in a key storage area corresponding to the searched key number in the key storage file;
A step of encrypting and recording the content corresponding to the determined management number with the encryption key;
Is an encryption key management method.

本特許出願に係る請求項2に記載の発明は、
前記コンテンツを識別するための管理番号を決定する工程は、前記決定した管理番号に対応するコンテンツが実際に存在しないことを確認する工程を含む、
請求項1に記載の暗号鍵管理方法である。
The invention according to claim 2 of the present patent application is
The step of determining a management number for identifying the content includes a step of confirming that content corresponding to the determined management number does not actually exist.
An encryption key management method according to claim 1.

本特許出願に係る請求項3に記載の発明は、
前記管理ファイルと前記コンテンツを暗号化して記録する領域とは、メモリーカードの通常領域に存在し、
前記鍵保存ファイルは前記メモリーカードの認証領域に存在する、
請求項1又は請求項2に記載の暗号鍵管理方法である。
The invention according to claim 3 of the present patent application is
The management file and the area where the content is encrypted and recorded are present in a normal area of the memory card,
The key storage file exists in the authentication area of the memory card,
An encryption key management method according to claim 1 or claim 2.

本特許出願に係る請求項4に記載の発明は、
前記管理ファイルにおける鍵番号の使用と未使用とは1つの鍵番号をコンピュータにおけるワード又はバイト中の1ビットに割り当てて記憶し、
前記鍵保存ファイル内の前記鍵保存領域の使用未使用状態を表す情報も1つの鍵保存領域を前記コンピュータにおけるワード又はバイト中の1ビットに割り当てて記憶し、
前記管理ファイルから未使用の鍵番号を検索する工程と前記鍵保存ファイル内の前記検索した鍵番号に対応する鍵保存領域が未使用状態であることを確認する工程とは、前記コンピュータにおけるビット論理演算によって検索と確認を行う工程である、
請求項1から請求項3の何れか1項に記載の暗号鍵管理方法である。
The invention according to claim 4 of the present patent application is
Use and non-use of the key number in the management file are stored by assigning one key number to one bit in a word or byte in the computer,
Information indicating the unused state of the key storage area in the key storage file is also stored by assigning one key storage area to one bit in a word or byte in the computer,
The step of searching for an unused key number from the management file and the step of confirming that the key storage area corresponding to the searched key number in the key storage file is unused are bit logics in the computer. It is a process of searching and checking by calculation.
The encryption key management method according to any one of claims 1 to 3.

本特許出願に係る請求項5に記載の発明は、
コンピュータによって実行される、
コンテンツを暗号化して記録再生するための暗号鍵を、管理する暗号鍵管理プログラムであって、
管理ファイルにおいて前記コンテンツを識別するための管理番号を決定するステップと、
前記管理ファイルから未使用の鍵番号を検索するステップと、
鍵保存ファイル内の前記検索した鍵番号に対応する鍵保存領域の使用未使用状態を表す情報が、未使用状態であることを確認するステップと、
前記管理ファイルの前記決定した管理番号に対応する領域に、前記検索した鍵番号を登録するステップと、
前記鍵保存ファイル内の前記検索した鍵番号に対応する鍵保存領域の使用未使用状態を表す情報を、使用状態に設定するステップと、
前記鍵保存ファイル内の前記検索した鍵番号に対応する鍵保存領域に、前記コンテンツの暗号鍵を記録するステップと、
前記決定した管理番号に対応するコンテンツを、前記暗号鍵によって暗号化して記録するステップと、
を有する暗号鍵管理プログラムである。
The invention according to claim 5 of the present patent application is
Executed by computer,
An encryption key management program for managing an encryption key for encrypting and recording and reproducing content,
Determining a management number for identifying the content in the management file;
Searching for an unused key number from the management file;
Confirming that the information indicating the unused state of the key storage area corresponding to the searched key number in the key storage file is in an unused state;
Registering the searched key number in an area corresponding to the determined management number of the management file;
Setting information indicating a used / unused state of a key storage area corresponding to the searched key number in the key storage file to a used state;
Recording an encryption key of the content in a key storage area corresponding to the searched key number in the key storage file;
Recording the content corresponding to the determined management number encrypted with the encryption key;
Is an encryption key management program.

本特許出願に係る請求項6に記載の発明は、
コンピュータ読み取り可能な記録媒体であって、請求項5に記載の暗号鍵管理プログラムを記録した記録媒体である。
The invention according to claim 6 of the present patent application is
A computer-readable recording medium on which the encryption key management program according to claim 5 is recorded.

本特許出願に係る請求項7に記載の発明は、
コンテンツを暗号化して記録再生するための暗号鍵を、管理する暗号鍵管理装置であって、
管理ファイルにおいて前記コンテンツを識別するための管理番号を決定する手段と、
前記管理ファイルから未使用の鍵番号を検索する手段と、
鍵保存ファイル内の前記検索した鍵番号に対応する鍵保存領域の使用未使用状態を表す情報が、未使用状態であることを確認する手段と、
前記管理ファイルの前記決定した管理番号に対応する領域に、前記検索した鍵番号を登録する手段と、
前記鍵保存ファイル内の前記検索した鍵番号に対応する鍵保存領域の使用未使用状態を表す情報を、使用状態に設定する手段と、
前記鍵保存ファイル内の前記検索した鍵番号に対応する鍵保存領域に、前記コンテンツの暗号鍵を記録する手段と、
前記決定した管理番号に対応するコンテンツを、前記暗号鍵によって暗号化して記録する手段と、
を有する暗号鍵管理装置である。
The invention described in claim 7 according to the present patent application is
An encryption key management device that manages an encryption key for recording and reproducing content after encrypting the content,
Means for determining a management number for identifying the content in the management file;
Means for retrieving an unused key number from the management file;
Means for confirming that the information indicating the unused state of the key storage area corresponding to the searched key number in the key storage file is in an unused state;
Means for registering the searched key number in an area corresponding to the determined management number of the management file;
Means for setting information indicating a used / unused state of a key storage area corresponding to the searched key number in the key storage file to a used state;
Means for recording an encryption key of the content in a key storage area corresponding to the searched key number in the key storage file;
Means for encrypting and recording the content corresponding to the determined management number with the encryption key;
Is an encryption key management device.

本発明によってメモリーカードやその他の記録媒体に多くのコンテンツを暗号鍵を使用して暗号化して記録再生する時、管理ファイルに記録している管理情報と鍵管理ファイルに記録している鍵番号とに不整合が生じた時にも鍵番号の二重登録を防止し、これによって既存コンテンツが復号化できず、使用不可能になることを防止することができる。   When recording and reproducing a large amount of content on a memory card or other recording medium using the encryption key according to the present invention, the management information recorded in the management file and the key number recorded in the key management file Even when inconsistency occurs, it is possible to prevent double registration of the key number, thereby preventing the existing content from being decrypted and unusable.

更に、このような不整合を含むシステムに対しても、上記管理情報と鍵番号との不整合を検証し、整合状態に復帰しなくても新規コンテンツをシステムへの登録保存が可能となる。   Further, even for a system including such an inconsistency, the inconsistency between the management information and the key number is verified, and new contents can be registered and stored in the system without returning to the consistent state.

更に又、このような不整合を含むシステムであっても、整合状態への検証と復帰とをカード挿入時又は電源投入時に行う必要はなく、空き時間等の任意の時に実行することができる。   Furthermore, even in a system including such inconsistencies, verification and restoration to a matching state need not be performed at the time of card insertion or power-on, and can be performed at any time such as a free time.

以下に本発明の実施の形態について、図面を参照しながら説明する。   Embodiments of the present invention will be described below with reference to the drawings.

(実施の形態1)
図1は、本発明の第1の実施の形態である、SDメモリーカード(単に、SDカードともいう)(101)内にコンテンツを暗号化して記録、保存、再生するための暗号鍵管理方法を実行する携帯電話装置(102)であり、或いは又、この方法をコンピュータによって実行するためのプログラムを記録した記録媒体を搭載し、搭載しているコンピュータによってこの暗号鍵管理方法を実行する携帯電話装置(102)でもあり、或いは更に又、この暗号鍵管理方法を実行することのできる装置でもある携帯電話装置(102)と、この携帯電話装置(102)に装着され、その内部の鍵ファイル領域(107)に記録保存する暗号鍵の管理が実行される対象であるSDカード(101)との、主要部のブロック構成図である。
(Embodiment 1)
FIG. 1 shows an encryption key management method for encrypting, recording, storing, and reproducing contents in an SD memory card (also simply referred to as an SD card) (101), which is a first embodiment of the present invention. A mobile phone device (102) to be executed, or a mobile phone device on which a recording medium recording a program for executing this method by a computer is mounted and the encryption key management method is executed by the mounted computer (102) or, in addition, a mobile phone device (102) that is also a device capable of executing this encryption key management method, and a key file area (internal) attached to the mobile phone device (102). 107) is a block configuration diagram of the main part of the SD card (101), which is a target for executing management of the encryption key recorded and stored in 107).

但し、本実施の形態では、本発明の暗号鍵管理方法を実行する携帯電話装置について説明するが、この方法を実行するのは携帯電話装置に限るものではなく、他の機器、例えば各種の情報処理機器であるパソコンやPDAやその他の機器でも良く、例えば調理器や洗濯機、掃除機、冷蔵庫、その他の各種家庭電化製品のような機器でも良く、複写機やFAXのような各種事務機器も良く、その他のあらゆる機器であっても構わない。   However, in this embodiment, a mobile phone device that executes the encryption key management method of the present invention will be described. However, this method is not limited to the mobile phone device, and other devices such as various information It may be a processing device such as a personal computer, PDA, or other device. For example, it may be a cooker, washing machine, vacuum cleaner, refrigerator, or other household appliances, and various office devices such as copiers and fax machines. It can be any other device.

又、この携帯電話装置に装着され、コンテンツや暗号鍵を記録する媒体も、1つの例として、SDメモリーカードについて説明するが、SDメモリーカードに限るものではなく、その他の各種メモリーカードであっても構わないし、その他の磁気的或いは光学的或いは化学的或いは物理的情報記録手段やこれらの組み合わせによって情報を記録する各種記録媒体であっても構わない。   In addition, an SD memory card will be described as an example of a medium that is attached to the cellular phone device and records content and an encryption key. However, the present invention is not limited to the SD memory card, and other various memory cards may be used. Alternatively, various recording media for recording information by other magnetic, optical, chemical or physical information recording means or a combination thereof may be used.

携帯電話装置(102)は、内部に制御部(104)とRAM(108)とSDカードインターフェース(SD I/Fとも言う)(103)とを有している。その他多くの構成部を有しているが、本発明と直接関係しないので説明は省略する。   The cellular phone device (102) includes a control unit (104), a RAM (108), and an SD card interface (also referred to as SD I / F) (103). Although there are many other components, they are not directly related to the present invention, and thus the description thereof is omitted.

コンピュータは制御部(104)に含まれ、プログラムはRAM(108)に記録保存され、このコンピュータによって実行される。   The computer is included in the control unit (104), and the program is recorded and stored in the RAM (108) and executed by the computer.

携帯電話装置(102)は、音声通信以外にデータ通信、特に動画像や静止画像を含むマルチメディアコンテンツ(単に、コンテンツとも言う)の通信を行うことができ、通信した画像情報の視聴(再生)や、保存を行うことができる。   The mobile phone device (102) can perform data communication in addition to voice communication, particularly multimedia content including moving images and still images (simply referred to as content), and view (reproduce) the communicated image information. Or you can save.

これらの制御を行うのが制御部(104)であり、コンテンツの保存を行うのがRAM(108)である。保存したコンテンツはSDカードインターフェース(103)を経由して着脱可能且つ大容量のSDカード(101)に記録保存することができる。   The control unit (104) performs these controls, and the RAM (108) stores contents. The stored content can be recorded and stored in a removable and large-capacity SD card (101) via the SD card interface (103).

SDカード(101)は内部にコンテンツファイル領域(106)と鍵ファイル領域(107)とを有しており、携帯電話装置(102)から送られてきたコンテンツはコンテンツファイル領域(106)に記録保存され、このコンテンツを暗号化するための鍵は鍵ファイル領域(107)に記録保存される。   The SD card (101) has a content file area (106) and a key file area (107) inside, and the content sent from the mobile phone device (102) is recorded and saved in the content file area (106). The key for encrypting this content is recorded and saved in the key file area (107).

このコンテンツファイル領域(106)は本発明に係る通常領域の第1の実施の形態であり、鍵ファイル領域(107)は本発明に係る認証領域の第1の実施の形態である。   The content file area (106) is the first embodiment of the normal area according to the present invention, and the key file area (107) is the first embodiment of the authentication area according to the present invention.

この記録保存の処理を行うのが制御部(105)である。SDカード(101)もその他多くの構成部を有しているが、本発明と直接関係しないので説明は省略する。   The controller (105) performs this recording / storing process. The SD card (101) also has many other components, which are not directly related to the present invention and will not be described.

鍵ファイル領域(107)は所定の認証処理、例えばパスワード入力や指紋照合のような生体認証、その他何らかの認証処理を経なければアクセスし、暗号鍵を取り出したり、保存することができない領域であり、コンテンツファイル領域はそのような認証処理を経ることなくアクセス可能な領域である。   The key file area (107) is an area that cannot be accessed and the encryption key cannot be extracted or stored without performing a predetermined authentication process, for example, biometric authentication such as password input or fingerprint verification, or any other authentication process. The content file area is an area that can be accessed without such authentication processing.

しかしながらこのようなコンテンツファイル領域(106)と鍵ファイル領域(107)との分割も1つの例であり、必ずしもこのように分割されていなくても構わないし、より細かく分割されていても構わないし、より多階層に分割されていても構わないし、より多様な領域に分割されていても構わない。   However, such division of the content file area (106) and the key file area (107) is also an example, and the division may not necessarily be performed in this way, or may be performed more finely. It may be divided into more layers, or may be divided into more various regions.

このようなSDカード(101)の記録部であるコンテンツファイル領域(106)と鍵ファイル領域(107)とは、大容量の記録部であり、このような大容量の記録部に高速且つ正確にデータを記録し検索するために、所定のファイルシステム構成が採用されている。   The content file area (106) and the key file area (107), which are recording parts of such an SD card (101), are large-capacity recording parts. In order to record and retrieve data, a predetermined file system configuration is employed.

そのファイルシステム構成の第1の実施の形態の概要を図2に示す。但し、図2に示すファイルシステム構成はあくまで1つの例であり、この構成でなければならないと言うのではない。   An overview of the first embodiment of the file system configuration is shown in FIG. However, the file system configuration shown in FIG. 2 is merely an example, and it does not have to be this configuration.

又、本実施の形態では、各領域毎にファイルシステム構成が存在するように説明しているが、複数或いは全ての領域を含むようにファイルシステム構成が存在しても構わない。   In this embodiment, the file system configuration is described so as to exist for each area, but the file system configuration may include a plurality or all of the areas.

SDカード(101)の記録部の全体は上記の通り、コンテンツファイル領域(106)と鍵ファイル領域(107)と、或いは実施の形態によっては他の領域とに分けられている。   As described above, the entire recording unit of the SD card (101) is divided into a content file area (106) and a key file area (107), or other areas depending on the embodiment.

それぞれの領域のファイルシステムの根元となる部分に、VIDEO_F_A(161)とVIDEO_F_B(171)と呼ばれるフォルダが設定される。   Folders called VIDEO_F_A (161) and VIDEO_F_B (171) are set in the base portion of the file system in each area.

このようなファイルシステム構成を有し、マルチメディアコンテンツを記録保存するSDカードは、SD_VIDEOカードと呼ばれることもある。   An SD card that has such a file system configuration and records and saves multimedia contents is sometimes called an SD_VIDEO card.

このVIDEO_F_A(161)とVIDEO_F_B(171)と呼ばれるフォルダも1つの例であり、必ずしもこのような名前でなくても構わないし、必ずしもこのようなフォルダを含んでいなくても構わないし、必ずしも2つのフォルダでなく、1つのフォルダであっても構わないし、3個以上のフォルダが存在しても構わない。   The folders called VIDEO_F_A (161) and VIDEO_F_B (171) are also examples, and may not necessarily have such names, and may not necessarily include such folders. There may be one folder instead of a folder, and there may be three or more folders.

コンテンツファイル領域(106)のVIDEO_F_Aフォルダ(161)には、管理フォルダ(162)と幾つかのコンテンツ格納フォルダ、図2の例では2つのコンテンツ格納フォルダ(163)とコンテンツ格納フォルダ(164)とを指し示す情報が記録されており、この情報を辿ることによって、これらの管理フォルダ(162)とコンテンツ格納フォルダ(163)とコンテンツ格納フォルダ(164)とにアクセスすることができる。   In the VIDEO_F_A folder (161) in the content file area (106), there are a management folder (162) and several content storage folders, two content storage folders (163) and a content storage folder (164) in the example of FIG. The pointing information is recorded, and by tracing this information, it is possible to access the management folder (162), the content storage folder (163), and the content storage folder (164).

例えば図2に示す例では、管理フォルダ(162)には2つの管理ファイル(165)と管理ファイル(166)とを指し示す情報が記録されており、この情報を辿ることによって管理ファイル(165)と管理ファイル(166)とにアクセスすることができる。   For example, in the example shown in FIG. 2, information indicating two management files (165) and a management file (166) is recorded in the management folder (162), and the management file (165) and the management file (165) are traced by this information. The management file (166) can be accessed.

管理ファイル(165)と管理ファイル(166)とは、例えば図2に示す例では、2つのコンテンツ格納フォルダ(163)とコンテンツ格納フォルダ(164)とに含まれる各種コンテンツに関する情報が記録保存されている。   In the management file (165) and the management file (166), for example, in the example shown in FIG. 2, information regarding various contents included in the two content storage folders (163) and the content storage folder (164) is recorded and saved. Yes.

1つの管理ファイル(この例では管理ファイル(165)又は管理ファイル(166))が、1つのコンテンツ格納フォルダ(この例ではコンテンツ格納フォルダ(163)又はコンテンツ格納フォルダ(164))とにそれぞれ1対1に対応していても構わないが、この実施の形態に示す例では、管理ファイル(165)と管理ファイル(166)とは両方が、コンテンツ格納フォルダ(163)とコンテンツ格納フォルダ(164)との両方に含まれるコンテンツに関する情報を分担して記録保存している。   One management file (in this example, management file (165) or management file (166)) is paired with one content storage folder (in this example, content storage folder (163) or content storage folder (164)). However, in the example shown in this embodiment, both the management file (165) and the management file (166) are the content storage folder (163) and the content storage folder (164). Information related to the content included in both is shared and recorded.

又、必ずしもこの管理ファイル(165)と管理ファイル(166)とは、2つのファイルがそれぞれ情報を分担して記録保存していなければならない訳ではなく、1つの管理ファイルで必要な情報を記録保存していても構わないし、3つ以上のファイルが分担して記録保存していても構わない。   In addition, the management file (165) and the management file (166) do not necessarily have to be recorded and saved by sharing information between the two files, but the necessary information is recorded and saved by one management file. It is also possible that three or more files are shared and recorded.

各管理ファイル(165)と管理ファイル(166)とには、コンテンツ格納フォルダ(163)とコンテンツ格納フォルダ(164)とに格納されている各種コンテンツに関する種々の管理項目データ、例えばタイトル、作成年月日、作成者、著作権に関する情報、画像情報の圧縮形式、音声情報の符号化方式、画像情報の画像サイズ、解像度、データ容量、動画像情報や音声情報の再生時間、その他必要な種々多くの情報が記録されている。   Each management file (165) and management file (166) includes various management item data relating to various contents stored in the content storage folder (163) and the content storage folder (164), such as titles, creation dates, etc. Date, creator, copyright information, image information compression format, audio information encoding method, image information image size, resolution, data capacity, playback time of moving image information and audio information, and various other necessary information Information is recorded.

それら多くの情報の中でも特に重要な項目として、コンテンツ格納フォルダ(163)とコンテンツ格納フォルダ(164)とに格納されているコンテンツが暗号化されている時には、その暗号鍵に関する情報を記録している鍵ファイル領域(107)内の管理ファイル(172)と鍵ファイル(173)とに含まれる鍵番号を示す情報が記録されている。   Among these many pieces of information, as the particularly important item, when the contents stored in the content storage folder (163) and the content storage folder (164) are encrypted, information regarding the encryption key is recorded. Information indicating the key numbers included in the management file (172) and the key file (173) in the key file area (107) is recorded.

この鍵ファイル(173)は本発明に係る鍵保存ファイルの第1の実施の形態である。   This key file (173) is the first embodiment of the key storage file according to the present invention.

コンテンツが暗号化されている時には、その暗号を復号化しなければそのコンテンツを再生・視聴することができず、その暗号化されている情報を復号化することのできるのは、所定の権限を有する者に限られなければならないので、その復号化の鍵は所定の認証を経なければアクセスすることのできない鍵ファイル領域(107)内の管理ファイル(172)と鍵ファイル(173)とに記録されており、その鍵が記録されている鍵ファイル領域(107)の管理ファイル(172)と鍵ファイル(173)とに含まれる特定の鍵番号を指し示す情報が、このコンテンツファイル領域(106)の管理ファイル(165)又は管理ファイル(166)のいずれか一方或いは両方に、記録保存されている。   When the content is encrypted, the content cannot be played back or viewed unless the encryption is decrypted, and the encrypted information can be decrypted. Therefore, the decryption key is recorded in the management file (172) and the key file (173) in the key file area (107) that cannot be accessed without predetermined authentication. Information indicating a specific key number included in the management file (172) and the key file (173) of the key file area (107) in which the key is recorded is the management of the content file area (106). It is recorded and saved in either or both of the file (165) and the management file (166).

コンテンツ格納フォルダ(163)とコンテンツ格納フォルダ(164)とには、それぞれに含まれるコンテンツ、図2の例では、コンテンツ格納フォルダ(163)に含まれるコンテンツ(167)とコンテンツ(168)とコンテンツ(169)とを指し示す情報が記録されている。又、この例ではコンテンツ(167)とコンテンツ(169)とが暗号化されたコンテンツであり、コンテンツ(168)が暗号化されていない平文のコンテンツであるが、この暗号化と平文との組み合わせもこの組み合わせに限るものではなく、どのような組み合わせであっても構わない。   The content storage folder (163) and the content storage folder (164) include contents included in the content storage folder (164), in the example of FIG. 2, the content (167), content (168), and content (in the content storage folder (163)). 169) is recorded. In this example, the content (167) and the content (169) are encrypted content, and the content (168) is plaintext content that is not encrypted. However, the combination of this encryption and plaintext is also possible. The combination is not limited to this, and any combination may be used.

更に又、コンテンツ格納フォルダ(163)に格納されているコンテンツは必ずしも3つとは限らず、より多くても良いし、より少なくても構わない。又、コンテンツ格納フォルダ(164)に格納されているコンテンツは図示していないが、幾つか存在しても構わないし、ケースによっては全く存在しなくても構わない。   Furthermore, the content stored in the content storage folder (163) is not necessarily three, but may be more or less. Further, although the content stored in the content storage folder (164) is not shown, there may be some content, or there may not be any at all depending on the case.

このコンテンツ格納フォルダ(163)に記録されている情報によって指し示されるコンテンツ(167)とコンテンツ(168)とコンテンツ(169)とには、上記のように各種のマルチメディアコンテンツ、例えば映画のような動画像と音声情報を含む情報や、動画像だけの情報や、音声だけの情報や、静止画像や、静止画像と音声情報とを含む情報や、文字情報や、これらの複数を含む情報や、その他の各種情報が記録されている。   The content (167), the content (168), and the content (169) pointed to by the information recorded in the content storage folder (163) include various multimedia contents such as movies as described above. Information including moving image and audio information, information only for moving images, information only for audio, information including still images, information including still images and audio information, character information, information including a plurality of these, Various other information is recorded.

上記の通り、この各種コンテンツの中に暗号化されたものが存在する時には、コンテンツファイル領域(106)の管理ファイル(165)又は管理ファイル(166)のいずれか一方或いは両方に、鍵ファイル領域(107)の管理ファイル(172)と鍵ファイル(173)とに含まれる特定の鍵番号を指し示す情報が記録保存されており、この鍵番号を識別子として暗号鍵を選択決定し、その選択決定した暗号鍵を読み出し、この読み出した暗号鍵を使用することによって暗号化されたコンテンツを復号化することができる。   As described above, when there are encrypted contents in the various contents, the key file area (165) is stored in one or both of the management file (165) and the management file (166) in the content file area (106). 107) information indicating a specific key number included in the management file (172) and the key file (173) is recorded and saved, and an encryption key is selected and determined using this key number as an identifier, and the selected and determined encryption The encrypted content can be decrypted by reading the key and using the read encryption key.

但し、認証領域(107)にアクセスするには所定の認証を経ることが必要であり、これに関しても既に説明した通りである。   However, in order to access the authentication area (107), it is necessary to pass a predetermined authentication, and this is also as already described.

図3には、このようにして構成されたSDカード内のファイルシステム構成内の管理ファイル(165)と管理ファイル(166)の内容を示す。   FIG. 3 shows the contents of the management file (165) and the management file (166) in the file system configuration in the SD card configured as described above.

尚、図3に示すのは1つの例であり、必ずしもこのようでなければならないと言う訳ではない。   Note that FIG. 3 shows an example, and it does not necessarily mean that this is the case.

図3に示す例では、全てのコンテンツ格納領域内のコンテンツ格納フォルダ(図2に示す例では、コンテンツ格納フォルダ(163)とコンテンツ格納フォルダ(164))に含まれている全てのコンテンツに対して、01から始まるコンテンツID番号が付され、このコンテンツID番号によって全てのコンテンツが識別され、管理されている。   In the example shown in FIG. 3, the content storage folders in all content storage areas (in the example shown in FIG. 2, the content storage folder (163) and the content storage folder (164)) are all included in the content storage area. , 01 is assigned a content ID number, and all content is identified and managed by this content ID number.

図3に示す例では、コンテンツID番号が01と03と04と33と、その他の・・で省略して表す番号のコンテンツが記録され、管理されていることが示されている。   In the example shown in FIG. 3, content ID numbers 01, 03, 04, and 33, and other contents with numbers abbreviated as... Are recorded and managed.

管理ファイル(165)には、これらコンテンツID番号が付されたコンテンツ毎に、そのコンテンツのタイトル名と、そのコンテンツの著作者名と、そのコンテンツが暗号化されている時には、暗号化の鍵を特定する鍵番号とが記録保存されている。   In the management file (165), for each content to which these content ID numbers are attached, the title name of the content, the author name of the content, and the encryption key when the content is encrypted are stored. The key number to be identified is recorded and saved.

尚、この鍵番号は01から始まる番号が使用され、鍵番号00はそのコンテンツが暗号化されていないことを示している。   Note that this key number starts with 01, and the key number 00 indicates that the content is not encrypted.

このような管理ファイル(165)の内容もあくまで1つの例であり、このような形式でなければならないと言う訳ではなく、このように使用されなければならない訳でもない。   The content of such a management file (165) is just an example, and it does not mean that it must be in this format, nor does it have to be used in this way.

或いは、特定の情報が欠けていても勿論構わない。例えば、あるコンテンツに関しては、或いは全てのコンテンツに関して、著作者名が記録保存されていなかったとしても構わない。   Of course, it does not matter if specific information is missing. For example, the author name may not be recorded and stored for a certain content or for all the content.

例えば図5に、各コンテンツID番号に対応した鍵番号の使用或いは未使用を判断するために、管理ファイル(165)の内容に基づいて作成される配列(501)の1例を示す。尚この配列(501)は必要に応じて管理ファイル(165)の内容から作成しても構わないし、予め作成して記録保存していても構わない。   For example, FIG. 5 shows an example of an array (501) created based on the contents of the management file (165) in order to determine whether the key number corresponding to each content ID number is used or not. This array (501) may be created from the contents of the management file (165) as necessary, or may be created and recorded in advance.

この配列(501)はそれぞれ1バイト(8ビット)の容量を持つ配列[1]から配列[13]によって構成され、配列[1]の最上位ビットが鍵番号01の鍵の使用或いは未使用を表している。   This array (501) is composed of an array [1] to an array [13] each having a capacity of 1 byte (8 bits). The most significant bit of the array [1] is used or not used for the key number 01. Represents.

配列[1]の最上位から2番目のビットは鍵番号02の鍵の使用或いは未使用を表しており、以下同様に、最下位ビットは鍵番号08の鍵の使用或いは未使用を表している。   The second bit from the most significant bit of the array [1] indicates the use or non-use of the key with the key number 02. Similarly, the least significant bit represents the use or non-use of the key with the key number 08. .

尚、各ビットが1の時、その鍵番号の鍵は使用されていることを表し、0の時にはその鍵番号の鍵は使用されていないことを表している。   When each bit is 1, it indicates that the key of the key number is used, and when it is 0, it indicates that the key of the key number is not used.

以下同様に、配列[2]の最上位ビットが鍵番号09の鍵の使用或いは未使用を表しており、最上位から2番目のビットは鍵番号10の鍵の使用或いは未使用を表しており、最下位ビットは鍵番号16の鍵の使用或いは未使用を表している。   Similarly, the most significant bit of the array [2] indicates the use or non-use of the key with the key number 09, and the second bit from the most significant bit indicates the use or non-use of the key with the key number 10. The least significant bit indicates the use or non-use of the key with the key number 16.

更に以下同様に、配列[13]の最上位ビットが鍵番号97の鍵の使用或いは未使用を表しており、最上位から3番目のビットは鍵番号99の鍵の使用或いは未使用を表している。   In the same manner, the most significant bit of the array [13] represents the use or non-use of the key with the key number 97, and the third bit from the most significant bit represents the use or non-use of the key with the key number 99. Yes.

管理ファイル(166)には、同様にコンテンツID番号が付されたコンテンツ毎に、そのコンテンツの容量がキロバイト単位で記録保存され、その他そのコンテンツが記録保存された年月日、そのコンテンツを有効に利用することのできる期限である年月日、その他の情報が記録保存されている。   Similarly, in the management file (166), the capacity of the content is recorded and stored in units of kilobytes for each content with the content ID number, and the date and time when the content is recorded and stored are validated. The date and time when it can be used, and other information are recorded and stored.

このような管理ファイル(166)の内容も又、あくまで1つの例であり、このような形式でなければならないと言う訳ではなく、このように使用されなければならない訳でもない。   The content of such a management file (166) is also just an example, and it does not have to be in this format, nor does it have to be used in this way.

或いは、特定の情報が欠けていても勿論構わない。例えば、あるコンテンツに関しては、或いは全てのコンテンツに関して、有効年月日が記録保存されていなかったとしても構わない。   Of course, it does not matter if specific information is missing. For example, the effective date may not be recorded and stored for a certain content or for all the content.

又、既に上記の通り、これら管理ファイル(165)と管理ファイル(166)との内容は、この例のように2つのファイルに分割して記録保存されていることは必ずしも必要ではなく、1つのファイルにまとめて記録保存されていても構わないし、3つ以上のファイルに分割して記録保存されていても構わない。   As described above, the contents of the management file (165) and the management file (166) are not necessarily divided and stored in two files as in this example. The files may be recorded and saved together, or may be divided and recorded into three or more files.

図4には鍵ファイル領域(107)の管理ファイル(172)と鍵ファイル(173)との内容の第1の実施の形態を示す。   FIG. 4 shows a first embodiment of the contents of the management file (172) and the key file (173) in the key file area (107).

鍵ファイル領域(107)の管理ファイル(172)には、鍵番号毎にその鍵番号に相当する鍵で暗号化が行われている暗号の暗号化方式と、その鍵番号に相当する鍵が記録保存された年月日と、その鍵番号に相当する鍵を有効に利用することのできる期限である年月日とが記録保存されている。   In the management file (172) of the key file area (107), an encryption method in which encryption is performed for each key number with a key corresponding to the key number and a key corresponding to the key number are recorded. The stored date and the date that is the time limit for effectively using the key corresponding to the key number are recorded and stored.

このような管理ファイル(172)の内容も又、あくまで1つの例であり、このような形式でなければならないと言う訳ではなく、このように使用されなければならない訳でもない。   The contents of the management file (172) are also just an example, and do not have to be in such a format, nor do they have to be used in this way.

或いは、特定の情報が欠けていても勿論構わない。例えば、ある鍵番号に相当する鍵に関しては、或いは全ての鍵に関して、有効年月日が記録保存されていなかったとしても構わない。   Of course, it does not matter if specific information is missing. For example, for the key corresponding to a certain key number, or for all the keys, the effective date may not be recorded and stored.

鍵ファイル領域(107)の鍵ファイル(173)には、鍵番号毎にその鍵番号の使用或いは未使用を表す0又は1の情報と、その鍵番号に相当する鍵データ自身とが記録保存されている。   In the key file (173) of the key file area (107), for each key number, 0 or 1 information indicating the use or non-use of the key number and the key data itself corresponding to the key number are recorded and stored. ing.

この鍵ファイル(173)の各鍵番号毎に存在する、その鍵番号の使用或いは未使用を表す0又は1の情報と、その鍵番号に相当する鍵データ自身とが記録保存されている部分とが、本発明に係る保存ファイル内の鍵保存領域の使用未使用状態を表す情報と、本発明に係る保存ファイル内の鍵保存領域との、第1の実施の形態である。   A portion in which each key number of the key file (173) is recorded and stored with 0 or 1 information indicating the use or non-use of the key number and the key data itself corresponding to the key number; These are the first embodiment of information indicating the unused state of the key storage area in the storage file according to the present invention and the key storage area in the storage file according to the present invention.

このような鍵ファイル(173)の内容も又、あくまで1つの例であり、このような形式でなければならないと言う訳ではない。   The content of such a key file (173) is also just an example, and it does not mean that it must be in this format.

例えば図6に、鍵ファイル(173)の内容である、鍵番号に対応した暗号鍵の使用或いは未使用を記憶している配列(601)の記録形式の1例を示す。   For example, FIG. 6 shows an example of the recording format of the array (601) that stores the use or non-use of the encryption key corresponding to the key number, which is the contents of the key file (173).

この配列(601)はそれぞれ1バイト(8ビット)の容量を持つ配列[1]から配列[13]によって構成され、配列[1]の最上位ビットが鍵番号01の鍵の使用或いは未使用を表している。   This array (601) is composed of arrays [1] to [13] each having a capacity of 1 byte (8 bits). The most significant bit of the array [1] is used or not used for the key number 01. Represents.

配列[1]の最上位から2番目のビットは鍵番号02の鍵の使用或いは未使用を表しており、以下同様に、最下位ビットは鍵番号08の鍵の使用或いは未使用を表している。   The second bit from the most significant bit of the array [1] indicates the use or non-use of the key with the key number 02. Similarly, the least significant bit represents the use or non-use of the key with the key number 08. .

尚、各ビットが1の時、その鍵番号の鍵は使用されていることを表し、0の時にはその鍵番号の鍵は使用されていないことを表している。   When each bit is 1, it indicates that the key of the key number is used, and when it is 0, it indicates that the key of the key number is not used.

以下同様に、配列[2]の最上位ビットが鍵番号09の鍵の使用或いは未使用を表しており、最上位から2番目のビットは鍵番号10の鍵の使用或いは未使用を表しており、最下位ビットは鍵番号16の鍵の使用或いは未使用を表している。   Similarly, the most significant bit of the array [2] indicates the use or non-use of the key with the key number 09, and the second bit from the most significant bit indicates the use or non-use of the key with the key number 10. The least significant bit indicates the use or non-use of the key with the key number 16.

更に以下同様に、配列[13]の最上位ビットが鍵番号97の鍵の使用或いは未使用を表しており、最上位から3番目のビットは鍵番号99の鍵の使用或いは未使用を表している。   In the same manner, the most significant bit of the array [13] represents the use or non-use of the key with the key number 97, and the third bit from the most significant bit represents the use or non-use of the key with the key number 99. Yes.

図9には、このような実施の形態のSDカード(101)のコンテンツファイル領域(106)と鍵ファイル領域(107)とに、携帯電話装置(102)がコンテンツと暗号鍵とを記録保存するときの処理手順の流れの概略を示す。   In FIG. 9, the mobile phone device (102) records and saves the content and the encryption key in the content file area (106) and the key file area (107) of the SD card (101) of such an embodiment. The outline of the flow of the processing procedure is shown.

コンテンツ格納要求処理が開始されると最初に、このSDカード(101)のファイルシステム構成の整合性が確認される(S901)。このファイルシステム構成の整合性は、必要なファイルやフォルダが存在するか否かの確認や、或いはその他の方法によって行われる。   When the content storage request process is started, first, the consistency of the file system configuration of the SD card (101) is confirmed (S901). The consistency of the file system configuration is performed by checking whether or not a necessary file or folder exists, or by other methods.

ファイルシステム構成の整合性が確認されると次に、要求されたコンテンツを格納するためのコンテンツID番号が決定される(S902)。このコンテンツID番号を決定する処理手順の流れは、より詳細に図10に示す。   If the consistency of the file system configuration is confirmed, then a content ID number for storing the requested content is determined (S902). The flow of the processing procedure for determining the content ID number is shown in more detail in FIG.

要求されたコンテンツを格納するためのコンテンツID番号を決定するために、コンテンツID番号検索処理が開始されると最初に、まず仮にコンテンツID番号を1に設定する(S911)。そして1つの例を図3に示す管理ファイル(165)内の、このコンテンツID番号の鍵番号領域には既に値が設定されているか否かを判断する(S912)。   In order to determine the content ID number for storing the requested content, when the content ID number search process is started, first, the content ID number is first set to 1 (S911). Then, in one example, it is determined whether or not a value has already been set in the key number area of the content ID number in the management file (165) shown in FIG. 3 (S912).

上記の通り、この鍵番号領域に値00が設定されていればそのコンテンツID番号に相当するコンテンツ格納フォルダには暗号化されていないコンテンツが記録保存されており、この鍵番号領域に値01から始まる値のいずれかが設定されていればそのコンテンツID番号に相当するコンテンツ格納フォルダには暗号化されたコンテンツが記録保存されていることが示される。   As described above, if a value 00 is set in this key number area, unencrypted content is recorded and saved in the content storage folder corresponding to the content ID number. If any of the starting values is set, it indicates that the encrypted content is recorded and saved in the content storage folder corresponding to the content ID number.

もしもこのコンテンツID番号と同一の番号が、既にこの管理ファイル(165)に登録されていれば(S912でYes)、このコンテンツID番号はコンテンツの記録保存のために既に使用されていることが解るので、仮のコンテンツID番号に1を加え、次のコンテンツ管理番号が既に使用されているかいないかの確認を行う(S913)。   If the same number as the content ID number is already registered in the management file (165) (Yes in S912), it is understood that the content ID number is already used for recording and storing the content. Therefore, 1 is added to the temporary content ID number, and it is confirmed whether or not the next content management number has already been used (S913).

そしてもしもこのコンテンツID番号と同一の番号が、この管理ファイル(165)に登録されていなければ(S912でNo)、このコンテンツID番号は未だコンテンツの記録保存のために使用されていないことが解るので、そのコンテンツID番号を新しいコンテンツの記録保存のために使用することができるが、この実施の形態では更に念を入れてファイルシステムの整合性まで検証するため、このコンテンツID番号に相当するコンテンツ格納フォルダが確かに存在していないことを確認している(S914)。   If the same number as the content ID number is not registered in the management file (165) (No in S912), it is understood that the content ID number is not yet used for recording and storing the content. Therefore, the content ID number can be used for recording and storing new content. However, in this embodiment, the content corresponding to the content ID number is verified in order to verify the integrity of the file system with more care. It is confirmed that the storage folder does not exist (S914).

もしもこのコンテンツID番号と同一の番号が、この管理ファイル(165)に登録されていなかったにも関らず、このコンテンツID番号に相当するコンテンツ格納フォルダが存在したならば(S914でYes)、何らかの不整合が存在する可能性が高いことを示唆しているが、この実施の形態ではこれ以上深くその原因の究明は行わず、そのコンテンツID番号はスキップして次のコンテンツID番号の確認に移行する(S913)。   If the content storage folder corresponding to the content ID number exists even though the same number as the content ID number is not registered in the management file (165) (Yes in S914), This suggests that there is a high possibility that some inconsistency exists, but in this embodiment, the cause is not investigated further, and the content ID number is skipped to confirm the next content ID number. The process proceeds (S913).

何らかの不整合が実際に存在するか否か、存在すとすればその原因の究明、或いは正常な状態への復旧は、空き時間が有る時、充分な時間を費やして慎重に実行することができる。しかしながらこの検証については本発明の本質とは直接関係しないのでこれ以上詳細な説明は省略する。   Whether or not there is any inconsistency, and if so, investigation of its cause, or restoration to a normal state, can be carried out with sufficient time when there is free time. . However, since this verification is not directly related to the essence of the present invention, further detailed description is omitted.

もしもこのコンテンツID番号と同一の番号が、この管理ファイル(165)に登録されておらず(S912でNo)、尚且つこのコンテンツID番号に相当するコンテンツ格納フォルダが存在しなかったならば(S914でNo)、そのコンテンツID番号を新しいコンテンツを記録保存するために使用することが決定される(S915)。   If the same number as the content ID number is not registered in the management file (165) (No in S912), and there is no content storage folder corresponding to the content ID number (S914). No), it is determined that the content ID number is used for recording and storing new content (S915).

尚、この図10に示すコンテンツID番号を決定する処理手順の流れで、最大のコンテンツID番号まで確認して未だ使用されていないコンテンツID番号がなければ、空きのコンテンツID番号は無いと判断しなければならないが、この手順に関しても本発明の本質とは直接関係しないので説明を省略している。   In the flow of the processing procedure for determining the content ID number shown in FIG. 10, if there is no content ID number that has not been used after checking the maximum content ID number, it is determined that there is no empty content ID number. However, since this procedure is not directly related to the essence of the present invention, the description thereof is omitted.

このようにしてコンテンツの記録保存に使用するコンテンツID番号が決定されると次に、図9に示す処理手順に戻り、このコンテンツを暗号化する暗号鍵を記録保存するための鍵番号の決定を行う(S903)。   When the content ID number used for recording and storing the content is determined in this way, the process returns to the processing procedure shown in FIG. 9 to determine the key number for recording and storing the encryption key for encrypting the content. This is performed (S903).

但し、この鍵番号の決定を行うのはコンテンツを暗号化して記録保存する場合だけであり、コンテンツを暗号化せず平文のまま記録保存する時には、鍵番号の決定は不要であるが、これについても単純化のため暗号化して記録保存するケースのみを示している。   However, this key number is determined only when the content is encrypted and recorded and saved. When the content is recorded and saved as plain text without encryption, the key number is not required to be determined. Also, for simplicity, only the case of encrypting and recording is shown.

この暗号化の鍵を記録保存するための鍵番号を決定する処理手順は、より詳細に図11に示している。   The processing procedure for determining the key number for recording and storing the encryption key is shown in more detail in FIG.

図11に示すようにコンテンツを暗号化して記録保存するために新しい鍵番号の検索処理が開始されるとまず、コンテンツファイル領域(106)の管理ファイル(165)で、使用中の鍵番号を記憶している配列(501)を取得する(S951)。この配列(501)とはその1例を図5に示したものである。   As shown in FIG. 11, when a new key number search process is started to encrypt and record content, first, the key number being used is stored in the management file (165) in the content file area (106). The array (501) being acquired is acquired (S951). One example of this arrangement (501) is shown in FIG.

次に同様に、鍵ファイル領域(107)の鍵ファイル(173)で、使用中の鍵番号を記憶している配列(601)を取得する(S952)。この配列(601)とはその1例を図6に示したものである。   Next, similarly, an array (601) storing key numbers in use is acquired from the key file (173) in the key file area (107) (S952). One example of the arrangement (601) is shown in FIG.

そして次に、これら配列を検索するため仮の配列番号を1に設定する(S953)。   Then, a temporary array number is set to 1 to search for these arrays (S953).

次にこの仮の配列番号が既に14になったか否かを判断する(S954)。本実施の形態では、この配列は13までしか存在しないと仮定しており、仮の配列番号が14になったということは、空きの鍵番号がもはや残っていないことを示している(S962)。従って、このケースでは何らかの異常終了を行い、操作者にその旨を提示し、操作者によって何らかの判断、例えばコンテンツを暗号化して記録保存することを諦めるとか、SDカードを違うものに交換するとかが行われなければならない。   Next, it is determined whether or not this temporary array number has already become 14 (S954). In the present embodiment, it is assumed that there are only 13 arrays, and the provisional array number of 14 indicates that there are no more empty key numbers remaining (S962). . Therefore, in this case, some sort of abnormal termination is performed, the operator is notified of this, and the operator gives some judgment, for example, gives up recording and saving the content, or replaces the SD card with a different one. Must be done.

仮の配列番号が未だ14になっていなければ、上記配列(501)と配列(601)とのそれぞれこの配列番号の配列同士で論理和演算をコンピュータによって実行する(S955)。   If the provisional array element number is not yet 14, the logical sum operation is performed by the computer between the arrays (501) and (601) having the array element numbers (S955).

そしてこのコンピュータによる論理和演算の結果が16進数表現でFF(0xFFと表現する)であったならば(S956でYes)、この配列によって管理されている8個の鍵番号は、コンテンツファイル領域(106)の管理ファイル(165)か鍵ファイル領域(107)の鍵ファイル(173)かのいずれか一方又は両方で、その鍵番号は使用中であることが示される。   If the result of the logical OR operation by this computer is FF in hexadecimal notation (represented as 0xFF) (Yes in S956), the eight key numbers managed by this array are stored in the content file area ( It is indicated that the key number is in use in one or both of the management file (165) of 106) and the key file (173) of the key file area (107).

この時、コンテンツファイル領域(106)の管理ファイル(165)と鍵ファイル領域(107)の鍵ファイル(173)との両方で、その鍵番号は使用中であるならば、暗号鍵の管理やファイルシステムに不整合はない。   At this time, if the key number is in use in both the management file (165) in the content file area (106) and the key file (173) in the key file area (107), the encryption key management and file There is no inconsistency in the system.

しかしながら、いずれか一方だけでその鍵番号が使用中であるならば、上記と同様に何らかの不整合が存在する可能性が高いことが示唆される。   However, if the key number is in use by either one, it is suggested that there is a high possibility that some inconsistency exists as described above.

例えば、図5に示すコンテンツファイル領域(106)の管理ファイル(165)の配列(501)と、図6に示す鍵ファイル領域(107)の鍵ファイル(173)の配列(601)とでは、コンテンツファイル領域(106)の管理ファイル(165)の配列(501)では鍵番号10の使用未使用を示すビットは0でありこの鍵番号は未使用であるが、鍵ファイル領域(107)の鍵ファイル(173)の配列(601)では鍵番号10の使用未使用を示すビットは1でありこの鍵番号は使用中である。   For example, in the arrangement (501) of the management file (165) in the content file area (106) shown in FIG. 5 and the arrangement (601) of the key file (173) in the key file area (107) shown in FIG. In the array (501) of the management file (165) in the file area (106), the bit indicating that the key number 10 is not used is 0, and this key number is unused, but the key file in the key file area (107) In the array (601) of (173), the bit indicating that the key number 10 is not used is 1, and this key number is in use.

従って、この暗号鍵の管理やファイルシステムには何らかの原因、例えば暗号鍵の記録保存中にSDカードが抜き差しされたり、電源のオンオフが行われたり、その他何らかの異常な操作が行われた等の事情によって、不整合状態にある蓋然性が極めて高い。   Therefore, this encryption key management and file system have some reason, such as when an SD card is inserted / removed while the encryption key is recorded and saved, the power is turned on / off, or any other abnormal operation is performed. Therefore, the probability of being in an inconsistent state is extremely high.

同様に例えば、図7に示すコンテンツファイル領域(106)の管理ファイル(165)の配列(701)と、図8に示す鍵ファイル領域(107)の鍵ファイル(173)の配列(801)とでは、コンテンツファイル領域(106)の管理ファイル(165)の配列(701)では鍵番号01から鍵番号08の鍵の使用未使用を表す配列[1]の内容は2進数表現で「1101 1111」であり、鍵番号03の鍵だけが未使用で他の鍵番号は全て使用中であることが示される。   Similarly, for example, the arrangement (701) of the management file (165) in the content file area (106) shown in FIG. 7 and the arrangement (801) of the key file (173) in the key file area (107) shown in FIG. In the array (701) of the management file (165) in the content file area (106), the contents of the array [1] indicating the unused use of the keys with the key numbers 01 to 08 are expressed in binary representation “1101 1111”. Yes, only the key with key number 03 is unused and all other key numbers are in use.

しかしながら、鍵ファイル領域(107)の鍵ファイル(173)の配列(801)では鍵番号01から鍵番号08の鍵の使用未使用を表す配列[1]の内容は2進数表現で「1011 1111」であり、鍵番号02の鍵だけが未使用で他の鍵番号は全て使用中であることが示される。   However, in the array (801) of the key file (173) in the key file area (107), the contents of the array [1] indicating the unused use of the keys of the key numbers 01 to 08 are expressed as “1011 1111” in binary representation. It is shown that only the key with the key number 02 is unused and all other key numbers are in use.

即ち、この2つの配列間で、鍵番号02の鍵の使用未使用状態と、鍵番号03の鍵の使用未使用状態とが入れ替わってしまっている。   That is, between the two arrays, the key unused state of the key number 02 and the key unused state of the key number 03 are interchanged.

この状態でも、暗号鍵の管理やファイルシステムには何らかの原因によって不整合状態にある蓋然性が極めて高い。   Even in this state, there is a very high probability that the encryption key management and the file system are in an inconsistent state for some reason.

しかしながらこれらの状態時にも、その不整合の存在或いは不存在の確認やその理由の究明や、整合状態の復帰は行わず、処理速度や処理効率を優先し、ここでは少なくともいずれか一方でその鍵番号が使用されている可能性があれば、その鍵番号は既に使用されていると判断し、その鍵番号は使用せず、次の鍵番号の確認に移行する(S957)。   However, even in these states, the existence or non-existence of the inconsistency is not confirmed, the reason is not investigated, and the consistency state is not restored, and priority is given to processing speed and processing efficiency. If there is a possibility that a number has been used, it is determined that the key number has already been used, the key number is not used, and the process proceeds to confirmation of the next key number (S957).

上記と同様に、何らかの不整合が実際に存在するか否か、存在すとすればその原因の究明、或いは正常な状態への復旧は、空き時間が有る時、充分な時間を費やして慎重に実行することができる。しかしながらこの検証については本発明の本質とは直接関係しないのでこれ以上詳細な説明は省略する。   Similar to the above, if there is any inconsistency, if it exists, investigate the cause or restore it to the normal state. Can be executed. However, since this verification is not directly related to the essence of the present invention, further detailed description is omitted.

このコンピュータによる論理和演算の結果が16進数表現でFF(0xFFと表現する)でないならば(S956でNo)、この配列によって管理されている8個の鍵番号のいずれかが、コンテンツファイル領域(106)の管理ファイル(165)と鍵ファイル領域(107)の鍵ファイル(173)との両方で、未使用中であることが示される。   If the result of the logical OR operation by this computer is not FF (represented as 0xFF) in hexadecimal notation (No in S956), one of the eight key numbers managed by this array is stored in the content file area ( Both the management file (165) of 106) and the key file (173) of the key file area (107) indicate that they are not used.

そこで次に、この配列によって管理されている8個の鍵番号のどの鍵番号の鍵が未使用中であるかの判断に移行する。   Then, the process proceeds to the determination of which key number of the eight key numbers managed by this array is unused.

そのためにまず仮のビット番号を0に設定する(S958)。   For this purpose, a temporary bit number is first set to 0 (S958).

そして上記コンピュータによる論理和演算の結果の、このビット番号のビットが0か1かの判断を行う(S959)。   Then, it is determined whether the bit of this bit number as a result of the logical sum operation by the computer is 0 or 1 (S959).

もしもこのビット番号のビットが1であったならば(S959でNo)、そのビット番号に相当する鍵番号の鍵は既に使用されているので、次のビットの判断に移行する(S960)。   If the bit of this bit number is 1 (No in S959), the key of the key number corresponding to the bit number has already been used, and the process proceeds to determination of the next bit (S960).

もしもこのビット番号のビットが0であったならば(S959でYes)、そのビット番号に相当する鍵番号の鍵は未だ使用されていないので、この配列のこのビットに相当する鍵番号を、新しいコンテンツを暗号化して記録保存するために使用する暗号鍵のための鍵番号として決定する(S961)。   If the bit of this bit number is 0 (Yes in S959), the key of the key number corresponding to that bit number is not yet used, so the key number corresponding to this bit of this array is changed to a new one. It is determined as a key number for an encryption key used for encrypting and recording the content (S961).

このようにして新しいコンテンツを暗号化して記録保存するために使用する暗号鍵のための鍵番号の決定が行われると(図9のS903及び図11)、次にこの鍵番号を含めて管理情報の作成が行われる(S904)。この管理情報とはその内容の概略を、図3に示すものである。   When the key number for the encryption key used for encrypting and storing the new content is determined in this way (S903 in FIG. 9 and FIG. 11), the management information including this key number is then included. Is created (S904). This management information is schematically shown in FIG.

次に記録保存するコンテンツの暗号化を行い(S905)、その暗号化したコンテンツをSDカード内のファイルシステムのコンテンツファイル領域(106)のコンテンツ格納フォルダ内に記録する(S906)。   Next, the content to be recorded and saved is encrypted (S905), and the encrypted content is recorded in the content storage folder in the content file area (106) of the file system in the SD card (S906).

尚ここで、コンテンツの容量が大きく、全て暗号化した後に記録することが現実的でないケースでは、暗号化(S905)と暗号化したコンテンツの記録(S906)とを並行して行っても勿論構わない。   Here, in the case where the capacity of the content is large and it is not practical to record after all the encryption, it is of course possible to perform the encryption (S905) and the recording of the encrypted content (S906) in parallel. Absent.

次に暗号化に使用した鍵を、SDカードの鍵ファイル領域(107)の鍵ファイル(173)の予め決定した鍵番号の所に記録し、その鍵番号の鍵の使用或いは未使用中の状態を使用中(1)に設定する(S907)。   Next, the key used for the encryption is recorded at a predetermined key number in the key file (173) of the key file area (107) of the SD card, and the key with the key number is used or not used. Is used (1) (S907).

このSDカードの鍵ファイル領域(107)の鍵ファイル(173)の内容は、既に説明した図4に示す通りである。   The contents of the key file (173) in the key file area (107) of this SD card are as shown in FIG.

最後に、上記作成した管理情報をコンテンツファイル領域(106)の管理ファイル(165)と管理ファイル(166)とに記録する(S908)。   Finally, the created management information is recorded in the management file (165) and the management file (166) in the content file area (106) (S908).

この管理情報と管理ファイル(165)と管理ファイル(166)との内容は、既に説明した図3に示す通りである。   The contents of the management information, management file (165), and management file (166) are as shown in FIG.

本発明は、SDメモリーカードを始めとする各種電子機器の外部記録媒体、或いは内部記録媒体に各種の情報、例えば静止画像情報、動画像情報、音声情報、文字情報、その他の情報や、これらの幾つかが混在している情報、を暗号化して記録する時、これらの情報や暗号鍵を記録、保存、管理し、その整合性を確保すると同時に、万一不整合が生じた時にも継続して情報の記録保存を行うことができ、記録した情報を失ったり記録保存処理が妨げられることもなく、不整合状態の確認や復旧は空き時間に実行することが可能であり、産業上極めて有効に利用することができる。   The present invention provides various information such as still image information, moving image information, audio information, character information, other information, etc. on external recording media or internal recording media of various electronic devices such as SD memory cards, When encrypting and recording some mixed information, this information and encryption key are recorded, stored and managed, ensuring their consistency, and at the same time continuing in the event of inconsistencies. It is possible to record and save information, and it is possible to check and restore inconsistent states in the idle time without losing the recorded information or hindering the record saving process, which is extremely effective industrially. Can be used.

本発明の第1の実施の形態であるファイル管理システムを実行する携帯電話装置とSDメモリーカードとのブロック構成図1 is a block configuration diagram of a mobile phone device and an SD memory card that execute a file management system according to a first embodiment of the present invention; 本発明の第1の実施の形態であるファイル管理システムが実行されるSDメモリーカードのファイルシステム構成図The file system block diagram of the SD memory card with which the file management system which is the 1st Embodiment of this invention is performed 本発明の第1の実施の形態のファイルシステム構成内の管理ファイルの内容を示す図The figure which shows the content of the management file in the file system structure of the 1st Embodiment of this invention 本発明の第1の実施の形態の鍵ファイル領域の管理ファイルと鍵ファイルとの内容を示す図The figure which shows the content of the management file and key file of the key file area | region of the 1st Embodiment of this invention 本発明の第1の実施の形態の管理ファイルの各コンテンツID番号に対応した鍵番号の使用未使用を記憶している配列の1例を示す図The figure which shows an example of the arrangement | sequence which memorize | stored the use / unuse of the key number corresponding to each content ID number of the management file of the 1st Embodiment of this invention 本発明の第1の実施の形態の鍵ファイルの鍵番号に対応した暗号鍵の使用未使用を記憶している配列の1例を示す図The figure which shows one example of the arrangement | sequence which memorize | stored the use unused of the encryption key corresponding to the key number of the key file of the 1st Embodiment of this invention 本発明の第1の実施の形態の管理ファイルの各コンテンツID番号に対応した鍵番号の使用未使用を記憶している配列の他の例を示す図The figure which shows the other example of the arrangement | sequence which memorize | stores the use / unuse of the key number corresponding to each content ID number of the management file of the 1st Embodiment of this invention 本発明の第1の実施の形態の鍵ファイルの鍵番号に対応した暗号鍵の使用未使用を記憶している配列の他の例を示す図The figure which shows the other example of the arrangement | sequence which memorize | stored the use unused of the encryption key corresponding to the key number of the key file of the 1st Embodiment of this invention 本発明の第1の実施の形態のSDカードに携帯電話装置がコンテンツと暗号鍵とを記録保存するときの処理の流れを示す図The figure which shows the flow of a process when a mobile telephone apparatus records and preserve | saves a content and an encryption key on SD card of the 1st Embodiment of this invention. 本発明の第1の実施の形態の携帯電話装置がコンテンツID番号を決定する処理の流れを示す図The figure which shows the flow of the process in which the mobile telephone apparatus of the 1st Embodiment of this invention determines a content ID number. 本発明の第1の実施の形態の携帯電話装置が暗号化の鍵を記録保存するための鍵番号を決定する処理の流れを示す図The figure which shows the flow of a process which determines the key number for the mobile telephone apparatus of the 1st Embodiment of this invention recording and storing the encryption key. 従来の暗号鍵管理法を実行するICカードとICカード利用装置の主要部のブロック構成図Block diagram of main parts of IC card and IC card using apparatus for executing conventional encryption key management method

符号の説明Explanation of symbols

101 SDカード
102 携帯電話装置
103 SDカードインターフェース
104,105 制御部
106 コンテンツファイル領域
107 鍵ファイル領域
108 RAM
161 VIDEO_F_Aフォルダ
162 管理フォルダ
163,164 コンテンツ格納フォルダ
165,166,172 管理ファイル
167,168,169 コンテンツファイル
171 VIDEO_F_Bフォルダ
173 鍵ファイル
501 管理ファイル165で使用中の鍵番号を記録している配列
601 鍵ファイル173で使用中の鍵番号を記録している配列
701 管理ファイル165で使用中の鍵番号を記録している配列
801 鍵ファイル173で使用中の鍵番号を記録している配列
930 ICカード利用装置
931 カード発行用アプリケーション
932 カード暗号化機能モジュール
933 R/Wドライバ部
934 カードR/W部
940 ICカード
941 カードOS
942 受信バッファ
943 送信バッファ
944 暗号化カードアプレット
945 DES暗号装置
946 トリプルDES暗号装置
947 パラメータ管理クラス
948 暗号化/鍵管理アプレットクラス
981 利用者IDメモリ
982 パーソナライズ状態メモリ
983 鍵メモリ
DESCRIPTION OF SYMBOLS 101 SD card 102 Mobile phone apparatus 103 SD card interface 104,105 Control part 106 Content file area 107 Key file area 108 RAM
161 VIDEO_F_A folder 162 Management folder 163, 164 Content storage folder 165, 166, 172 Management file 167, 168, 169 Content file 171 VIDEO_F_B folder 173 Key file 501 Array storing key numbers used in management file 165 601 Key An array in which the key numbers being used in the file 173 are recorded 701 An array in which the key numbers being used are recorded in the management file 165 801 An array in which the key numbers being used in the key file 173 are recorded 930 Using an IC card Device 931 Card issuing application 932 Card encryption function module 933 R / W driver unit 934 Card R / W unit 940 IC card 941 Card OS
942 Reception buffer 943 Transmission buffer 944 Encryption card applet 945 DES encryption device 946 Triple DES encryption device 947 Parameter management class 948 Encryption / key management applet class 981 User ID memory 982 Personalized state memory 983 Key memory

Claims (7)

コンテンツを暗号化して記録再生するための暗号鍵を、管理する暗号鍵管理方法であって、
管理ファイルにおいて前記コンテンツを識別するための管理番号を決定する工程と、
前記管理ファイルから未使用の鍵番号を検索する工程と、
鍵保存ファイル内の前記検索した鍵番号に対応する鍵保存領域の使用未使用状態を表す情報が、未使用状態であることを確認する工程と、
前記管理ファイルの前記決定した管理番号に対応する領域に、前記検索した鍵番号を登録する工程と、
前記鍵保存ファイル内の前記検索した鍵番号に対応する鍵保存領域の使用未使用状態を表す情報を、使用状態に設定する工程と、
前記鍵保存ファイル内の前記検索した鍵番号に対応する鍵保存領域に、前記コンテンツの暗号鍵を記録する工程と、
前記決定した管理番号に対応するコンテンツを、前記暗号鍵によって暗号化して記録する工程と、
を有する暗号鍵管理方法。
An encryption key management method for managing an encryption key for encrypting and recording and reproducing content,
Determining a management number for identifying the content in the management file;
Searching for an unused key number from the management file;
Confirming that the information indicating the unused state of the key storage area corresponding to the searched key number in the key storage file is in an unused state;
Registering the searched key number in an area corresponding to the determined management number of the management file;
Setting information indicating a used / unused state of a key storage area corresponding to the searched key number in the key storage file to a used state;
Recording an encryption key of the content in a key storage area corresponding to the searched key number in the key storage file;
A step of encrypting and recording the content corresponding to the determined management number with the encryption key;
An encryption key management method comprising:
前記コンテンツを識別するための管理番号を決定する工程は、前記決定した管理番号に対応するコンテンツが実際に存在しないことを確認する工程を含む、
請求項1に記載の暗号鍵管理方法。
The step of determining a management number for identifying the content includes a step of confirming that content corresponding to the determined management number does not actually exist.
The encryption key management method according to claim 1.
前記管理ファイルと前記コンテンツを暗号化して記録する領域とは、メモリーカードの通常領域に存在し、
前記鍵保存ファイルは前記メモリーカードの認証領域に存在する、
請求項1又は請求項2に記載の暗号鍵管理方法。
The management file and the area where the content is encrypted and recorded are present in a normal area of the memory card,
The key storage file exists in the authentication area of the memory card,
The encryption key management method according to claim 1 or 2.
前記管理ファイルにおける鍵番号の使用と未使用とは1つの鍵番号をコンピュータにおけるワード又はバイト中の1ビットに割り当てて記憶し、
前記鍵保存ファイル内の前記鍵保存領域の使用未使用状態を表す情報も1つの鍵保存領域を前記コンピュータにおけるワード又はバイト中の1ビットに割り当てて記憶し、
前記管理ファイルから未使用の鍵番号を検索する工程と前記鍵保存ファイル内の前記検索した鍵番号に対応する鍵保存領域が未使用状態であることを確認する工程とは、前記コンピュータにおけるビット論理演算によって検索と確認を行う工程である、
請求項1から請求項3の何れか1項に記載の暗号鍵管理方法。
Use and non-use of the key number in the management file are stored by assigning one key number to one bit in a word or byte in the computer,
Information indicating the unused state of the key storage area in the key storage file is also stored by assigning one key storage area to one bit in a word or byte in the computer,
The step of searching for an unused key number from the management file and the step of confirming that the key storage area corresponding to the searched key number in the key storage file is unused are bit logics in the computer. It is a process of searching and checking by calculation.
The encryption key management method according to any one of claims 1 to 3.
コンピュータによって実行される、
コンテンツを暗号化して記録再生するための暗号鍵を、管理する暗号鍵管理プログラムであって、
管理ファイルにおいて前記コンテンツを識別するための管理番号を決定するステップと、
前記管理ファイルから未使用の鍵番号を検索するステップと、
鍵保存ファイル内の前記検索した鍵番号に対応する鍵保存領域の使用未使用状態を表す情報が、未使用状態であることを確認するステップと、
前記管理ファイルの前記決定した管理番号に対応する領域に、前記検索した鍵番号を登録するステップと、
前記鍵保存ファイル内の前記検索した鍵番号に対応する鍵保存領域の使用未使用状態を表す情報を、使用状態に設定するステップと、
前記鍵保存ファイル内の前記検索した鍵番号に対応する鍵保存領域に、前記コンテンツの暗号鍵を記録するステップと、
前記決定した管理番号に対応するコンテンツを、前記暗号鍵によって暗号化して記録するステップと、
を有する暗号鍵管理プログラム。
Executed by computer,
An encryption key management program for managing an encryption key for encrypting and recording and reproducing content,
Determining a management number for identifying the content in the management file;
Searching for an unused key number from the management file;
Confirming that the information indicating the unused state of the key storage area corresponding to the searched key number in the key storage file is in an unused state;
Registering the searched key number in an area corresponding to the determined management number of the management file;
Setting information indicating a used / unused state of a key storage area corresponding to the searched key number in the key storage file to a used state;
Recording an encryption key of the content in a key storage area corresponding to the searched key number in the key storage file;
Recording the content corresponding to the determined management number encrypted with the encryption key;
An encryption key management program.
コンピュータ読み取り可能な記録媒体であって、請求項5に記載の暗号鍵管理プログラムを記録した記録媒体。 A computer-readable recording medium on which the encryption key management program according to claim 5 is recorded. コンテンツを暗号化して記録再生するための暗号鍵を、管理する暗号鍵管理装置であって、
管理ファイルにおいて前記コンテンツを識別するための管理番号を決定する手段と、
前記管理ファイルから未使用の鍵番号を検索する手段と、
鍵保存ファイル内の前記検索した鍵番号に対応する鍵保存領域の使用未使用状態を表す情報が、未使用状態であることを確認する手段と、
前記管理ファイルの前記決定した管理番号に対応する領域に、前記検索した鍵番号を登録する手段と、
前記鍵保存ファイル内の前記検索した鍵番号に対応する鍵保存領域の使用未使用状態を表す情報を、使用状態に設定する手段と、
前記鍵保存ファイル内の前記検索した鍵番号に対応する鍵保存領域に、前記コンテンツの暗号鍵を記録する手段と、
前記決定した管理番号に対応するコンテンツを、前記暗号鍵によって暗号化して記録する手段と、
を有する暗号鍵管理装置。
An encryption key management device that manages an encryption key for recording and reproducing content after encrypting the content,
Means for determining a management number for identifying the content in the management file;
Means for retrieving an unused key number from the management file;
Means for confirming that the information indicating the unused state of the key storage area corresponding to the searched key number in the key storage file is in an unused state;
Means for registering the searched key number in an area corresponding to the determined management number of the management file;
Means for setting information indicating a used / unused state of a key storage area corresponding to the searched key number in the key storage file to a used state;
Means for recording an encryption key of the content in a key storage area corresponding to the searched key number in the key storage file;
Means for encrypting and recording the content corresponding to the determined management number with the encryption key;
An encryption key management device.
JP2003340459A 2003-09-30 2003-09-30 Method for managing encryption key Withdrawn JP2005109869A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003340459A JP2005109869A (en) 2003-09-30 2003-09-30 Method for managing encryption key

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003340459A JP2005109869A (en) 2003-09-30 2003-09-30 Method for managing encryption key

Publications (1)

Publication Number Publication Date
JP2005109869A true JP2005109869A (en) 2005-04-21

Family

ID=34535356

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003340459A Withdrawn JP2005109869A (en) 2003-09-30 2003-09-30 Method for managing encryption key

Country Status (1)

Country Link
JP (1) JP2005109869A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010185982A (en) * 2009-02-10 2010-08-26 Toshiba Storage Device Corp Encryption device, decryption device, and storage device
CN115208554A (en) * 2022-09-13 2022-10-18 三未信安科技股份有限公司 Management method and system for key self-checking, self-correcting and self-recovering

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010185982A (en) * 2009-02-10 2010-08-26 Toshiba Storage Device Corp Encryption device, decryption device, and storage device
CN115208554A (en) * 2022-09-13 2022-10-18 三未信安科技股份有限公司 Management method and system for key self-checking, self-correcting and self-recovering

Similar Documents

Publication Publication Date Title
US10148625B2 (en) Secure transfer and tracking of data using removable nonvolatile memory devices
CN100464313C (en) Mobile memory device and method for accessing encrypted data in mobile memory device
KR100608585B1 (en) Method and apparatus for searching rights objects stored in portable storage device using object location data
US7770227B2 (en) Right information management method and right information management device
US20060069925A1 (en) Content processing device, content accumulation medium, content processing method and content processing program
US8307408B2 (en) System and method for file processing and file processing program
WO2011157242A2 (en) Method and device for file protection
EP2528004A1 (en) Secure removable media and method for managing the same
CN101578608B (en) Methods and apparatuses for accessing content based on a session ticket
US6477530B1 (en) Digital data recording and reproducing system
US20080270792A1 (en) System and method of encrypting and decrypting digital files produced by digital still devices
US10331365B2 (en) Accessing a serial number of a removable non-volatile memory device
CN110929302B (en) Data security encryption storage method and storage device
CN108763401A (en) A kind of reading/writing method and equipment of file
WO2002019592A2 (en) Method of automatically encrypting and decrypting file in kernel mode, method of moving file pointer using the same, and computer readable recording medium on which programs of above methods are recorded
JP2006343887A (en) Storage medium, server device, and information security system
US20050071662A1 (en) Method of managing file structure in memory card and its related technology
KR100859651B1 (en) Storage medium of recording data structure for storing variable size data, method of storing variable size data, and computer-readable storage medium of storing program for executing method of storing variable size data
JP4807289B2 (en) Information processing apparatus, file processing method, and program
US8015342B2 (en) Method of managing and restoring identifier of storage device and apparatus therefor
US20090132603A1 (en) Data processing apparatus
JP2023081374A (en) Method and system for session-based secured access control on data storing system
JP2005109869A (en) Method for managing encryption key
JP5027805B2 (en) MEMORY CONTROLLER, NONVOLATILE STORAGE DEVICE, AND NONVOLATILE STORAGE DEVICE SYSTEM
JPH025158A (en) Expanded ic card and its accessing method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060620

RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20060712

A761 Written withdrawal of application

Free format text: JAPANESE INTERMEDIATE CODE: A761

Effective date: 20071119