JP7192658B2 - secure element - Google Patents
secure element Download PDFInfo
- Publication number
- JP7192658B2 JP7192658B2 JP2019097664A JP2019097664A JP7192658B2 JP 7192658 B2 JP7192658 B2 JP 7192658B2 JP 2019097664 A JP2019097664 A JP 2019097664A JP 2019097664 A JP2019097664 A JP 2019097664A JP 7192658 B2 JP7192658 B2 JP 7192658B2
- Authority
- JP
- Japan
- Prior art keywords
- cryptographic
- parameters
- coprocessor
- check code
- secure element
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Description
本発明は,耐タンパー性を有するワンチップマイコンであるセキュアエレメントに関する。 The present invention relates to a secure element that is a one-chip microcomputer with tamper resistance.
セキュアエレメントは,耐タンパー性を有するワンチップマイコンである。セキュアエレメントには,特定のシステム(例えば,決済システム)で利用され,複数回の暗号演算(暗号化または復号)を必要とする一連のシーケンスを実行するアプリケーションが実装される。 The Secure Element is a one-chip microcomputer with tamper resistance. A secure element implements an application that is used in a particular system (for example, a payment system) and executes a series of sequences that require multiple cryptographic operations (encryption or decryption).
セキュアエレメントは,暗号演算の高速化を図るため,CPU(Central Processing Unit)に代わって暗号演算を行う暗号演算コプロセッサを備える。例えば,特許文献1で開示されている半導体処理装置(ICカード)は,RSAや楕円曲線暗号に係る剰余演算をCPUに代わって行う暗号演算コプロセッサを備えている。
The secure element is equipped with a cryptographic coprocessor that performs cryptographic calculations instead of a CPU (Central Processing Unit) in order to speed up cryptographic calculations. For example, the semiconductor processing device (IC card) disclosed in
数式を定義する暗号パラメータを必要とする暗号演算の場合,暗号演算コプロセッサを用いた暗号演算を行う前に,暗号演算で必要な暗号パラメータを暗号演算コプロセッサに入力することが必要になる。例えば,特許文献2で開示されている楕円積和演算計算装置は,楕円積和演算を行う際,楕円積和演算に必要な暗号パラメータP,Q,R,a,b,cなどを演算回路に設定し,T=aP+bQ+cRを演算回路に計算させる。 In the case of a cryptographic operation that requires cryptographic parameters that define a mathematical formula, it is necessary to input the cryptographic parameters required for the cryptographic operation into the cryptographic operation coprocessor before performing the cryptographic operation using the cryptographic operation coprocessor. For example, in the elliptic product-sum calculation device disclosed in Patent Document 2, when performing the elliptic product-sum calculation, the cryptographic parameters P, Q, R, a, b, c, etc. required for the elliptic product-sum calculation are calculated by an arithmetic circuit. and let the arithmetic circuit calculate T=aP+bQ+cR.
暗号演算に必要な暗号パラメータのデータ長が短い場合,暗号演算を行う毎に,暗号演算に必要な暗号パラメータ全てを暗号演算コプロセッサに入力しても,アプリケーションが実行するシーケンスに必要な時間はさほど変わらない。しかし,暗号演算に必要な暗号パラメータのデータ長が長い場合,暗号演算を行う毎に,暗号演算に必要な暗号パラメータ全てを暗号演算コプロセッサに入力すると,暗号演算に必要な暗号パラメータ全てを暗号演算コプロセッサに入力するための時間が,アプリケーションが実行するシーケンスに必要な時間が長くなる一つの要因になる。 If the data length of the cryptographic parameters required for a cryptographic operation is short, even if all the cryptographic parameters required for the cryptographic operation are input to the cryptographic operation coprocessor each time a cryptographic operation is performed, the time required for the sequence executed by the application will be short. not much different. However, if the data length of the cryptographic parameters required for the cryptographic computation is long, inputting all the cryptographic parameters required for the cryptographic computation into the cryptographic computation coprocessor every time the cryptographic computation The time to input to the arithmetic coprocessor is one factor that increases the time required for the sequences executed by the application.
RFC5639で規定されている楕円曲線暗号で上記の問題を説明する。図4は,RFC5639で規定されている楕円曲線暗号において,楕円曲線の定義に必要な暗号パラメータを説明する図である。RFC5639で規定されている楕円曲線暗号に必要な暗号パラメータのビット数には160ビットもあるが,図6では,512ビットの暗号パラメータを図示している。 The above problem will be explained with the elliptic curve cryptography defined in RFC5639. FIG. 4 is a diagram for explaining cryptographic parameters required for defining an elliptic curve in elliptic curve cryptography defined by RFC5639. The elliptic curve cryptography defined in RFC5639 requires 160 bits of cryptographic parameters, but FIG. 6 shows 512-bit cryptographic parameters.
RFC5639で規定されている楕円曲線暗号に必要な暗号パラメータは,p(標数),A(数式1の係数),B(数式1の係数),x(ベースポイントのx座標の値),y(ベースポイントのy座標の値),q(素数位数),h(補因子)を暗号パラメータとして含む。
図4で図示したように,RFC5639で規定されている512ビットの楕円曲線暗号では,h以外の6個の暗号パラメータはすべて512ビットになる。暗号パラメータを変更せずに複数回の楕円曲線暗号演算を実行する場合,6個の512ビットの暗号パラメータを暗号演算コプロセッサに入力する処理が一回で済めば,アプリケーションが実行するシーケンスに必要な時間を短縮できる。 As illustrated in FIG. 4, in the 512-bit elliptic curve cryptography specified by RFC5639, all six encryption parameters other than h are 512 bits. When performing multiple elliptic curve cryptographic operations without changing the cryptographic parameters, if the process of inputting six 512-bit cryptographic parameters to the cryptographic coprocessor is done only once, the sequences required by the application time can be shortened.
このことを鑑みて,本発明は,数式を定義する暗号パラメータを必要とする暗号演算に係る処理を行う暗号演算コプロセッサを備えたセキュアエレメントにおいて,暗号パラメータを変更せずに複数回の暗号演算を実行する場合,暗号パラメータを暗号演算コプロセッサに入力する処理が一回で済むようにすることを目的とする。 In view of this, the present invention provides a secure element equipped with a cryptographic coprocessor that performs processing related to cryptographic operations that require cryptographic parameters that define mathematical expressions. The purpose is to enable the process of inputting the cryptographic parameters to the cryptographic operation coprocessor only once.
上述した課題を解決する第1発明は,数式を定義する暗号パラメータを必要とする暗号演算に係る処理を行う暗号演算コプロセッサと,前記暗号演算コプロセッサを利用して前記暗号演算を行う暗号演算部を備え,前記暗号演算部は,前記暗号演算コプロセッサに前記暗号パラメータを入力すると,この前記暗号パラメータのチェックコードを同一性確認用のチェックコードとしてメモリに保存し,前記同一性確認用のチェックコードとしてメモリに保存した状態で,前記暗号パラメータを前記暗号演算コプロセッサに入力する場合,前記暗号パラメータを前記暗号演算コプロセッサに入力する前に,前記暗号演算コプロセッサに入力する前記暗号パラメータのチェックコードと,この時点でメモリに保存されている前記同一性確認用のチェックコードを比較し,これらのチェックコードが一致すると,前記暗号パラメータを前記暗号演算コプロセッサに入力しない動作を行うことを特徴とするセキュアエレメントである。 The first invention to solve the above-mentioned problems is a cryptographic operation coprocessor that performs processing related to cryptographic operations that require cryptographic parameters that define mathematical expressions, and a cryptographic operation that uses the cryptographic operation coprocessor to perform the cryptographic operations. When the encryption parameter is input to the encryption operation coprocessor, the encryption operation unit stores the check code of the encryption parameter as a check code for identity confirmation in a memory, and stores the check code for the identity confirmation in a memory. When the cryptographic parameters are input to the cryptographic operation coprocessor in a state of being saved in the memory as a check code, the cryptographic parameters to be input to the cryptographic operation coprocessor before inputting the cryptographic parameters to the cryptographic operation coprocessor and the check code for identity confirmation stored in the memory at this time, and if the check codes match, the cryptographic parameter is not input to the cryptographic operation coprocessor. is a secure element characterized by
本発明に係るセキュアエレメントによれば,暗号演算コプロセッサに入力する暗号パラメータと,暗号演算コプロセッサに入力されている暗号パラメータが同一の場合,暗号パラメータを暗号演算コプロセッサに入力しないようにできる。 According to the secure element of the present invention, when the cryptographic parameter input to the cryptographic operation coprocessor and the cryptographic parameter input to the cryptographic operation coprocessor are the same, the cryptographic parameter can be prevented from being input to the cryptographic operation coprocessor. .
ここから,本発明に係る実施形態について記載する。本実施形態は,本発明の理解を容易にするためのものであり,本発明は,本実施形態に限定されるものではない。また,特に断りのない限り,図面は,本発明の理解を容易にするために描かれた模式的な図である。 Embodiments according to the present invention will now be described. This embodiment is intended to facilitate understanding of the present invention, and the present invention is not limited to this embodiment. In addition, unless otherwise specified, the drawings are schematic diagrams drawn to facilitate understanding of the present invention.
図1は,本実施形態に係るセキュアエレメント1を説明する図である。セキュアエレメント1は耐タンパー性を有するワンチップマイコンである。図1で図示したように,セキュアエレメント1は,モバイル端末1a,SIM1b,ICカード1cなど,セキュアな取引(例えば,決済取引)を行うための媒体や装置に実装される。
FIG. 1 is a diagram for explaining a
図2は,セキュアエレメント1のアーキテクチャを説明する図である。図2で図示したセキュアエレメント1のアーキテクチャには,ハードウェア10,オペレーティングシステム11およびアプリケーション12を含んでいる。
FIG. 2 is a diagram explaining the architecture of the
セキュアエレメント1のハードウェア10はワンチップマイコンになる。セキュアエレメント1のハードウェア10では,中央演算処理装置であるCPU101(Central Processing Unit),メインメモリとなるRAM102(Random Access Memory),電気的に書き換え可能な不揮発性メモリであるNVM103(Non-volatile memory),時間を計測するTimer104および上位装置と接続するためのI/O105に加え,CPU101に代わって所定の暗号演算を行う暗号演算コプロセッサ106がインターフェイス107に接続している。暗号演算コプロセッサ106に行わせる暗号演算は,数式を定義する暗号パラメータを必要とする暗号演算で,このような暗号演算としては楕円曲線暗号が有名である。
The
セキュアエレメント1のオペレーティングシステム11は,ハードウェア10を利用した機能を提供するソフトウェアである。アプリケーション12は,複数回の暗号演算を必要とする一連のシーケンスを実行するソフトウェアで,オペレーティングシステム11上で動作するソフトウェアである。
The
セキュアエレメント1のオペレーティングシステム11は,ハードウェア10を利用する様々な機能をアプリケーション12に提供する。セキュアエレメント1は,この機能の一つとして,暗号演算コプロセッサ106に暗号演算を行わせる暗号演算部110と,暗号演算部110を利用するための複数種のAPI111(Application Programming Interface)を有している。暗号演算部110は,CPU101を動作させるコンピュータプログラムで実現される機能で,オペレーティングシステム11がアプリケーション12に提供するライブラリに暗号演算部110を含ませることができる。
An
暗号演算部110を利用するためのAPI111の詳細仕様は任意である。ここでは,暗号パラメータを設定するAPI111,暗号鍵を設定するAPI111,演算対象データを設定するAPI111および暗号演算を実行させるAPI111が,暗号演算部110を利用するためのAPI111に含まれる。暗号パラメータを設定するAPI111は,暗号パラメータの種類ごとに用意されるのが一般的である。例えば,RFC5639で規定されている楕円曲線暗号の場合,p,A,B,x,y,qおよびhごとに,暗号パラメータを設定するAPI111が用意される。
The detailed specifications of the
オペレーティングシステム11の暗号演算部110は,アプリケーションが実行するシーケンスに必要な時間の短縮を目的として,暗号パラメータを変更せずに複数回の暗号演算を実行する場合,暗号パラメータを暗号演算コプロセッサ106に入力する処理が一回で済むように構成されている。
The
暗号演算部110は,暗号パラメータの同一性確認に,暗号パラメータの特徴を示すデータであるチェックコードを利用する。本実施形態において,暗号パラメータの同一性確認とは,アプリケーション12から引き渡され,暗号演算コプロセッサ106に入力する暗号パラメータと,暗号演算部110に設定されている暗号パラメータが同一であるか確認することを意味する。暗号パラメータの特徴を示すチェックコードとしては,例えば,多項式により演算されるCRC(Cyclic Redundancy Check)などの誤り検出符号や,SHA2(Secure Hash Algorithm)などのハッシュ関数から演算されるハッシュ値を用いることができる。
The
暗号パラメータの同一性確認を実行できるように,暗号演算部110は,暗号演算コプロセッサ106に暗号パラメータを入力すると,この暗号パラメータのチェックコードを同一性確認用のチェックコードとしてメモリに保存する。同一性確認用のチェックコードはRAM102に格納するのが一般的であるが,同一性確認用のチェックコードはNVM103に格納することもできる。
When cryptographic parameters are input to the
暗号演算部110は,同一性確認用のチェックコードとしてメモリに保存した状態で,アプリケーション12から引き渡された暗号パラメータを暗号演算コプロセッサ106に入力する場合,暗号パラメータを暗号演算部110に入力する前に,アプリケーション12から引き渡された暗号パラメータのチェックコードと,この時点でメモリに保存されている同一性確認用のチェックコードと比較する。これらのチェックコードが一致すると,暗号演算部110は,アプリケーション12から引き渡された暗号パラメータは暗号演算コプロセッサ106に入力されていると判断し,暗号パラメータを暗号演算コプロセッサ106に入力しない。
The
図3は,セキュアエレメント1が備える暗号演算部110の動作を説明する図である。暗号演算部110は,アプリケーション12がAPI111の一つを呼び出すと起動し,アプリケーション12が呼び出したAPI111の種類により処理を多岐分岐する(S1)。
FIG. 3 is a diagram for explaining the operation of the
アプリケーション12が呼び出したAPI111が,暗号パラメータを設定するAPI111の場合,暗号演算部110は,暗号パラメータの設定に係る処理(S2)を実行する。暗号パラメータを設定するAPI111の引数には,暗号パラメータの種類と暗号パラメータそのものが含まれる。
When the
暗号パラメータの設定に係る処理(S2)において,暗号演算部110は,まず,API111を利用してアプリケーション12から引き渡された暗号パラメータのチェックコードを演算する(S20)。例えば,チェックコードにハッシュ値を用いる場合,暗号演算部110は,暗号パラメータをSHA2などのハッシュ関数に代入することで,暗号パラメータのチェックコードを演算する。
In the processing (S2) related to the setting of cryptographic parameters, the
次に,暗号演算部110は,アプリケーション12から引き渡された暗号パラメータの種類に対応する同一性確認用のチェックコードをメモリから取得し(S21),同一性確認用のチェックコードの有無により処理を分岐する(S22)。
Next, the
同一性確認用のチェックコードがメモリに無い場合,暗号演算部110は,暗号パラメータは暗号演算コプロセッサ106に入力されていないため,暗号パラメータを暗号演算コプロセッサ106に入力するステップ(S24)に進む。
If the check code for identity confirmation does not exist in the memory, the cryptographic parameters have not been input to the
同一性確認用のチェックコードがメモリに有る場合,暗号演算部110は,アプリケーション12から引き渡された暗号パラメータから演算したチェックコードと同一性確認用のチェックコードを比較する(S23)。
When the check code for identity confirmation exists in the memory, the
アプリケーション12から引き渡された暗号パラメータから演算したチェックコードと同一性確認用のチェックコードが一致することは,この時点で,アプリケーション12から引き渡された暗号パラメータがすでに暗号演算部110に入力されていることを意味する。よって,暗号演算部110は,暗号パラメータの入力に係る時間を省くため,アプリケーション12から引き渡された暗号パラメータを暗号演算コプロセッサ106に入力することなく,暗号パラメータの設定に係る処理(S2)を終了する。
If the check code calculated from the cryptographic parameters delivered from the
アプリケーション12から引き渡された暗号パラメータから演算したチェックコードと同一性確認用のチェックコードが一致しないことは,この時点で,アプリケーション12から引き渡された暗号パラメータとこの時点で暗号演算部110に入力している暗号パラメータが異なることを意味する。よって,暗号演算部110は,暗号演算コプロセッサ106に入力した暗号パラメータを更新するため,アプリケーション12から引き渡された暗号パラメータを暗号演算コプロセッサ106に入力する(S24)。次に,暗号演算部110は,同一性確認用のチェックコードを更新するため,アプリケーション12から引き渡された暗号パラメータの種類に関連付けてメモリに保存されている同一性確認用のチェックコードを,アプリケーション12から引き渡された暗号パラメータから演算したチェックコードに書き換える処理を実行し(S25),暗号パラメータの設定に係る処理(S2)を終了する。
If the check code calculated from the cryptographic parameters handed over from the
例えば,暗号演算部110が対応している暗号演算が,RFC5639で規定されている楕円曲線暗号の場合,少なくともp,A,B,x,y,qに,暗号パラメータの設定に係る処理(S2)が繰り返し実行されることになる。なお,hは1バイトの値になるため,暗号パラメータの同一性確認を省いてもよい。
For example, if the cryptographic computation supported by the
アプリケーション12が呼び出したAPI111が,暗号パラメータを設定するAPI111以外の場合について説明しておく。
A case where the
アプリケーション12が呼び出したAPI111が,暗号鍵を設定するAPI111の場合,暗号演算部110は,暗号鍵の設定に係る処理(S3)を実行する。暗号鍵を設定するAPI111の引数には暗号鍵が含まれ,暗号演算部110は,この暗号鍵を暗号演算コプロセッサ106に入力して,暗号鍵の設定に係る処理(S3)を終了する。
When the
アプリケーション12が呼び出したAPI111が,演算対象データを設定するAPI111の場合,暗号演算部110は,演算対象データの設定に係る処理(S4)を実行する。演算対象データを設定するAPI111の引数には演算対象データが含まれ,暗号演算部110は,この演算対象データを暗号演算コプロセッサ106に入力して,演算対象データの設定に係る処理(S4)を終了する。
When the
アプリケーション12が呼び出したAPI111が,暗号演算を実行するAPI111の場合,暗号演算部110は,暗号演算の実行に係る処理(S5)を実行する。暗号演算を実行するAPI111の引数には暗号演算の種類(暗号化または復号)が含まれ,暗号演算部110は,この暗号演算の種類を暗号演算コプロセッサ106に入力して,暗号演算コプロセッサ106に暗号演算を実行させて,暗号演算の実行に係る処理(S5)は終了する。
When the
1 セキュアエレメント
10 ハードウェア
106 暗号演算コプロセッサ
11 オペレーティングシステム
110 暗号演算部
111 API
12 アプリケーション
1
12 applications
Claims (1)
A cryptographic operation coprocessor that performs processing related to cryptographic operations that require cryptographic parameters that define mathematical expressions, and a cryptographic operation unit that performs the cryptographic operations using the cryptographic operation coprocessor, wherein the cryptographic operation unit When the cryptographic parameters are input to the cryptographic operation coprocessor, the check code of the cryptographic parameters is stored in the memory as the check code for identity confirmation, and in the state of being stored in the memory as the check code for identity confirmation, the When cryptographic parameters are input to the cryptographic operation coprocessor, before inputting the cryptographic parameters to the cryptographic operation coprocessor, a check code for the cryptographic parameters to be input to the cryptographic operation coprocessor and stored in memory at this time. The secure element compares the check codes for confirming identity that are stored in the secure element, and if the check codes match, the secure element performs an operation not to input the cryptographic parameter to the cryptographic operation coprocessor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2019097664A JP7192658B2 (en) | 2019-05-24 | 2019-05-24 | secure element |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2019097664A JP7192658B2 (en) | 2019-05-24 | 2019-05-24 | secure element |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2020194997A JP2020194997A (en) | 2020-12-03 |
JP7192658B2 true JP7192658B2 (en) | 2022-12-20 |
Family
ID=73547658
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2019097664A Active JP7192658B2 (en) | 2019-05-24 | 2019-05-24 | secure element |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP7192658B2 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP7439847B2 (en) | 2022-02-24 | 2024-02-28 | 大日本印刷株式会社 | Electronic information storage medium, key data setting method, and program |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2007334660A (en) | 2006-06-15 | 2007-12-27 | Renesas Technology Corp | Microcomputer chip for ic card, microcomputer for ic card, and ic card |
JP2008252299A (en) | 2007-03-29 | 2008-10-16 | Hitachi Ltd | Encryption processing system and encryption processing method |
JP2017072897A (en) | 2015-10-05 | 2017-04-13 | 株式会社日立製作所 | Authentication system and authentication method |
-
2019
- 2019-05-24 JP JP2019097664A patent/JP7192658B2/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2007334660A (en) | 2006-06-15 | 2007-12-27 | Renesas Technology Corp | Microcomputer chip for ic card, microcomputer for ic card, and ic card |
JP2008252299A (en) | 2007-03-29 | 2008-10-16 | Hitachi Ltd | Encryption processing system and encryption processing method |
JP2017072897A (en) | 2015-10-05 | 2017-04-13 | 株式会社日立製作所 | Authentication system and authentication method |
Also Published As
Publication number | Publication date |
---|---|
JP2020194997A (en) | 2020-12-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8006078B2 (en) | Central processing unit having branch instruction verification unit for secure program execution | |
CN107111966B (en) | Method for testing and reinforcing software application | |
CN104424428B (en) | For monitoring the electronic circuit and method of data processing | |
RU2579990C2 (en) | Protection from passive sniffing | |
JP4962165B2 (en) | Cryptographic processing apparatus, cryptographic processing program, and cryptographic processing method | |
JP7192658B2 (en) | secure element | |
US8311212B2 (en) | Method of processing data protected against attacks by generating errors and associated device | |
CN111602366A (en) | Cryptographic function and authentication of replaceable printer components | |
US11263313B2 (en) | Securing execution of a program | |
JP2005045760A (en) | Cipher processing method and device thereof | |
US20220237287A1 (en) | Method for Securing Against Fault Attacks a Verification Algorithm of a Digital Signature of a Message | |
CN109299621B (en) | Protection against level attacks for iterative computations | |
EP3195175B1 (en) | System and method for protecting a device against attacks on processing flow using a code pointer complement | |
EP3889816A1 (en) | Method for securely processing digital information in a secure element | |
CN104380305A (en) | Method for backing-up data outside of a secure microcircuit | |
US11329796B2 (en) | Protection of an iterative calculation | |
US10628609B2 (en) | Method and apparatus for performing signature verification by offloading values to a server | |
US20190379526A1 (en) | Protection of an iterative calculation | |
CN115344832A (en) | Secure device update by passing encryption and data together |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20220325 |
|
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: 20221108 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20221121 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 7192658 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |