JP2012530961A - Method and apparatus for providing secure application execution - Google Patents

Method and apparatus for providing secure application execution Download PDF

Info

Publication number
JP2012530961A
JP2012530961A JP2012516046A JP2012516046A JP2012530961A JP 2012530961 A JP2012530961 A JP 2012530961A JP 2012516046 A JP2012516046 A JP 2012516046A JP 2012516046 A JP2012516046 A JP 2012516046A JP 2012530961 A JP2012530961 A JP 2012530961A
Authority
JP
Japan
Prior art keywords
enclave
key
page
instruction
epc
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2012516046A
Other languages
Japanese (ja)
Other versions
JP5443599B2 (en
Inventor
エックス. マッケーン、フランシス
ブイ. ロザス、カルロス
アール. サヴァガンカー、ウダイ
ピー. ジョンソン、シモン
アール. スカーラタ、ヴィンセント
エー. ゴールドスミス、マイケル
ブリッケル、アーニー
リ、ジャンタオ
シー. ハーバート、ホワード
デワン、プラシャント
ジェイ. トロポカ、ステファン
ネイガー、ギルバート
ダーハム、デーヴィッド
ゲラウンケ、ゲアリー
リント、バーナード
ダイケ、ドン エー. ヴァン
チフラ、ジョセフ
ジェヤシング、スタリンセルヴァラジ
ドレン、ステファン アール. ヴァン
ロジャース、ディオン
ガーネイ、ジョン
アルトマン、アシャー
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Intel Corp
Original Assignee
Intel Corp
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
Family has litigation
First worldwide family litigation filed litigation Critical https://patents.darts-ip.com/?family=44196072&utm_source=google_patent&utm_medium=platform_link&utm_campaign=public_patent_search&patent=JP2012530961(A) "Global patent litigation dataset” by Darts-ip is licensed under a Creative Commons Attribution 4.0 International License.
Application filed by Intel Corp filed Critical Intel Corp
Publication of JP2012530961A publication Critical patent/JP2012530961A/en
Application granted granted Critical
Publication of JP5443599B2 publication Critical patent/JP5443599B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/14Protection against unauthorised use of memory or access to memory
    • G06F12/1458Protection against unauthorised use of memory or access to memory by checking the subject access rights
    • G06F12/1491Protection against unauthorised use of memory or access to memory by checking the subject access rights in a hierarchical protection system, e.g. privilege levels, memory rings
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/70Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer
    • G06F21/71Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information
    • G06F21/72Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information in cryptographic circuits
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/70Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer
    • G06F21/71Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information
    • G06F21/74Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information operating in dual or compartmented mode, i.e. at least one secure mode
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/10Address translation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2105Dual mode as a secondary aspect

Abstract

コンピュータシステム内でセキュアなアプリケーションおよびデータの整合性をとることを可能とする技術を開示する。一実施形態では、アプリケーションおよびデータを格納および実行することのできる1以上のセキュアなエンクレーブを構築する。
【選択図】図1
Disclosed is a technique that enables secure application and data consistency within a computer system. In one embodiment, one or more secure enclaves are built that can store and execute applications and data.
[Selection] Figure 1

Description

本発明の実施形態は概して、情報処理分野に係り、より詳しくは、コンピューティングシステムおよびマイクロプロセッサのセキュリティ分野に係る。   Embodiments of the present invention generally relate to the information processing field, and more particularly to the security field of computing systems and microprocessors.

コンピュータシステム内におけるアプリケーションおよびそのデータの間の実行および整合性を確保することは、益々重要になってきている。先行技術におけるセキュリティ技術では、セキュアなアプリケーションおよびデータを柔軟に且つ信頼性高く適切に提供することができない。   Ensuring execution and consistency between applications and their data within a computer system is becoming increasingly important. Prior art security techniques cannot provide secure applications and data in a flexible and reliable manner.

本発明の実施形態は、添付図面において限定ではなく例示として示されており、図面において同様の参照番号を付された部材同士は同様の部材である。   Embodiments of the present invention are illustrated by way of example and not limitation in the accompanying drawings, in which like reference numerals denote like members.

本発明の少なくとも1つの実施形態を利用することができるマイクロプロセッサのブロック図である。FIG. 6 is a block diagram of a microprocessor that can utilize at least one embodiment of the present invention. 本発明の少なくとも1つの実施形態を利用することができる共有バスコンピュータシステムのブロック図である。1 is a block diagram of a shared bus computer system that can utilize at least one embodiment of the present invention. FIG. 本発明の少なくとも1つの実施形態を利用することができるポイントツーポイントインターコネクトコンピュータシステムのブロック図である。FIG. 3 is a block diagram of a point-to-point interconnect computer system that can utilize at least one embodiment of the present invention. 本発明の少なくとも1つの実施形態を利用することができるマルチコアマイクロプロセッサのブロック図である。1 is a block diagram of a multi-core microprocessor that can utilize at least one embodiment of the present invention. FIG. 本発明の一実施形態のセキュアなエンクレーブ(SE)の可能性のある実装例である。FIG. 4 is a possible implementation of a secure enclave (SE) of an embodiment of the present invention. 本発明の少なくとも1つの実施形態を利用することができるマイクロプロセッサのブロック図である。FIG. 6 is a block diagram of a microprocessor that can utilize at least one embodiment of the present invention. 本発明の一実施形態に実装可能なエンクレーブページキャッシュの一部分にアクセスする制御構造の一例を示す。Fig. 4 illustrates an example of a control structure for accessing a portion of an enclave page cache that can be implemented in an embodiment of the present invention. 本発明の一実施形態におけるスレッド制御構造の一例を示しており、データ構造同士の縫合を示す。Fig. 4 illustrates an example of a thread control structure in one embodiment of the present invention, illustrating stitching of data structures. 本発明の一実施形態にみることができる、クオーティングとして知られているソフトウェア認証プロセスの一ステップを示す。Fig. 4 illustrates a step of a software authentication process known as quota, which can be found in an embodiment of the present invention. 本発明の一実施形態における、計測値レジスタセットからクオートを生成するための各ステップを示す。FIG. 6 shows steps for generating quotes from a measurement value register set in an embodiment of the present invention. FIG. 本発明の一実施形態における計測値レジスタMR_EADDを更新するEADDプロセスを示す。6 shows an EADD process for updating a measurement value register MR_EADD in an embodiment of the present invention. 本発明の一実施形態におけるレポートを生成するEREPORT命令を示す。Fig. 6 illustrates an EEPPORT instruction for generating a report in an embodiment of the present invention. 本発明の一実施形態に見られる中継保護メカニズムを示す。Fig. 4 illustrates a relay protection mechanism found in an embodiment of the present invention. 本発明の一実施形態に見られる中継保護メカニズムのMACツリー構造の部分の一例を示す。Fig. 4 illustrates an example of a portion of a MAC tree structure of a relay protection mechanism found in an embodiment of the present invention. ページ不良エラーコードマップの実装法を示す本発明の一実施形態を示す。4 shows an embodiment of the present invention showing how to implement a page fault error code map. 本発明の一実施形態のエンクレーブを立ち上げる許可証を生成するプロセスの一例を示す。FIG. 6 illustrates an example of a process for generating a permit to launch an enclave according to an embodiment of the present invention. 本発明の一実施形態における、単一のパッケージのセキュアなエンクレーブのためのプラットフォームキー階層の実装例を示す。FIG. 6 illustrates an example implementation of a platform key hierarchy for a single package secure enclave in an embodiment of the invention. FIG. 本発明の一実施形態における、マイクロコードベースのセキュアなエンクレーブキー階層の一例を示す。Fig. 4 illustrates an example of a microcode based secure enclave key hierarchy in an embodiment of the present invention. 本発明の一実施形態にみることができるエンクレーブCTL_MSRレジスタを示す。Fig. 4 illustrates an enclave CTL_MSR register that can be found in one embodiment of the invention. 本発明の一実施形態で利用される暗号ブロック鎖アルゴリズムを示す。Fig. 4 illustrates a cryptographic block chain algorithm utilized in one embodiment of the present invention. 本発明の一実施形態における単一のAESブロックの暗号を示すフローチャートである。6 is a flowchart illustrating encryption of a single AES block in an embodiment of the present invention. 本発明の一実施形態で実装される暗号ブロック鎖アルゴリズムを利用する複数のAESブロックの暗号例を示すフローチャートである。It is a flowchart which shows the encryption example of several AES block using the encryption block chain | strand algorithm implemented by one Embodiment of this invention. スタックスイッチで割り込んだ後のアプリケーションおよび割り込みスタックの一実施形態を示す。Fig. 4 illustrates an embodiment of an application and interrupt stack after interrupting with a stack switch. 本発明の一実施形態の複数の状態セーブ領域スロットのスタックを実装する方法の一例を示す。6 illustrates an example of a method for implementing a stack of multiple state save area slots according to an embodiment of the present invention. 本発明の一実施形態における割り込み、不良、およびトラップの状態遷移を有する状態マシンの一部を示す。FIG. 4 illustrates a portion of a state machine having interrupt, fault, and trap state transitions in an embodiment of the invention. 本発明の一実施形態における、デジタル乱数生成器のためのプロセッサパッケージを示す。Fig. 3 illustrates a processor package for a digital random number generator in an embodiment of the invention. 本発明の一実施形態におけるデバッグレジスタDR7 2700を示す。Fig. 8 shows a debug register DR7 2700 in an embodiment of the invention.

本発明の実施形態は、セキュアなアプリケーションおよびデータを柔軟に且つ信頼性高く提供する技術に係る。本発明には複数の態様の複数の実施形態があるが、「セキュアなエンクレーブアーキテクチャ」なる添付書類を、少なくとも1つの実施形態としてここに参照として組み込む。しかし、組み込まれた文献は、本発明の実施形態の範囲を制限するものではなく、本発明の精神および範囲内で他の実施形態も利用可能である。   Embodiments described herein relate to a technique for providing a secure application and data in a flexible and reliable manner. Although the present invention has multiple embodiments of multiple aspects, the appendix “Secure Enclave Architecture” is hereby incorporated by reference as at least one embodiment. However, the incorporated literature does not limit the scope of the embodiments of the invention, and other embodiments may be used within the spirit and scope of the invention.

図1は、本発明の少なくとも1つの実施形態を利用することができるマイクロプロセッサのブロック図である。特に図1は、それぞれがローカルキャッシュ107と113とに関連付けられた1以上のプロセッサコア105および110を有するマイクロプロセッサ100を示す。さらに図1には、ローカルキャッシュ107および113のそれぞれに格納されている情報の少なくとも一部のバージョンを格納する共有キャッシュメモリ115が示されている。一部の実施形態では、マイクロプロセッサ110はまた、図1に示されていない他の論理(例えば、集積メモリコントローラ、集積グラフィックコントローラ、および、コンピュータシステム内の、例えばI/O制御等の他の機能を実行する論理)を含むこともできる。一実施形態では、マルチプロセッサシステム内の各マイクロプロセッサまたはマルチコアプロセッサ内の各プロセッサコアは、少なくとも1つの実施形態では、セキュアなエンクレーブ技術を実行するための論理119を含む、または論理119と関連付けられている。論理には回路、ソフトウェア(有形媒体に具現化されている)、またはこれら両方を含むことで、一部の先行技術の実装例よりも効率的に複数のコアまたはプロセッサ間のリソース割り当てを行うことができる。   FIG. 1 is a block diagram of a microprocessor that can utilize at least one embodiment of the present invention. In particular, FIG. 1 shows a microprocessor 100 having one or more processor cores 105 and 110, each associated with a local cache 107 and 113, respectively. Further, FIG. 1 shows a shared cache memory 115 that stores at least a partial version of information stored in each of the local caches 107 and 113. In some embodiments, the microprocessor 110 may also include other logic not shown in FIG. 1 (eg, integrated memory controller, integrated graphics controller, and other logic within the computer system, such as I / O control). Logic to perform the function). In one embodiment, each microprocessor in a multiprocessor system or each processor core in a multicore processor includes or is associated with logic 119 in at least one embodiment to perform secure enclave technology. ing. Logic includes circuitry, software (implemented in a tangible medium), or both, allowing for more efficient resource allocation between multiple cores or processors than some prior art implementations Can do.

例えば図2は、本発明の一実施形態を利用することができるフロントサイドバス(FSB)コンピュータシステムを示す。プロセッサ201、205,210、または215いずれもが、プロセッサコア223、227、233、237、243、247、253、257を含む、またはこれらと関連付けられているローカルレベル1(L1)キャッシュメモリ220、225、230、235、240、245、250、255のうちいずれかの情報にアクセスすることができる。さらには、プロセッサ201、205、210、または215いずれもが、チップセット265を介して、システムメモリ260から、または、共有レベル2(L2)キャッシュ203、207、213、217のいずれかからの情報にアクセスすることができる。図2に示すプロセッサのうち1以上は、少なくとも一実施形態におけるセキュアなエンクレーブ技術を実行する論理219を含む、または論理219と関連付けられてよい。   For example, FIG. 2 illustrates a front side bus (FSB) computer system that can utilize an embodiment of the present invention. Any of the processors 201, 205, 210, or 215 includes a local level 1 (L1) cache memory 220 that includes or is associated with processor cores 223, 227, 233, 237, 243, 247, 253, 257, Information of any of 225, 230, 235, 240, 245, 250, and 255 can be accessed. Furthermore, any of the processors 201, 205, 210, or 215 can receive information from the system memory 260 or from the shared level 2 (L2) caches 203, 207, 213, and 217 via the chipset 265. Can be accessed. One or more of the processors shown in FIG. 2 may include or be associated with logic 219 that performs secure enclave technology in at least one embodiment.

図2に示すFSBコンピュータシステムに加えて、ポイントツーポイント(P2P)インターコネクトシステムおよびリングインターコネクトシステム等の他のシステム構成を、本発明の様々な実施形態と協働して利用することもできる。例えば図3のP2Pシステムは、幾つかプロセッサを含むことができ、このうち2つのプロセッサ370、380が例示されている。プロセッサ370、380はそれぞれ、メモリ32、34と接続するためにローカルメモリコントローラハブ(MCH)372、382を含んでよい。プロセッサ370、380は、PtPインタフェース回路378、388を利用してポイントツーポイント(PtP)インタフェース350を介してデータを交換することができる。プロセッサ370、380はそれぞれ、ポイントツーポイントインタフェース回路376、394、386、398を利用して個々のPtPインタフェース352、354を介してチップセット390とデータを交換することができる。チップセット390はさらに、高性能グラフィックインタフェース339を介して高性能グラフィック回路338とデータを交換することができる。本発明の実施形態は、任意の数のプロセッサコアを有する任意のプロセッサ内に配置されてもよいし、または、図3のPtPバスエージェントそれぞれの内部に配置されてもよい。一実施形態では、任意のプロセッサコアが、ローカルキャッシュメモリ(不図示)を含む、またはこれと関連付けられていてよい。さらに、共有キャッシュ(不図示)が、両プロセッサ外のプロセッサに含まれていながらも、p2pインターコネクトを介して両プロセッサに接続されており、プロセッサを低電力モードにする場合、これらプロセッサの両方または片方のローカルキャッシュ情報を共有キャッシュに格納できる、という構成も可能である。図3に示す1以上のプロセッサまたはコアは、少なくとも1つの実施形態においては、セキュアなエンクレーブ技術を実行する論理319を含む、または論理319と関連付けられていてよい。   In addition to the FSB computer system shown in FIG. 2, other system configurations such as point-to-point (P2P) interconnect systems and ring interconnect systems can also be utilized in conjunction with various embodiments of the present invention. For example, the P2P system of FIG. 3 may include several processors, of which two processors 370 and 380 are illustrated. Processors 370 and 380 may include local memory controller hubs (MCH) 372 and 382 for connection with memories 32 and 34, respectively. Processors 370, 380 can exchange data via point-to-point (PtP) interface 350 utilizing PtP interface circuits 378, 388. Processors 370, 380 can exchange data with chipset 390 via individual PtP interfaces 352, 354 utilizing point-to-point interface circuits 376, 394, 386, 398, respectively. Chipset 390 can also exchange data with high performance graphics circuitry 338 via high performance graphics interface 339. Embodiments of the present invention may be located within any processor having any number of processor cores, or may be located within each of the PtP bus agents of FIG. In one embodiment, any processor core may include or be associated with a local cache memory (not shown). In addition, if a shared cache (not shown) is included in processors outside both processors but is connected to both processors via a p2p interconnect, and both or one of these processors are put into low power mode. The local cache information can be stored in the shared cache. One or more processors or cores shown in FIG. 3 may include or be associated with logic 319 that performs secure enclave technology in at least one embodiment.

少なくとも1つの実施形態の1以上の態様は、プロセッサ内の様々な論理を表す機械可読媒体に格納される代表的なデータにより実装することができ、データが機械により読み出されることで、機械は、ここに記載する技術を実行する論理を製造する。「IPコア」として知られているような表現は、有形の機械可読媒体(「テープ」)に格納されて、論理またはプロセッサを実際に製造する製造機械に装填するために様々な顧客または製造用設備に供給されてよい。   One or more aspects of at least one embodiment can be implemented by representative data stored on a machine-readable medium that represents various logic within the processor, where the data is read by the machine, Manufacture logic that implements the techniques described herein. The representation as known as "IP core" is stored on a tangible machine readable medium ("tape") for various customers or manufacturing to load logic or a processor into the actual manufacturing machine. May be supplied to the facility.

従って、マイクロアーキテクチャメモリ領域アクセスを方向付ける方法および装置が記載された。上述した記載は、例示を意図しており限定は意図していない。数多くの他の実施形態も、上述した記載を読み理解した当業者には明らかであろう。従って本発明の範囲は、添付請求項および請求項が含みうる均等物の全範囲を参照して決定される。   Accordingly, a method and apparatus for directing microarchitecture memory region access has been described. The above description is intended to be illustrative and not limiting. Numerous other embodiments will be apparent to those of skill in the art upon reading and understanding the above description. Accordingly, the scope of the invention should be determined with reference to the appended claims and the full scope of equivalents which can be included.

セキュアなエンクレーブは、アプリケーションにOSプロセスのコンテキスト内でコードを実行してデータを格納させるための安全な場所を提供する命令セットである。この環境下で実行されるアプリケーションはエンクレーブと称される。エンクレーブは、エンクレーブページキャッシュ(EPC)から実行される。エンクレーブページは、OSによりEPCに装填される。エンクレーブのページがEPCから取り出されるたびに、暗号保護を利用して、エンクレーブの機密性を保護して、エンクレーブをEPCに戻すときの改ざんを検知することができる。EPC内で、エンクレーブデータは、プロセッサが提供するアクセス制御メカニズムを利用して保護される。以下の表2−1は、特権のないエンクレーブ命令の完全リストを提供している。

Figure 2012530961
A secure enclave is an instruction set that provides a secure location for an application to execute code and store data within the context of an OS process. An application executed in this environment is called an enclave. Enclaves are executed from an enclave page cache (EPC). The enclave page is loaded into the EPC by the OS. Each time an enclave page is retrieved from the EPC, cryptographic protection can be used to protect the enclave's confidentiality and detect tampering when returning the enclave to the EPC. Within the EPC, the enclave data is protected using an access control mechanism provided by the processor. Table 2-1 below provides a complete list of unprivileged enclave instructions.
Figure 2012530961

これらの命令はリング3でのみ実行される。全ての他の時点においては、これらは#UD不良を生成する。表2−2は、特権を有する命令のリストを提供する。

Figure 2012530961
These instructions are executed only on ring 3. At all other times, these generate #UD failures. Table 2-2 provides a list of privileged instructions.
Figure 2012530961

エンクレーブページキャッシュ(EPC)は、エンクレーブコードを実行して、保護されたエンクレーブデータにアクセスする場所である。EPCは、プラットフォームの物理アドレス空間内に配置されるが、アクセスはSE命令を利用してのみ可能となる。EPCは、多くの異なるエンクレーブからのページを含んでよく、ページの整合性および機密性を保護するアクセス制御メカニズムを提供する。ページキャッシュは、プラットフォームのコヒーレントな物理メモリに利用されるものに類似したコヒーレンスプロトコルを維持している。   The enclave page cache (EPC) is a place where enclave code is executed to access protected enclave data. The EPC is located in the physical address space of the platform, but access is only possible using the SE instruction. EPC may include pages from many different enclaves and provides an access control mechanism that protects page integrity and confidentiality. The page cache maintains a coherence protocol similar to that used for the platform's coherent physical memory.

EPCは幾つかの方法でインスタンス化することができる。例えば、プロセッサパッケージ上の専用SRAMから構築することができる。クリプト・メモリ・アパーチャ(Crypto Memory Aperture)が好適な実装メカニズムとして知られている。このメカニズムにより、EPCを大きくすることができる。CMAについては以下で詳述する。   An EPC can be instantiated in several ways. For example, it can be constructed from dedicated SRAM on a processor package. Crypto Memory Aperture is known as a suitable implementation mechanism. By this mechanism, EPC can be increased. CMA will be described in detail below.

エンクレーブページキャッシュマップ(EPCM)は、EPC内の各ページに関連付けられた状態情報を含む。この状態は、ページが属すエンクレーブ、装填されるページの状態等の情報を提供する。EPCからページが取り出されると、状態情報もエクスポートされて、暗号手段を利用して保護される。エンクレーブページをEPCに再装填するときには、状態情報を検証する。   The enclave page cache map (EPCM) includes state information associated with each page in the EPC. This status provides information such as the enclave to which the page belongs, the status of the loaded page, and so on. When a page is retrieved from the EPC, the status information is also exported and protected using encryption means. When reloading the enclave page into the EPC, the status information is verified.

図4は、本発明の少なくとも1つの実施形態を利用することができるマルチコアマイクロプロセッサ499のブロック図である。マイクロプロセッサ499は、複数のコア400、420を含むことができる。コア400は、CR3 402、SMBR404、ページミスハンドラ408、PMHE410、および変換ルックアサイドバッファ412を含むことができる。コア420は、CR3 422、SMBR424、ページミスハンドラ428、PMHE430、および変換ルックアサイドバッファ432を含むことができる。本発明の一部の実施形態では、マイクロプロセッサ499は、コア400とコア420との間で共有されるレベル1キャッシュ440を含む。レベル1キャッシュ440は、最終レベルのキャッシュ445との間でデータをやりとりすることができる。ホームエージェント450は、最終レベルのキャッシュ445に接続して、暗号エンジン452に接続(attach to)することができる。ホームエージェント450は、クリプト・メモリ・アパーチャ480の物理アドレス空間488を、メモリコントローラ454を介して評価(assess)することができる。クリプト・メモリ・アパーチャ480は、エンクレーブページキャッシュ482、エンクレーブページキャッシュマップ484、補助格納部486、物理アドレス空間の一部488を含む。   FIG. 4 is a block diagram of a multi-core microprocessor 499 that can utilize at least one embodiment of the present invention. The microprocessor 499 can include a plurality of cores 400, 420. Core 400 may include CR3 402, SMBR 404, page miss handler 408, PMHE 410, and translation lookaside buffer 412. Core 420 may include CR3 422, SMBR 424, page miss handler 428, PMHE 430, and translation lookaside buffer 432. In some embodiments of the present invention, the microprocessor 499 includes a level 1 cache 440 that is shared between the core 400 and the core 420. The level 1 cache 440 can exchange data with the final level cache 445. The home agent 450 can connect to the final level cache 445 and attach to the cryptographic engine 452. The home agent 450 can assess the physical address space 488 of the crypto memory aperture 480 via the memory controller 454. The crypto memory aperture 480 includes an enclave page cache 482, an enclave page cache map 484, an auxiliary storage 486, and a portion 488 of the physical address space.

CMAは、EPC、EPCM、その他SE関連の構造をインスタンス化する助けを行うメカニズムである。アパーチャとは、この目的の利用に備えさせられる物理アドレス空間の一領域のことである。   CMA is a mechanism that helps instantiate EPC, EPCM, and other SE related structures. An aperture is an area of the physical address space that is prepared for this purpose.

EPCおよびEPCM(およびその他の実装データ構造)は、アパーチャ内のある位置にマッピングされる。補助格納部は、これらリソースのための実際のデータのことである。EPCのメモリ要求が生成されると、CMAは、暗号化されたEPCデータが含まれている補助格納部の位置に再マッピングを行い、そのデータを取得する。   EPC and EPCM (and other implementation data structures) are mapped to certain locations within the aperture. The auxiliary storage is the actual data for these resources. When an EPC memory request is generated, the CMA performs remapping to the location of the auxiliary storage unit containing the encrypted EPC data, and acquires the data.

一般的には、殆どのSEは、マイクロコードまたは拡張マイクロコードに実装される。CMA、パッケージ外およびコア内のデータ移動制御する論理を含む複数の位置にハードウェアによるサポートが必要である。   In general, most SEs are implemented in microcode or extended microcode. Hardware support is required at multiple locations including CMA, logic to control data movement outside the package and within the core.

図5は、本発明の一実施形態のセキュアなエンクレーブ(SE)の可能性のある実装例である。オペレーティングシステムおよびVMM542は、ELPG命令540を利用して、エンクレーブ532のエンクレーブページを、エンクレーブページキャッシュ544に装填することができる。マイクロプロセッサがエンクレーブ532内で実行していないときには、エンクレーブページキャッシュ544はSERRレジスタ532によるソフトウェアアクセスから保護される。エンクレーブ内で実行する場合には、マイクロコードページテーブルが保護548を提供する。各VMにはVMCSが関連付けられている。VM510はVMCS515に接続されている。VM520はVMCS525に接続されている。VM530はVMCS535に接続されている。SMM500は、別個のコンテナにあってよく、プロセッサ状態は別個のコンテナにあってよい。   FIG. 5 is a possible implementation of a secure enclave (SE) of one embodiment of the present invention. The operating system and VMM 542 can utilize the ELPG instruction 540 to load the enclave page of the enclave 532 into the enclave page cache 544. The enclave page cache 544 is protected from software access by the SERR register 532 when the microprocessor is not executing in the enclave 532. The microcode page table provides protection 548 when executed in an enclave. Each VM is associated with a VMCS. The VM 510 is connected to the VMCS 515. The VM 520 is connected to the VMCS 525. The VM 530 is connected to the VMCS 535. The SMM 500 may be in a separate container and the processor state may be in a separate container.

図5は、セキュアなエンクレーブ実装の一実施形態の高レベル概略図である。この実装例では、EPCは、マイクロコードが管理する別個のコンテナに維持されている。コンテナは、エンクレーブ内で実行されていない場合にはアクセス不可能である。エンクレーブに入った場合には、制御は、別個のコンテナに含まれているEPC内のエンクレーブコードに移される。   FIG. 5 is a high-level schematic diagram of one embodiment of a secure enclave implementation. In this implementation, the EPC is maintained in a separate container managed by microcode. A container is inaccessible when not running in an enclave. When entering the enclave, control is transferred to the enclave code in the EPC contained in a separate container.

エンクレーブ内で実行されている間に起こったページ不良または例外は全て、マイクロコードにより関連OSまたはVMMに反映される。機械がエンクレーブ内で実行していない場合には、EPCへのアクセス制御はSEレンジレジスタ(SERR)により提供される。機械が内部で実行されている場合には、マイクロコードはページテーブルレベルの保護を提供して、実行されているエンクレーブに属さない他のEPCエントリへのアクセスを禁止する。   Any page faults or exceptions that occurred while running in the enclave are reflected in the associated OS or VMM by microcode. If the machine is not running in an enclave, access control to the EPC is provided by the SE range register (SERR). If the machine is running internally, the microcode provides page table level protection and prohibits access to other EPC entries that do not belong to the enclave being executed.

セキュアなエンクレーブを実装する一方法に、一部のプロセッサ内のマイクロコード機能を利用して命令および保護を行う、というものがある。この機能は、エンクレーブの目的達成をセキュアに行うというセキュリティ要件に適合しているだろう。   One way to implement a secure enclave is to use microcode functionality in some processors to provide instructions and protection. This feature will meet the security requirements of secure enclave objectives.

図2−2に示すSERRレジスタは、ページミスハンドラPMHに実装される。レジスタは、各論理プロセッサについて独立してイネーブルおよびディセーブルされてよい。   The SERR register shown in FIG. 2-2 is implemented in the page miss handler PMH. Registers may be enabled and disabled independently for each logical processor.

性能を向上させる実装におけるオプションとして、変換ルックアサイドバッファ(TLB)のエントリがエンクレーブまたは特定のエンクレーブ用であることを示すために、1ビットまたは幾つかのビットを提供する、というものがある。これらのビットが提供されていない場合には、エンクレーブを退出するときに、他のコードがこのエンクレーブにアクセスしないようにするためにTLBフラッシュが必要となる。   An option in an implementation that improves performance is to provide one or several bits to indicate that a translation lookaside buffer (TLB) entry is for an enclave or a specific enclave. If these bits are not provided, a TLB flush is required when leaving the enclave to prevent other code from accessing the enclave.

エンクレーブビットをエンクレーブモードビットと比較する。余剰ビットは、エンクレーブ空間idの機能を提供する。特定のエンクレーブはidを割り当てられてよい。idは、アドレスチェックの一環として、実行中のエンクレーブのidと比較される。TLBサポートは、性能向上策の1つのオプションである。EPCデータの除去によってあるエントリがTLBで無効化された場合、特定のマイクロコード化された撃墜メカニズム(special microcoded shootdown mechanism)が必要となる。一実施形態では、マイクロコードがエンクレーブ信頼境界(enclave trust boundary)内の全ての他のコアと接触をとり、このエントリがどのTLB内にもないことを確かめる。他の実施形態では、他のプロセッサがTLBエントリを無効化したことを確かめる手段をマイクロコードに提供するようにしてもよい。   Compare the enclave bit with the enclave mode bit. The surplus bit provides the function of the enclave space id. A particular enclave may be assigned an id. The id is compared with the id of the running enclave as part of the address check. TLB support is one option for improving performance. If an entry is invalidated in the TLB due to removal of EPC data, a special microcoded shootdown mechanism is required. In one embodiment, the microcode contacts all other cores in the enclave trust boundary to verify that this entry is not in any TLB. In other embodiments, microcode may be provided with a means of verifying that another processor has invalidated the TLB entry.

DMAスヌープを回避してEPCに対して無効化するためには、特別なSADおよび/またはTADエントリが提供される。これら専用のレジスタがEPCを保護する。これは、SERRと同じ値に設定される。   Special SAD and / or TAD entries are provided to avoid DMA snoop and disable for EPC. These dedicated registers protect the EPC. This is set to the same value as SERR.

一実施形態では、各エンクレーブのセキュアなエンクレーブに対してセキュアな鍵を保証するために、マイクロコードは乱数へのセキュアなアクセスを利用することができる。   In one embodiment, microcode can utilize secure access to random numbers to ensure a secure key for each enclave's secure enclave.

エンクレーブは改ざんされないように保護されてよい。改ざん保護に利用されるメカニズムの詳細は、実装例に応じて変わる。これにより、エンクレーブが改ざんされると、改ざんを検知したスレッド上でのさらなる実行が防止される。ユーザにエンクレーブの状態を理解させるために、構築されているエンクレーブを証明するための立証メカニズムを設ける。これには、エンクレーブコンテンツの情報を提示するEREPORT命令が含まれる。   The enclave may be protected from tampering. The details of the mechanism used for tamper protection vary depending on the implementation. Thus, when the enclave is tampered with, further execution on the thread that has detected tampering is prevented. In order for the user to understand the state of the enclave, a verification mechanism is provided to prove the enclave being constructed. This includes an EEPPORT instruction that presents information about the enclave content.

エンクレーブ設計で必要となるマイクロコード符号を簡略化するために、アーキテクチャエンクレーブというコンセプトが開発された。この種類のエンクレーブには、エンクレーブのためのコードの原本に基づいて特別なアクセス特権が与えられる。   In order to simplify the microcode code required for enclave design, the concept of an architectural enclave was developed. This type of enclave is given special access privileges based on the original code for the enclave.

電力サイクルにおけるエンクレーブ状態は、ソフトウェアポリシーに依存している。CMA内のデータは、電力停止時に失われる。エンクレーブを保存することが望ましい場合には、ソフトウェアによって電力サイクルにおいてエンクレーブデータが失われないように保証することができる。EPCに常駐するデータは、ソフトウェアがエンクレーブをS3電力状態中に生かしておきたい場合には、メモリにフラッシュすることができる。ソフトウェアは、電力喪失時にアプリケーションに全てのエンクレーブの除去を義務付ける選択を行うこともできる。   The enclave state in the power cycle depends on the software policy. Data in the CMA is lost when power is shut down. If it is desirable to save the enclave, the software can ensure that no enclave data is lost during the power cycle. Data resident on the EPC can be flushed to memory if the software wants to keep the enclave alive during the S3 power state. The software can also choose to require the application to remove all enclaves when power is lost.

エンクレーブはその位置に応じて保護される。CPUパッケージ外のデータは、暗号化および整合性チェックを利用して保護される。エンクレーブページキャッシュ内のコードおよびデータについては、ページがアクセス制御メカニズムを利用して保護される。   The enclave is protected depending on its position. Data outside the CPU package is protected using encryption and integrity checking. For code and data in the enclave page cache, the page is protected using an access control mechanism.

図6は、本発明の少なくとも1つの実施形態を利用することができるマイクロプロセッサのブロック図である。図6は、複数のプロセッサコア600、605、610、615、およびキャッシュ620を有するマイクロプロセッサ600を示す。エンクレーブデータ635は暗号化することができる。クリプト・メモリ・アパーチャデータ630は、エンクレーブデータ635の保護に利用される。   FIG. 6 is a block diagram of a microprocessor that can utilize at least one embodiment of the present invention. FIG. 6 shows a microprocessor 600 having a plurality of processor cores 600, 605, 610, 615 and a cache 620. The enclave data 635 can be encrypted. The crypto memory aperture data 630 is used to protect the enclave data 635.

システムメモリに常駐しているエンクレーブページは、暗号化および整合性を利用して保護される。ページのEPCへの装填においては、ページはEPCにコピーされ、復号化されて、そのページの整合性をチェックする。図6は、データのこの部分を示している。   Enclave pages residing in system memory are protected using encryption and integrity. In loading a page into an EPC, the page is copied to the EPC and decrypted to check the integrity of the page. FIG. 6 shows this part of the data.

EPC内に常駐しているエンクレーブページは、システムメモリに格納されてから、エンクレーブキーを利用して暗号化される。認証情報もページ格納時に格納される。EPC内のエンクレーブデータは、復号(unencrypt)されてアクセス制御メカニズムにより保護される。プロセッサは、データの所有権を持つエンクレーブしかアクセスできないように、このデータを保護する。   The enclave page resident in the EPC is stored in the system memory and then encrypted using the enclave key. Authentication information is also stored when the page is stored. Enclave data in the EPC is unencrypted and protected by an access control mechanism. The processor protects this data so that only enclaves with ownership of the data can access it.

EPCに常駐しているエンクレーブページが、キャッシュから、CPUパッケージ外のメインメモリに強制的に移動させられると、CMA暗号化により保護される。CMAは、このデータを暗号化してデータの機密性を実現する。EPCの整合性は、EPCに対する読み書きを防止するレンジレジスタにより提供される。   If an enclave page resident in the EPC is forcibly moved from the cache to the main memory outside the CPU package, it is protected by CMA encryption. CMA encrypts this data to realize data confidentiality. EPC consistency is provided by a range register that prevents reading and writing to the EPC.

図7は、本発明の一実施形態に実装可能なエンクレーブページキャッシュの一部分にアクセスする制御構造の一例を示す。エンクレーブページキャッシュ720の各ページは、エンクレーブページキャッシュマップ710内に対応するメタデータを有していてよい。図7に示すメタデータにおいて、リニアアドレス700のセットを含むセキュアなエンクレーブが、リニアアドレスがエンクレーブページキャッシュマップ710に格納されているリニアアドレスに合致する場合、エンクレーブページキャッシュ720に格納されているデータにアクセスすることができる。   FIG. 7 illustrates an example of a control structure for accessing a portion of an enclave page cache that can be implemented in an embodiment of the present invention. Each page of the enclave page cache 720 may have corresponding metadata in the enclave page cache map 710. In the metadata shown in FIG. 7, if the secure enclave including the set of linear addresses 700 matches the linear address stored in the enclave page cache map 710, the data stored in the enclave page cache 720 Can be accessed.

図7は、EPCおよびEPCMの配置および利用法を示す。EPCは4kページに分割される。各エンクレーブは、EPCに常駐している幾つかの数のページを有してよい。EPCの各ページのEPCMのエントリには、セキュリティを確保するために必要なメタ情報を提供するものもある。EPCMの詳細は実施例に固有である。   FIG. 7 shows the placement and usage of EPC and EPCM. The EPC is divided into 4k pages. Each enclave may have several numbers of pages that are resident in the EPC. Some EPCM entries of each page of the EPC provide meta information necessary for ensuring security. Details of the EPCM are specific to the embodiment.

アプリケーションがエンクレーブの装填を所望する場合には、OSのシステムルーチンを呼び出す。OSはEPC内に数ページを割り当てようとする。空いている場所がない場合には、OSはビクティム・エンクレーブを選択して除去する。OSは、ビクティム・エンクレーブのページを、各ページについてEWBINVPG命令を利用して強制的に除去(evict)する。OSが強制除去を完了すると、ECREATEコマンドを利用してエンクレーブにセキュアなエンクレーブ制御構造(SECS)を追加する。SECSを生成した後で、OSは、EADDPRE命令の利用によりアプリケーションにより要求されたようにページをエンクレーブに追加する。   If the application wants to load the enclave, it calls an OS system routine. The OS tries to allocate several pages in the EPC. If there is no space available, the OS selects and removes the victim enclave. The OS forcibly evicts the victim enclave page using the EWBINVPG instruction for each page. When the OS completes the forced removal, a secure enclave control structure (SECS) is added to the enclave using the ECREATE command. After generating the SECS, the OS adds the page to the enclave as requested by the application using the EADDPRE instruction.

データページをエンクレーブに追加するには、OSは先ず、EADDSMAP命令を利用してSMAPページをエンクレーブに追加する。エンクレーブのサイズおよび配置に応じて、OSは複数のSMAPページを割り当てる場合がある。エンクレーブページ全てがエンクレーブに追加されると、OSはEINIT命令を実行して、エンクレーブを実行する。EINIT命令に対するパラメータは、エンクレーブがその機械上での実行を許可されていることを示す認可状である。アプリケーションの装填時には許可状を生成する必要がある。EINITが無事に完了すると、アプリケーションはEENTER命令を実行してエンクレーブに入ることができる。   To add a data page to the enclave, the OS first adds a SMAP page to the enclave using the EADDDSMAP instruction. Depending on the size and placement of the enclave, the OS may allocate multiple SMAP pages. When all enclave pages are added to the enclave, the OS executes the EINIT instruction to execute the enclave. The parameter for the EINIT instruction is an authorization letter indicating that the enclave is allowed to execute on the machine. A permission must be generated when loading the application. If EINIT completes successfully, the application can execute the EENTER command to enter the enclave.

エンクレーブが構築され、実行準備が整った旨の表示がなされると、アプリケーションは、エンクレーブに物理的メモリを追加したり取り除いたりする必要がある場合がある。エンクレーブにはこれを助けるために、さらなるメモリを追加させる命令が存在する。メモリをエンクレーブに追加する際、メモリはエンクレーブ内の正確なリニアアドレスに割り当てられる。OSはこのメモリページを、リニアアドレスを示すEPCにコピーする。EADDPOST命令を実行して、このメモリをエンクレーブ(enclave enclave)に追加する。SMAPノードがEPC内に常駐していない場合には、先ずこれを装填する。   Once the enclave has been built and ready to run, the application may need to add or remove physical memory from the enclave. The enclave has instructions to add more memory to help with this. When adding memory to an enclave, the memory is assigned to the exact linear address in the enclave. The OS copies this memory page to the EPC indicating the linear address. An EADDPOST instruction is executed to add this memory to the enclave. If the SMAP node is not resident in the EPC, it is loaded first.

メモリをエンクレーブにコピーした後は、ソフトウェアは、ページを受諾してから、内部的にアクセスできるようになっていてよい。エンクレーブは、EACCEPT命令を実行することによりデータを受諾する。この命令は、エンクレーブ内のソフトウェアによってのみ実行可能である。   After copying the memory to the enclave, the software may be able to access the page internally after accepting the page. The enclave accepts the data by executing an EACCEPT instruction. This instruction can only be executed by software in the enclave.

一部の場合には、ソフトウェアは、エンクレーブメモリの特性の修正を望む場合がる。そのためには、SMAPを更新する必要がある。例えばソフトウェアが、別のスレッドエントリポイントであるTCSをエンクレーブ内に生成しようとする場合を考える。この場合、エンクレーブは、EMODIFY命令を利用してページのSMAP特性を変更するようOSに要求する。特性が変更された後で、エンクレーブソフトウェアは、EACCEPT命令を実行して、ページの利用を許可する。   In some cases, the software may want to modify the characteristics of the enclave memory. For this purpose, SMAP needs to be updated. For example, consider the case where software attempts to generate another thread entry point, TCS, in the enclave. In this case, the enclave requests the OS to change the SMAP characteristics of the page using the EMODIFY instruction. After the characteristics are changed, the enclave software executes an EACCEPT instruction to allow the use of the page.

メモリページはエンクレーブから除去することもできる。エンクレーブがページの除去の準備ができている場合には、OSに要求を送る。OSは、EREMOVE命令を実行して、SMAPからページを除去させる。EREMOVE命令はさらに、EPCエントリの無効化も行う。   Memory pages can also be removed from the enclave. If the enclave is ready to remove the page, it sends a request to the OS. The OS executes the EREMOVE instruction to remove the page from the SMAP. The EREMOVE instruction also invalidates the EPC entry.

エンクレーブ環境の整合性を確保する方法としては、アクセスチェックを数回行う、というものがある。実施される様々なセキュリティ特性のなかには、データをEPCに正確に位置させて、データがエンクレーブの間でリークしないようにして、参照アドレスが破損しないようにすることで、コードがエンクレーブの異なるリニアアドレスに移動させられないようにする、というものがある。   One way to ensure the consistency of the enclave environment is to perform an access check several times. Among the various security features that are implemented, the code is located exactly at the EPC so that the data does not leak between the enclaves and the reference address is not corrupted, so that the code has different linear addresses in the enclave. There is something to prevent it from being moved to.

アクセス保護要件は、レンジャレジスタおよびマイクロコード管理されたシャドーページテーブルを利用して実装することができる。別の実施形態では、シャドーページテーブルのオーバヘッドを回避するために、ページミスハンドラハードウェアを修正して、同じアクセス制御要件を実行することができる。   Access protection requirements can be implemented using ranger registers and microcode-managed shadow page tables. In another embodiment, the page miss handler hardware can be modified to perform the same access control requirements to avoid shadow page table overhead.

EPCは、LPがマイクロコード拡張モードで実行中、または、LPがエンクレーブ内で実行中であり、アクセスされているリニアアドレスがそのエンクレーブがカバーするリニアアドレスレンジに属している場合にのみ、論理プロセッサ(LP)によりアクセス可能である。言い換えると、EPCレンジに行くことが許されるのはマイクロコード拡張アクセスまたはエンクレーブアクセスのみである。EPCレンジに対する他のアクセスはすべて、不法とみなされる。   An EPC is a logical processor only if the LP is running in microcode extended mode or if the LP is running in an enclave and the linear address being accessed belongs to the linear address range covered by that enclave. (LP) is accessible. In other words, only microcode extended access or enclave access is allowed to go to the EPC range. All other accesses to the EPC range are considered illegal.

エンクレーブアクセスは、EPCに属す物理アドレスに対して解決(resolve)されてよい。アクセスがEPC外であるが、リニアアドレスが、アドレスがエンクレーブ内にあると示している場合には、アクセスは停止されてよい。OSに対する不良または命令は、報告を行う。   Enclave accesses may be resolved against physical addresses belonging to the EPC. If the access is outside the EPC, but the linear address indicates that the address is in the enclave, the access may be stopped. A defect or command to the OS is reported.

エンクレーブ内のアドレスに対するアクセスは、アクセスを成功させるためにEPC内に位置させることができる。エントリがEPCに存在するかのチェックは、通常、EPCMをチェックして、有効なビットを検証することにより行われる。各EPCページは特定のエンクレーブ専用である。そのEPCエントリに対する参照は、EPCページを所有するエンクレーブによってのみ可能である。これは、実行中のエンクレーブのSECSに、参照しているページが合致するかを検証することでチェックすることができる。   Access to an address in the enclave can be located in the EPC for successful access. Checking whether an entry exists in the EPC is usually done by checking the EPCM to verify valid bits. Each EPC page is dedicated to a specific enclave. Reference to that EPC entry is only possible by the enclave that owns the EPC page. This can be checked by verifying that the referenced page matches the SECS of the running enclave.

各EPCページは、エンクレーブ用の特定のリニアアドレスページを表す。要求されているリニアアドレスは、EPC内のページのリニアアドレスに整合する場合がある。例えばEPCMエントリは、エンクレーブページがEPCに導入されるリニアアドレスを格納する。エンクレーブアクセスがEPCページに対して解決される場合には、ページを導入するリニアアドレスは、現在の要求のリニアアドレスと合致する。   Each EPC page represents a specific linear address page for the enclave. The requested linear address may match the linear address of the page in the EPC. For example, the EPCM entry stores a linear address at which the enclave page is introduced into the EPC. If enclave access is resolved for an EPC page, the linear address that introduces the page matches the linear address of the current request.

エンクレーブのリニアアドレスマッピングは破損していてはいけない。リニアアドレスのページテーブルが破損している場合には、アクセスが不法なものとされる。これにより、攻撃者がコードおよびデータをエンクレーブの付近またはその中に運び入れることを防止する。   The enclave's linear address mapping must not be corrupted. If the linear address page table is corrupted, access is illegal. This prevents attackers from bringing code and data near or into the enclave.

OS/VMMが初期化の後にエンクレーブにページを追加すると、EADDPOST命令が、そのページのEPCMに「係属中」ビットを設定する。係属中を示すビットは、後続するEPC書き戻しおよび強制除去(SEC_INFOを利用する)を経ても生存し続ける。エンクレーブは、EACCEPTを発行して、係属中のビットをクリアすることができる。エンクレーブアクセスが、係属中のビットが設定されたEPCページに対して解決された場合には、LPは、OS/VMMにEF_PENDING不良を発行する。   When the OS / VMM adds a page to the enclave after initialization, the EADDPOST instruction sets the “pending” bit in the EPCM for that page. The bit indicating pending remains alive even after subsequent EPC writeback and forced removal (using SEC_INFO). The enclave can issue an EACCEPT to clear the pending bit. If the enclave access is resolved for an EPC page with the pending bit set, the LP issues an EF_PENDING fault to the OS / VMM.

OS/VMMが中継保護されたエンクレーブページをEPCに装填すると、FCR(フレッシュチェック要求された)ビットが、そのページのEPCMエントリに設定される。OS/VMMは、そのEPCページに対してEUPSMAP命令を実行してこのビットをクリアすることで、このビットをクリアすることができる。エンクレーブアクセスの継続は、このページのFCRビットが設定されていない場合に限って許可される。さもなくば、LPはEF_FRESH_CHK不良をOS/VMMに送信する。   When the OS / VMM loads a relay protected enclave page into the EPC, the FCR (fresh check requested) bit is set in the EPCM entry for that page. The OS / VMM can clear this bit by executing the EUPSMMAP instruction for the EPC page and clearing this bit. Continuation of enclave access is allowed only if the FCR bit for this page is not set. Otherwise, the LP sends an EF_FRESH_CHK failure to the OS / VMM.

各EPCMエントリは、エンクレーブがそのページに対する書き込みを許可されているかを示す「ダーティ」なビットを含む。エンクレーブのエンクレーブページに対する書き込みは、EPCMのそのページのダーティビットが設定されているときに限って許可される。さもなくば、LPはEF_EWRITEをOS/VMMに発行する。OS/VMMは、そのページに対してEUPSMAP命令を実行することで、ダーティビットを設定することができる。   Each EPCM entry includes a “dirty” bit that indicates whether the enclave is allowed to write to the page. Writing to an enclave page of an enclave is permitted only when the dirty bit for that page of the EPCM is set. Otherwise, LP issues EF_EWRITE to OS / VMM. The OS / VMM can set the dirty bit by executing the EUPSMAP instruction for the page.

論理プロセッサがエンクレーブ内で実行しているときはいつでも、そのエンクレーブのSECSページがEPC内に存在しうる。しかし、SEセキュリティモデルでは、エンクレーブは、自身のSECSに直接メモリアクセスを行うことは許可されていない(ただしエンクレーブは、完全にセキュリティを脅かすという前提で、自身のエンクレーブキーを読み出すことはできる)。エンクレーブアクセスが、そのエンクレーブに対してSECSを保持するEPCページに対して解決される場合には、OS/VMMは、EF_ATTRIB_SECS不良を介して通知を受ける。エンクレーブは、TSC属性セットを有するページの修正は許可されていない。エンクレーブがEPCに装填されたTCSの修正を試みると、OS/VMMは、EF_ATTRIB_TCS不良を介して通知を受ける。以下の表のサイズフィールドにおいては、4:32および64ビットモード両方の4バイトフィールド、8:32および64ビットモード両方の8バイトフィールド、および、8(4):両方のモードにおける8バイトフィールド(上位4バイトは32ビットモードでは無視される)という値および指標を利用することができる。   Whenever a logical processor is executing in an enclave, the SECS page for that enclave may exist in the EPC. However, in the SE security model, enclaves are not allowed to make direct memory accesses to their SECS (although enclaves can read their enclave keys on the premise that they completely compromise security). If an enclave access is resolved to an EPC page that holds SECS for that enclave, the OS / VMM is notified via an EF_ATTRIB_SECS failure. Enclaves are not allowed to modify pages that have a TSC attribute set. When the enclave attempts to modify the TCS loaded in the EPC, the OS / VMM is notified via an EF_ATTRIB_TCS failure. In the size field in the table below, a 4-byte field in both 4:32 and 64-bit modes, an 8-byte field in both 8:32 and 64-bit modes, and 8 (4): an 8-byte field in both modes ( The upper 4 bytes are ignored in 32-bit mode).

注:一部のフィールドは、小文字の「o」から始まる名称を有する(例えばoLSP)。これらフィールドはポインタであるが、エンクレーブでは、エンクレーブのベースに対するオフセットとして表される。この表記法により、エンクレーブページの計測値を、エンクレーブを生成した位置から独立させることができる。   Note: Some fields have names that begin with a lowercase “o” (eg, oLSP). These fields are pointers, but are represented in the enclave as offsets to the base of the enclave. With this notation, the measurement value of the enclave page can be made independent of the position where the enclave is generated.

注:フィールドは(未だ)特に決まった順序で記載されていない。一部のフィールドは、銘々のデータ構造内の異なるメモリページに移動させられてよく、これにより例えば異なる保護手段が可能となる。

Figure 2012530961
Note: The fields are not listed (yet) in any particular order. Some fields may be moved to different memory pages within the branded data structure, allowing for different protection measures, for example.
Figure 2012530961

各スレッドには、スレッド制御構造(TCS)が関連付けられている。TCSは以下を含む。

Figure 2012530961
Figure 2012530961
Figure 2012530961
スレッド状態は5つの値のうちいずれかをとることができる。
Figure 2012530961
Each thread is associated with a thread control structure (TCS). The TCS includes:
Figure 2012530961
Figure 2012530961
Figure 2012530961
The thread state can take one of five values.
Figure 2012530961

<状態セーブ領域オフセット(oSSA)>
状態セーブ領域オフセット(oSSA)は、エンクレーブで実行中に生じる割り込みまたは例外にプロセッサ状態をセーブするのに利用される状態セーブフレームのスタックを指し示している。次の状態セーブ領域(NSSA)が割り込みマイクロコードにより利用されて、エンクレーブでの実行中に生じる割り込みまたは例外のどこにプロセッサ状態をセーブするかが判断される。これは、oSSAがアドレス指定するフレームアレイへのインデックスである。セーブ領域(CSSA)のカウントは、このTCSに利用可能なSSAフレームの数を特定する。割り込みまたは例外が生じ、且つ、これ以上利用可能なSSAフレームがない場合には(NSSA>=CSSA)、割り込みまたは例外がまだ起こりえて、プロセッサ状態がクリアされるが、TCSは無効(INVALID)であるとして表示される。
<State save area offset (oSSA)>
The state save area offset (oSSA) points to the stack of state save frames used to save the processor state for interrupts or exceptions that occur during execution in the enclave. The next state save area (NSSA) is utilized by the interrupt microcode to determine where to save processor state for interrupts or exceptions that occur during execution in the enclave. This is an index into the frame array addressed by oSSA. The save area (CSSA) count specifies the number of SSA frames available for this TCS. If an interrupt or exception occurs and there are no more SSA frames available (NSSA> = CSSA), an interrupt or exception can still occur and the processor state is cleared, but TCS is disabled (INVALID) It is displayed as being.

エンクレーブでの実行中に割り込みが起こった場合には、機械の状態がTCS::SSA(状態セーブ領域)にセーブされる。この領域には以下が含まれる。

Figure 2012530961
If an interrupt occurs during execution in the enclave, the machine state is saved in TCS :: SSA (state save area). This area includes:
Figure 2012530961

TCS::SSAは、割り込みが生じたときにもページアウトされない。EENTERは、SSAがEPC内にあることをチェックして、物理アドレスをキャッシュする。ページが強制移動させられている場合には、EWBINVPGを実行中のプロセッサが、SSAを利用してスレッドを現在実行中のプロセッサでエンクレーブを退出させて、ページ不良を報告する。   TCS :: SSA is not paged out when an interrupt occurs. EENTER checks that the SSA is in the EPC and caches the physical address. If the page is forcibly moved, the processor executing EWBINVPG uses SSA to leave the enclave on the processor currently executing the thread and reports a page failure.

図8は、データ構造全ての縫合方法を示す。煩雑にならないように、全てのスレッドのそれぞれの構造は示していない。アントラステッドスタック(Untrusted Stacks)およびそれに関連するポインタも省かれている。図8は、本発明の一実施形態におけるスレッド制御構造の一例を示しており、セーブ状態領域同士の縫合を示す。状態セーブ領域ポインタ800は、セーブ領域0 820を指し示している。現在の状態セーブ領域805は、セーブ領域1 824を指し示している。次の状態セーブ領域810は、次のセーブ領域828を指し示している。セーブ状態領域の数は、利用可能なセーブ状態領域の数への参照を提供している。   FIG. 8 shows the stitching method for all data structures. To avoid complications, the structure of each thread is not shown. Untrusted stacks and associated pointers are also omitted. FIG. 8 shows an example of a thread control structure according to an embodiment of the present invention, and shows stitching between save state areas. State save area pointer 800 points to save area 0 820. The current state save area 805 points to save area 1 824. The next state save area 810 points to the next save area 828. The number of save state areas provides a reference to the number of save state areas available.

ページ情報(PAGE_INFO)は、EPC−管理命令へのパラメータとして利用されるアーキテクチャデータ構造である。

Figure 2012530961
SEC_INFOフラグおよびEPCフラグは、ページの種類を示すビットを含んでいる。
Figure 2012530961
SEC_INFOフラグは、エンクレーブページの状態を記述・説明するビットセットである。
Figure 2012530961
Figure 2012530961
Figure 2012530961
Page information (PAGE_INFO) is an architecture data structure used as a parameter to the EPC-management instruction.
Figure 2012530961
The SEC_INFO flag and the EPC flag include a bit indicating a page type.
Figure 2012530961
The SEC_INFO flag is a bit set that describes and explains the state of the enclave page.
Figure 2012530961
Figure 2012530961
Figure 2012530961

セキュリティ情報(SEC_INFO)データ構造は、偽造保護に必要な暗号メタデータを保持する。

Figure 2012530961
The security information (SEC_INFO) data structure holds cryptographic metadata necessary for forgery protection.
Figure 2012530961

証明書(CERT)とは、アーキテクチャエンクレーブを提供される証明書構造であり、EMKPERMITに渡される。この構造は4096バイトであり、ページを整列されてよい(page-aligned)。

Figure 2012530961
Figure 2012530961
A certificate (CERT) is a certificate structure provided with an architecture enclave and passed to EMKPERMIT. This structure is 4096 bytes and the page may be page-aligned.
Figure 2012530961
Figure 2012530961

ERPORT構造は、EREPORT命令の出力である。

Figure 2012530961
The ERPORT structure is the output of an ERPORT instruction.
Figure 2012530961

計測値(MEASUREMENTS)は、ERDMR命令の出力パラメータであり、指定されたSECSからとられたエンクレーブの計測値レジスタ値(Measurement Register values)が含まれている。

Figure 2012530961
The measurement value (MEASUREMENTS) is an output parameter of the ERDMR instruction and includes measurement register values of the enclave taken from the designated SECS.
Figure 2012530961

キー要求(KEY_REQUEST)は、EGETKEY命令への入力パラメータであり、適切なキー、および、そのキーを導出するために必要なさらなるパラメータを選択するのに利用される。

Figure 2012530961
Figure 2012530961
Figure 2012530961
The key request (KEY_REQUEST) is an input parameter to the EGETKEY instruction and is used to select the appropriate key and any further parameters needed to derive that key.
Figure 2012530961
Figure 2012530961
Figure 2012530961

この構造を、キー導出で利用することで、エンクレーブのセキュリティバージョンおよびエンクレーブのSE TCBに基づいてキーが生成される。TCBセキュリティバージョン構造の詳細については、プラットフォームTCB復帰仕様を参照のこと。

Figure 2012530961
Figure 2012530961
Figure 2012530961
Figure 2012530961
EPCMフラグとは、エンクレーブページの状態を記述するビットのセットである。
Figure 2012530961
Using this structure in key derivation, a key is generated based on the enclave's security version and the enclave's SE TCB. Refer to the platform TCB reversion specification for details of the TCB security version structure.
Figure 2012530961
Figure 2012530961
Figure 2012530961
Figure 2012530961
An EPCM flag is a set of bits that describe the state of an enclave page.
Figure 2012530961

エンクレーブページキャッシュ・マップ(EPCM)は、プロセッサがページキャッシュの内容を追跡するために利用するセキュアな構造である。EPCMは、EPCに現在装填されている各ページのきっちり1つのエントリを保持する。

Figure 2012530961
The enclave page cache map (EPCM) is a secure structure that the processor uses to track the contents of the page cache. The EPCM keeps exactly one entry for each page currently loaded in the EPC.
Figure 2012530961

証明(認証)(attestation)は、特に遠隔の実体に対して、ソフトウェア1つがプラットフォーム上に構築されている、と示すプロセスである。セキュアなエンクレーブの場合には、遠隔のプラットフォームが、ソフトウェアが、そのソフトウェアが秘匿性およびデータ保護の観点で信頼性を確認される前に、エンクレーブ内で保護されている正規のプラットフォーム上で動作するように遠隔プラットフォームにより構築するメカニズムである。証明処理は、計測、格納、およびレポート(報告)という3段階からなる。   Attestation is a process that indicates that a piece of software is built on the platform, especially for remote entities. In the case of a secure enclave, the remote platform runs on a legitimate platform that is protected within the enclave before the software is verified for confidentiality and data protection. It is a mechanism built by a remote platform. The certification process consists of three stages: measurement, storage, and report (report).

エンクレーブの計測期間には、事前エンクレーブ構築と事後エンクレーブ構築という2つの期間が存在する。エンクレーブ命令は、構築されたエンクレーブを計測させる役割を果たす。ひとたびエンクレーブが構築されると、エンクレーブ内のソフトウェアが計測をする責任を負う。   There are two periods in the enclave measurement period: pre-enclave construction and post-enclave construction. The enclave instruction serves to cause the constructed enclave to be measured. Once the enclave is built, the software in the enclave is responsible for taking measurements.

図9は、本発明の一実施形態にみることができる、クオーティングと称されるソフトウェア認証プロセスの一ステップを示す。一実施形態では、署名処理910により、計測値レジスタ901、902、903、904から、連結されたデータに、署名キー915を適用する。署名処理910の結果がクオート920である。   FIG. 9 illustrates one step of a software authentication process called quoting that can be found in one embodiment of the present invention. In one embodiment, the signature key 915 is applied to the concatenated data from the measurement value registers 901, 902, 903, 904 by the signature processing 910. The result of the signature processing 910 is a quote 920.

暗号結合計測(cryptographically binds measurements)を報告する処理は、プラットフォームにエンクレーブを生成するときになされる。このメカニズムは、この種類の機能が時にTPMコマンドとしてプラットフォームで利用可能になっていることから、しばしば「クオーティング」と称される。計測値レジスタ(MR)の値は、連結されてから、非対称鍵を用いて署名される。これに対向する者は単に、クオート構造で署名を検証して、このクオートの正当性を立証する必要がある。   The process of reporting cryptographically binds measurements is done when creating an enclave on the platform. This mechanism is often referred to as “quoting” because this type of functionality is sometimes available on the platform as TPM commands. The value of the measurement value register (MR) is concatenated and then signed using an asymmetric key. The opposite party simply needs to verify the signature in the quote structure to prove the validity of this quote.

図10は、本発明の一実施形態における、計測値レジスタセット1000からクオートを生成するための各ステップを示す。ローカルレポート1005は、計測値レジスタ1000に対称認証キーでアクセスすることで生成することができる。クオーティング・エンクレーブ1025は、ローカルレポート1005を匿名のクオート1010または通常のクオート1020に変換するソフトウェアを含んでよい。   FIG. 10 shows the steps for generating quotes from the measured value register set 1000 in an embodiment of the present invention. The local report 1005 can be generated by accessing the measurement value register 1000 with a symmetric authentication key. The quota enclave 1025 may include software that converts the local report 1005 into an anonymous quote 1010 or a regular quote 1020.

非対称鍵に関する計算の性質上、および、エンクレーブリーフの命令数を低減させたいという要望から、非対称署名を行わせる命令は含めないこととする。以下の図に示す我々の採る方法では、対称鍵認証キーに基づいて「レポート」を生成して、これらの対称鍵に基づく「レポート」を、エンクレーブを利用してそれ自身が保護されているソフトウェアを利用して、非対称署名の「クオート」に変換させる。クオーティング・エンクレーブ(Quoting Enclave)は、プラットフォーム証明キーにアクセスを有するまでに先ず認証されねばならないことから、クオーティング・エンクレーブ自身が、認証エンクレーブとして知られている特殊用途のエンクレーブである。   Because of the nature of the calculation related to the asymmetric key and the desire to reduce the number of instructions in the enclave, an instruction that causes an asymmetric signature is not included. Our approach, shown in the diagram below, generates “reports” based on symmetric key authentication keys, and generates “reports” based on these symmetric keys using software that is itself protected using an enclave. Is converted to “quote” of an asymmetric signature. The Quoting Enclave is a special-purpose enclave known as an authentication enclave, because the Quoting Enclave itself must first be authenticated before it can access the platform certification key.

各エンクレーブは、2つの256ビットの幅の計測値レジスタ(MR_EADD&MR_POLICY)および2つのレザーブされたレジスタを提供する。これら計測値レジスタは、エンクレーブのSECS内に含められている。   Each enclave provides two 256-bit wide measurement registers (MR_EADD & MR_POLICY) and two reserved registers. These measurement value registers are included in the SECS of the enclave.

図11は、本発明の一実施形態における計測値レジスタMR_EADD1100を更新するEADDプロセスを示す。拡張処理1115は、MR_EADD1100の現在の値、ページデータ1105、およびページメタデータ1110を入力として利用することができる。拡張処理の出力がMR_EADD'1120であり、これは、MR_EADD1100に格納される次の値となる。   FIG. 11 shows an EADD process for updating the measurement value register MR_EADD 1100 according to an embodiment of the present invention. The extension process 1115 can use the current value of the MR_EADD 1100, the page data 1105, and the page metadata 1110 as inputs. The output of the extension process is MR_EADD'1120, which is the next value stored in MR_EADD1100.

MR_EADDは、EINIT命令が呼び出される前にEADD命令を利用して構築されたものであるので、エンクレーブの集合計測値を含んでいる。これはマイクロコードにより書き込まれるので、エンクレーブコードが読み取りだけができるSECSのページに配置される必要がある。EADDは、呼び出される毎に、SHA256をページデータおよびそのページに関連付けられたセキュリティメタデータに計算して(つまり、これはページおよびページのSEC_INFOフラグの(エンクレーブのベースアドレスに対する)相対アドレスである)、この値をMR_EADD1100に拡張する。「拡張」とは、新たなMR値=ハッシュ(古いMR値||入力値)という意味である。   Since MR_EADD is constructed using the EADD instruction before the EINIT instruction is called, it includes the collective measurement value of the enclave. Since this is written in microcode, the enclave code needs to be placed on a SECS page that can only be read. Each time EADD is invoked, it calculates SHA256 into the page data and security metadata associated with that page (ie, this is the relative address (relative to the enclave base address) of the page and the SEC_INFO flag for the page). This value is extended to MR_EADD1100. “Extended” means new MR value = hash (old MR value || input value).

MR_POLICYは、エンクレーブの起動を許可するポリシーを認証するときに利用されるポリシーの値を含んでいる。この値は、起動時にSECS内に配置されたエンクレーブ許可証から取り出されて、EINIT命令が成功裏に完了したものとしてコピーされたものである。MR_POLICYは、マクロコードによってのみ書き込まれるので、エンクレーブコードからは読み取りしかできないSECSのページに配置される必要がある。   MR_POLICY includes a value of a policy used when authenticating a policy that permits enclave activation. This value is taken from the enclave permit located in the SECS at startup and copied as the EINIT instruction completed successfully. Since MR_POLICY is written only by the macro code, it needs to be arranged on the SECS page that can only be read from the enclave code.

図12は、本発明の一実施形態におけるレポートを生成するEREPORT命令を示す。キーID1200、所有者エポック1205、パッケージヒューズキー1210、および固定ストリングMACキー1215が、導出命令1220に入力される可能性がある。導出1220の出力は、CMAC1225を、TCBバージョン1232、ISVバージョン1234、機能1236、フラグ1238、ユーザデータ1240、および計測値レジスタ1242の現在の値とともに入力することができる。CMAC1225の出力は、MAC1244に格納することができる。EREPORT命令の出力は、キー識別子1230、TCBバージョン1232、ISVバージョン1234、機能1236、フラグ1238、ユーザデータ1240、計測値レジスタ1242、およびMAC1244を含むことができる。   FIG. 12 illustrates an EEPPORT instruction that generates a report in one embodiment of the present invention. Key ID 1200, owner epoch 1205, package fuse key 1210, and fixed string MAC key 1215 may be entered into derived instruction 1220. The output of derivation 1220 may input CMAC 1225 along with the current value of TCB version 1232, ISV version 1234, function 1236, flag 1238, user data 1240, and measurement value register 1242. The output of CMAC 1225 can be stored in MAC 1244. The output of the EEPPORT instruction can include a key identifier 1230, a TCB version 1232, an ISV version 1234, a function 1236, a flag 1238, user data 1240, a measurement value register 1242, and a MAC 1244.

EREPORT命令は、対称鍵ベースのGMACを計測値レジスタ、ユーザデータ、およびさらなるコンテキスト情報(例えば、エンクレーブの機能およびフラグ)に行うための中間鍵を生成する。   The EEPPORT instruction generates an intermediate key for performing a symmetric key based GMAC on the measurement registers, user data, and further context information (eg, enclave functions and flags).

計測値レジスタに加えて、ユーザは256ビットの幅のデータブロックを提供して、レポートに含めさせることができる。ユーザは、多くのアプリケーション特定の値(例えばチャレンジャNONCEおよび/またはアプリケーション作成キー)の証明を希望する。これらの値は、単一のハッシュに低減(reduce)され、レポート内に含ませることができる。   In addition to the measurement register, the user can provide a 256-bit wide data block to be included in the report. The user desires proof of many application specific values (e.g., challenger NONCE and / or application creation key). These values are reduced to a single hash and can be included in the report.

キーの磨耗を防ぐために、EREPORTを繰り返し呼び出して、乱数128ビット値(reportKeyIDとして知られている)を、プロセッサの各電力サイクルで生成して、内部の位置に格納する。この値は、この値を利用した2∧32AES処理の後に増分される。一実施形態では、EREPORT命令への各呼び出しによってこの値を1つ増分させる。

Figure 2012530961
表5−2:EREPORT構造 To prevent key wear, REPERT is called repeatedly to generate a random 128-bit value (known as reportKeyID) generated at each power cycle of the processor and stored in an internal location. This value is incremented after 2∧32 AES processing using this value. In one embodiment, this value is incremented by one with each call to the EEPPORT instruction.
Figure 2012530961
Table 5-2: EEPPORT structure

レポート構造中のフラグフィールドは、チャレンジャがエンクレーブを信頼してよいかを確かめるために有用なので、エンクレーブについてのある状態情報を決定するために、または、EREPORT命令を呼び出したときに利用することができる。

Figure 2012530961
表5−4:フラグ The flag field in the report structure is useful for ascertaining whether the challenger may trust the enclave, so it can be used to determine some state information about the enclave or when calling the EEPPORT instruction .
Figure 2012530961
Table 5-4: Flags

一実施形態では、適切な機能セットを有するアーキテクチャエンクレーブが、EGETKEYコマンドを有するCMAC処理で利用されるキーを取得することがアーキテクチャにより許可されているので、現在実行されているハードウェアでレポートが生成されたことを検証することができる。この機能はクオーティング・アーキテクチャ・エンクレーブに限定されている。   In one embodiment, an architecture enclave with the appropriate feature set is allowed by the architecture to obtain the key used in CMAC processing with the EGETKEY command, so the report is generated on the currently running hardware. Can be verified. This feature is limited to the Quartz Architecture Enclave.

エンクレーブ外で実行しているときにエンクレーブの計測値を取得するために、ERDMR(計測値読み取り)命令が提供される。この命令は、有効なSECSページへのポインタ、および、計測値を配信するアドレスへのポインタを採る。計測値は、MEASUREMENT構造の形態で配信される。MEASUREMENT構造は暗号による保護(暗号保護)はされない。

Figure 2012530961
An ERDMR (Read Measured Value) instruction is provided to obtain the measured value of the enclave when executing outside the enclave. This instruction takes a pointer to a valid SECS page and a pointer to the address to which the measurement value is delivered. Measurements are distributed in the form of a MEASUREMENT structure. The MEASUREMENT structure is not protected by encryption (encryption protection).
Figure 2012530961

エンクレーブページキャッシュ内にないときにはエンクレーブページは暗号により保護される。暗号保護には、機密保護、偽造保護、および再生保護という3つのレベルがある。一実施形態では、アプリケーションが、同じエンクレーブの他のページについて選択された保護レベルとは独立して各エンクレーブページの保護レベルを選択することができる。エンクレーブの実装により、アプリケーションは、偽造保護、偽造保護、および再生保護、機密保護および偽造保護、および機密保護、偽造保護、よび再生保護という組み合わせから選択を行うことができる。機密保護および偽造保護をエンクレーブページに行うには、GCM(Galois Counter Mode)等の幾つかの認証された暗号モードのうちいずれかを、AES等の適切な暗号法とともに利用することができる。しかし、再生保護には、より高度な解決法が要求される。   Enclave pages are cryptographically protected when not in the enclave page cache. There are three levels of cryptographic protection: confidentiality protection, counterfeit protection, and replay protection. In one embodiment, the application can select the protection level for each enclave page independently of the protection level selected for other pages of the same enclave. Depending on the implementation of the enclave, the application can choose from a combination of counterfeit protection, counterfeit protection, and replay protection, security and counterfeit protection, and security, counterfeit protection, and replay protection. To provide confidentiality and counterfeit protection to an enclave page, any of several authenticated cryptographic modes such as GCM (Galois Counter Mode) can be used with an appropriate cryptographic method such as AES. However, more advanced solutions are required for regeneration protection.

図13は、本発明の一実施形態にみることができる、偽造保護および再生保護メカニズムを示している。偽造保護により、攻撃者が、プログラムが生成していない暗号化されたデータの別の値で置き換えることが防がれる。レプレイ保護により、攻撃者が、プログラムが生成した現在の最新値ではない暗号化されたデータの値で置き換えることが防がれる。ノードバージョン番号1300はIV1310に入り、その後GMAC1325アルゴリズムに入ることができる。子1305のバージョン番号は、データ1315をGMAC1325アルゴリズムに送ることができる。GMAC1325アルゴリズムは、キー1320、IV1310、およびデータ1315を組み合わせてMAC1330を生成する。   FIG. 13 illustrates a counterfeit protection and replay protection mechanism that can be found in one embodiment of the present invention. Forgery protection prevents an attacker from replacing another value of encrypted data that the program did not generate. Replay protection prevents attackers from replacing encrypted data values that are not the current current value generated by the program. Node version number 1300 can enter IV 1310 and then enter the GMAC 1325 algorithm. The version number of child 1305 can send data 1315 to the GMAC 1325 algorithm. The GMAC 1325 algorithm combines the key 1320, IV 1310, and data 1315 to generate a MAC 1330.

再生保護によって、論理プロセッサが任意の時点に見るエンクレーブの全てのコンテンツが、破損してないエンクレーブの単一のスナップショットに属するように保証される。従って再生保護メカニズムは、エンクレーブバージョンのコンセプトを定義して、偽造保護されたエンクレーブページが、エンクレーブのそのバージョンに属すかを判断するメカニズムを提供する必要がある。この目的のために、再生保護メカニズムは、GMAC等のメッセージ認証アルゴリズムを利用して、偽造保護されたエンクレーブページ各々の内容をページバージョン番号に結びつける。GMACの場合には、このバージョンは、図13に示す初期化ベクトル(IV)の一部として利用することができる。   Replay protection ensures that all the contents of the enclave that the logical processor sees at any point in time belong to a single snapshot of the undamaged enclave. Therefore, the replay protection mechanism needs to define the concept of an enclave version and provide a mechanism to determine whether a counterfeit protected enclave page belongs to that version of the enclave. For this purpose, the playback protection mechanism uses a message authentication algorithm such as GMAC to bind the contents of each forgery-protected enclave page to the page version number. In the case of GMAC, this version can be used as part of the initialization vector (IV) shown in FIG.

図14は、本発明の一実施形態に見られる中継保護メカニズムのMACツリー構造の部分の一例を示す。リーフノード1425は、個々のMACコンテンツページ1430のバージョン情報を含みうる。1420等の各リーフノードは、個々のMACコンテンツページを含む(不図示)。各内部ノード1410、1415は、リンク先の子のグループのバージョン情報を含みうる。ルート1400は、ツリーデータ構造の最高位のノードである。   FIG. 14 shows an example of a portion of the MAC tree structure of the relay protection mechanism found in one embodiment of the present invention. Leaf node 1425 may include version information for individual MAC content pages 1430. Each leaf node, such as 1420, includes an individual MAC content page (not shown). Each internal node 1410, 1415 may include version information of a linked child group. The root 1400 is the highest node in the tree data structure.

全エンクレーブに対するバージョン付けを拡張するために、再生保護メカニズムは、バージョンツリーを維持する。リーフノードは、エンクレーブインスタンスの個々の再生保護されたページのバージョンを含む。各内部ノードは、子の各グループのバージョンを提供するので、それらが表すページのバージョン情報を論理的に保持している。図14はこのコンセプトを図式化している。   In order to extend versioning for all enclaves, the replay protection mechanism maintains a version tree. The leaf node contains a version of the individual replay protected page of the enclave instance. Since each internal node provides a version for each group of children, it holds logically the version information of the page that they represent. FIG. 14 illustrates this concept.

一実施形態では、O(n)ページをO(log n)へと処理する必要のあるデータ数を低減させるようにツリー構造が選択されている。ハッシュツリーではなくてバージョンツリーを利用することで、ツリーを更新することなくEPCからのページの強制退去が可能となる。   In one embodiment, the tree structure is selected to reduce the number of data that needs to be processed from O (n) pages to O (log n). By using a version tree instead of a hash tree, a page can be forcibly removed from the EPC without updating the tree.

再生保護では各ページのバージョンが暗号的に自身の内容に結び付けられている必要があるので、再生保護では偽造保護が必要となる。従って、SEアーキテクチャにおいては偽造保護が必須である。さらに、SEを始めから実装しておくことにより、サポートされる保護の組み合わせのリストがさらに制限されうる。   In reproduction protection, the version of each page needs to be cryptographically linked to its own content, so reproduction protection requires forgery protection. Therefore, forgery protection is essential in the SE architecture. Furthermore, by implementing SE from the beginning, the list of supported protection combinations can be further limited.

OS/VMMは、ECREATE命令を実行することによりエンクレーブを生成する。エンクレーブの生成中に、エンクレーブにより保護されるリニアアドレスの範囲が特定される。このリニアアドレスの範囲は、エンクレーブリニア空間(ELS)レンジとして知られている。   The OS / VMM generates an enclave by executing an ECREATE instruction. During enclave generation, the range of linear addresses protected by the enclave is identified. This range of linear addresses is known as the enclave linear space (ELS) range.

ひとたびエンクレーブが生成されると、ELSレンジに属している個々のページを、EADDPRE命令を利用してエンクレーブに追加する。EADDPRE命令は、追加されたページの各々を、これらのページをエンクレーブページキャッシュ内に移動させることにより、エンクレーブ保護領域に移動させる。EWBINVPGを利用してこれらページのいずれかがEPC外に置かれている場合、論理プロセッサは、これらページに暗号保護を行う。   Once the enclave is created, individual pages belonging to the ELS range are added to the enclave using the EADDPRE instruction. The EADDPRE instruction moves each of the added pages to the enclave protection area by moving these pages into the enclave page cache. If any of these pages is placed outside the EPC using EWBINVPG, the logical processor provides cryptographic protection to these pages.

暗号保護は、各エンクレーブページに暗号メタデータを関連付けることにより行われる。メタデータは、uCodeのフローにより、様々なプロセッサ命令がエンクレーブページのコンテンツを復号して、各エンクレーブページの信頼性/フレッシュネスを検証するために利用される。SEアーキテクチャは、暗号メタデータを更新、管理、およびその正当性を立証(validate)するためにこのような命令を幾つか提供する。   Cryptographic protection is performed by associating cryptographic metadata with each enclave page. The metadata is used by the uCode flow for various processor instructions to decrypt the content of the enclave page and verify the reliability / freshness of each enclave page. The SE architecture provides several such instructions for updating, managing, and validating its cryptographic metadata.

各エンクレーブページは、セキュリティ情報SEC_INFOデータ構造に関連付けられている。SEC_INFOデータ構造の目的は、ページを復号および検証する必要のある暗号メタデータを保持することである。SEC_INFO構造の様々なフィールドは以下の通りである。

Figure 2012530961
Each enclave page is associated with a security information SEC_INFO data structure. The purpose of the SEC_INFO data structure is to hold cryptographic metadata that requires the page to be decrypted and verified. The various fields of the SEC_INFO structure are as follows:
Figure 2012530961

セキュリティ情報フラグ(SEC_INFO.Flags)は、保護されているページのページタイプ、暗号およびアクセス保護を記述する。

Figure 2012530961
Figure 2012530961
Figure 2012530961
The security information flag (SEC_INFO.Flags) describes the page type, encryption and access protection of the protected page.
Figure 2012530961
Figure 2012530961
Figure 2012530961

セキュリティマップ(SMAP)は、エンクレーブページのフレッシュネスを検証するために必要となる暗号メタデータを格納するのに利用されるデータ構造である(つまり再生保護)。セキュリティマップは、エンクレーブの特定のスナップショットの完全バージョンのツリーを表す。セキュリティマップの各ノードは、256の子のノード(リーフノードの場合にはエンクレーブページ)のバージョンを保持する。セキュリティノードに関するさらなるメタデータが、特定のSMAPノードのSEC_INFO内に含められる。   A security map (SMAP) is a data structure used to store cryptographic metadata necessary for verifying the freshness of an enclave page (ie, playback protection). The security map represents a full version tree of a particular snapshot of the enclave. Each node in the security map holds a version of 256 child nodes (enclave page in the case of leaf nodes). Additional metadata about the security node is included in the SEC_INFO of a particular SMAP node.

一実施形態では、セキュリティマップツリーは2レベル深くてよく(セキュリティマップの深さは、SEアーキテクチャによりサポートされるエンクレーブのサイズに関している。Gen1では、SEアーキテクチャは最大エンクレーブサイズ32GBをサポートしている。)、エンクレーブ内のエンクレーブページのエンクレーブオフセットを利用してアクセスされる。SMAPのルートは、SECSに含められ、128の子のノードのバージョンのみを保持する。エンクレーブオフセットのビットは、適切な子を選択するのに利用され、SMAPにインデックスするのに利用される。gen1では、エンクレーブオフセットは35ビット長である。エンクレーブオフセットは、以下の公式により抽出される(エンクレーブリニアアドレス&エンクレーブマスク)。エンクレーブマスクは、(エンクレーブのサイズ−1)で求められ、ECREATE中に計算することができる。

Figure 2012530961
In one embodiment, the security map tree may be two levels deep (security map depth relates to the size of the enclave supported by the SE architecture. In Gen1, the SE architecture supports a maximum enclave size of 32 GB. ), Accessed using the enclave offset of the enclave page in the enclave. The SMAP root is included in the SECS and holds only 128 child node versions. The bits in the enclave offset are used to select the appropriate child and are used to index into the SMAP. In gen1, the enclave offset is 35 bits long. The enclave offset is extracted by the following formula (enclave linear address & enclave mask). The enclave mask is determined by (enclave size-1) and can be calculated during ECREATE.
Figure 2012530961

一般的には、深さl>1において、ビットN−(l)×8からN−(l+1)×8+1を利用して、次のレベルの適切な子を選択する。   In general, at depth l> 1, bits N− (l) × 8 to N− (l + 1) × 8 + 1 are used to select the appropriate child at the next level.

注:セキュリティマップは、論理データ構造であり、アーキテクチャではない。論理プロセッサは、SMAPが位置しているリニアアドレス空間の位置についてすら認識していない。システムソフトウェアは、セキュリティマップを維持および探索(walking)する役割を担う。セキュリティマップの各個々のノードは、アーキテクチャにより定義された構造を有するが、アーキテクチャは、セキュリティマップがどのようにメモリ内に維持されているかを特定しない。しかし、セキュリティマップ内の各ノードが、セキュリティマップ内によく定義された論理位置を有しており、ノードがマップ内であちこち移動する場合にはセキュリティマップに関する様々なプロセッサ命令が、それを攻撃のシナリオとして解釈する、ということに留意されたい。   Note: A security map is a logical data structure, not an architecture. The logical processor is not even aware of the location of the linear address space where the SMAP is located. System software is responsible for maintaining and walking the security map. Each individual node of the security map has a structure defined by the architecture, but the architecture does not specify how the security map is maintained in memory. However, each node in the security map has a well-defined logical location in the security map, and if a node moves around in the map, various processor instructions related to the security map Note that it is interpreted as a scenario.

ルートセキュリティノードは、SECSに含まれており、128の子のバージョン情報を含んでいる。非ルートセキュリティノードは、保護されたページであり、関連付けられたSEC_INFO(and its associated SEC_INFO)である。保護されたページは、256の子のバージョン情報を含む。

Figure 2012530961
The root security node is included in SECS and contains 128 child version information. A non-root security node is a protected page and is an associated SEC_INFO (and its associated SEC_INFO). The protected page contains 256 child version information.
Figure 2012530961

SEC_INFOは、SMAP内のSMAPの位置を含む。SMAPの位置は、リニア/エンクレーブオフセットおよびページタイプSMAP_LEVEL_1およびSMAP_LEVEL_2により決定される。   SEC_INFO contains the location of the SMAP within the SMAP. The position of the SMAP is determined by the linear / enclave offset and page types SMAP_LEVEL_1 and SMAP_LEVEL_2.

再生保護されたエンクレーブページを追加するためには、SMAPの親が生成されて、FCRビットがクリアされた状態でEPC内に常駐している必要がある。エンクレーブページの整合性を検証するために、論理プロセッサは、SEC_INFO構造内のIV_Pおよびkey_idを利用してキーを生成する。このキーを利用して、SEC_INFO構造およびページの内容内のフラグに対してMACを計算する。計算されたMACは、SEC_INFO構造内に設けられているMACと比較される。MAC同士が整合する場合に、このページが整合性チェックに合格したとみなすことができる。   In order to add a replay protected enclave page, the SMAP parent must be created and resident in the EPC with the FCR bit cleared. In order to verify the integrity of the enclave page, the logical processor generates a key using IV_P and key_id in the SEC_INFO structure. This key is used to calculate the MAC for flags in the SEC_INFO structure and page content. The calculated MAC is compared with the MAC provided in the SEC_INFO structure. If the MACs match, this page can be considered to have passed the consistency check.

論理プロセッサは、ELPG命令を利用してEPCにページを装填するときに、ページの整合性を検証する。この命令の一部として、論理プロセッサは、ページの検証に利用されたSEC_INF構造からIV_Pを記憶する(note down)。   When the logical processor loads a page into the EPC using the ELPG instruction, it verifies the integrity of the page. As part of this instruction, the logical processor stores the IV_P from the SEC_INF structure used for page verification (note down).

エンクレーブページのフレッシュネスを検証するために、論理プロセッサは、エンクレーブページおよびそのsmapの親がEPCに装填されており、smapの親がフレッシュであることを検証する。そして、ページのバージョンを、smapの親に格納されているバージョンと比較する。これら2つのバージョンが合致した場合には、プロセッサは、このページの新たなバージョンを生成して、smapの親のバージョンとエンクレーブページのバージョンを更新する。最後に、エンクレーブページをフレッシュであると表示する。   To verify the freshness of the enclave page, the logical processor verifies that the enclave page and its smap parent are loaded into the EPC and that the smap parent is fresh. The page version is then compared with the version stored in the parent of the map. If these two versions match, the processor generates a new version of this page and updates the parent version of the map and the version of the enclave page. Finally, the enclave page is displayed as fresh.

注:新たなバージョン生成によって、ページを修正可能なものにすることができる。これにより、アーキテクチャおよび実装両方が簡単になる。   Note: A new version can be generated to make the page modifiable. This simplifies both architecture and implementation.

エンクレーブページを除去するために、論理プロセッサは、エンクレーブページとそのsmapの親とがEPCに装填されており、両方ともフレッシュであることを検証する。そして、smapの親のページのバージョンを0に設定して、エンクレーブページのEPCスロットを利用可能であると表示する。   To remove the enclave page, the logical processor verifies that the enclave page and its map parent are loaded into the EPC and are both fresh. Then, the version of the parent page of the map is set to 0 to indicate that the EPC slot of the enclave page can be used.

エンクレーブページキャッシュ(EPC)は、CPUが、SE暗号保護により暗号保護を受けていないエンクレーブページを一時的に格納するために利用するセキュアなストレージである。   The enclave page cache (EPC) is a secure storage that is used by the CPU to temporarily store an enclave page that is not protected by SE encryption protection.

以下の要件がEPCで特定される。非デバッグエンクレーブに属すEPCに装填されるエンクレーブメモリページへのアクセスは、エンクレーブ外のソフトウェア実体による修正から保護することができる。攻撃者は、直接のハードウェア攻撃では、EPCに装填されている非デバッグエンクレーブに属す平文データを読み取ることができない。また攻撃者は、直接のハードウェア攻撃では、非デバッグエンクレーブに属すEPCのデータを修正することができない。システムのCPUは、EPCに装填されるデータにコヒーレント且つセキュアにアクセスすることができる。   The following requirements are specified in EPC. Access to enclave memory pages loaded in EPCs belonging to non-debug enclaves can be protected from modification by software entities outside the enclave. An attacker cannot read plaintext data belonging to a non-debug enclave loaded in an EPC by a direct hardware attack. Also, an attacker cannot correct EPC data belonging to a non-debug enclave by a direct hardware attack. The CPU of the system can access data loaded into the EPC coherently and securely.

EPCを実装するメカニズムは幾つかある。EPCは、オンダイSRAMまたはeDRAMの上に実装可能である。EPCはさらに、CPUの最終レベルキャッシュのやり方を動的に隔離することにより構築することもできる。この実装例では、パッケージの外部からの許可されていないアクセスからEPCを保護することができる。一方でシステム内の他のパッケージは、EPCにコヒーレント且つセキュアにアクセスすることができる。   There are several mechanisms for implementing EPC. EPC can be implemented on on-die SRAM or eDRAM. EPC can also be built by dynamically isolating the CPU's last level cache approach. In this implementation, the EPC can be protected from unauthorized access from outside the package. On the other hand, other packages in the system can access the EPC coherently and securely.

EPCを実装する別のメカニズムに、クリプト・メモリ・アパーチャ(Crypto Memory Aperture)がある。クリプト・メモリ・アパーチャ(Crypto Memory Aperture)は、プラットフォームDRAMを利用して暗号により保護された揮発性ストレージを生成する費用効果のよいメカニズムを提供する。CMAは、CPUアンコア(CPU uncore)内の1以上の戦略的に配置された暗号ユニットを利用してカスタマ技術が必要とする様々なレベルの保護を提供する。様々なアンコア(uncore)エージェントは、CMAに対するメモリアクセスを認識し、これら25のアクセスをアンコア内に位置しているクリプト・コントローラにルーティングするよう修正される。クリプト・コントローラは、所望の保護レベルに応じて、プラットフォームDRAMへの1以上のメモリアクセスを生成して、暗号文を取得する。そして、暗号文を処理して、平文を得て、元のCMAメモリ要求を満たす。CMAは、Intel QuickPathインターコネクト(QPI)プロトコルに完全に統合されており、QPIプロトコルへのセキュリティ拡張によりマルチパッケージプラットフォームにスケーリングされる。マルチパッケージプラットフォーム30の構成では、CMAは、外的に対面している(externally facing)QPIリンク層のリンクレベルのセキュリティ(Link−Sec)エンジンを利用して、Intel CPUの間のメモリ転送を保護する。   Another mechanism for implementing EPC is Crypto Memory Aperture. Crypto Memory Aperture provides a cost-effective mechanism for creating cryptographically protected volatile storage using platform DRAM. CMA utilizes one or more strategically placed cryptographic units within a CPU uncore to provide various levels of protection required by customer technology. Various uncore agents are modified to recognize memory accesses to the CMA and route these 25 accesses to the crypto controller located in the uncore. The crypto controller generates one or more memory accesses to the platform DRAM to obtain the ciphertext, depending on the desired protection level. The ciphertext is then processed to obtain plaintext to satisfy the original CMA memory request. CMA is fully integrated into the Intel QuickPath Interconnect (QPI) protocol and scaled to a multi-package platform with security extensions to the QPI protocol. In the multi-package platform 30 configuration, the CMA protects memory transfers between Intel CPUs using the link-level security (Link-Sec) engine of the externally facing QPI link layer. To do.

SECSは、EPCに現在装填されている場合にアクティブと称される。本書類では後述するように、OS/VMMは、EPCに装填されるものを管理する役割を果たす。しかし、EPCにエンクレーブページを装填する間に、OS/VMMは、その対象ページ自身がSECSである場合を除いて、CPUにそのページのSECSの所在を伝える。装填されているページがSECSではない場合には、CPUは、そのページに対応するSECSをEPC内に配置するよう要求する。エンクレーブのページを装填する前にはいつでも、OS/VMMは、そのエンクレーブのSECSをEPCに装填してよい(MAY load)。   SECS is referred to as active when it is currently loaded into the EPC. As described later in this document, the OS / VMM serves to manage what is loaded into the EPC. However, while loading an enclave page on the EPC, the OS / VMM tells the CPU where the SECS is for the page, unless the target page itself is SECS. If the loaded page is not SECS, the CPU requests that the SECS corresponding to that page be placed in the EPC. At any time before loading an enclave page, the OS / VMM MAY load the SECS of that enclave into the EPC.

CPUは、SECSをEPCに装填することのできる回数に対しては制約を課しはしないが、OS/VMMがエンクレーブページキャッシュにSECSのコピーを複数装填するようなことが頻繁に行われるとは考えにくい。とはいえ、もしも同じSECSの複数のコピーがEPCに装填される場合には、これらコピーそれぞれを別個のアクティブSECSインスタンスとして捉え、アクティブSECSの異なるインスタンスに属すEPCに装填されたエンクレーブページを、ハードウェアによりそれぞれ異なるエンクレーブに属すものとして捉える。   The CPU does not impose a limit on the number of times that SECS can be loaded into the EPC, but the OS / VMM frequently loads multiple copies of SECS into the enclave page cache. Very Hard to think. However, if multiple copies of the same SECS are loaded into an EPC, each of these copies is treated as a separate active SECS instance, and the enclave page loaded into the EPC belonging to a different instance of the active SECS is We regard it as belonging to different enclaves depending on the wear.

OS/VMMは、EPCを、システムアドレス空間の物理メモリの連続ブロックとしてとらえる(10)。しかし、内部ストレージを低減させて、高速インデックスを可能とするために、CPUは、スロット識別子(SID)を各EPCページに関連付ける。EPCページの物理アドレスおよび対応するスロット識別子は、以下のように互いに関連している。
sid=(page_pa-epc_base_pa)>>12
page_pa=pc_base_p|(sid<<12)
The OS / VMM views the EPC as a continuous block of physical memory in the system address space (10). However, to reduce internal storage and allow fast indexing, the CPU associates a slot identifier (SID) with each EPC page. The physical address of the EPC page and the corresponding slot identifier are related to each other as follows.
sid = (page_pa-epc_base_pa) >> 12
page_pa = pc_base_p | (sid << 12)

ハードウェアは、0xFFという特殊なスロットを用いて、無効なスロットを示す。EPCスロット識別子は、uCodeおよびPMH両方により利用されて、エンクレーブページに関する情報を追跡する。   The hardware indicates an invalid slot using a special slot of 0xFF. The EPC slot identifier is used by both uCode and PMH to track information about the enclave page.

EPCに装填される全てのエンクレーブページは、よく定義されたシステム物理アドレスを有する。EPCに属す物理アドレスおよびEPCスロット識別子間に一対一のマッピング関係があることから、EPCに装填される各ページは自身のEPCスロット識別子あるいはEPC_SIDを有するということができよう。   All enclave pages loaded into the EPC have a well-defined system physical address. Since there is a one-to-one mapping relationship between the physical address belonging to the EPC and the EPC slot identifier, it can be said that each page loaded in the EPC has its own EPC slot identifier or EPC_SID.

加えて、SECSページを除く、EPCに装填される全てのエンクレーブページは、アクティブSECSインスタンスと関連付けられる。アクティブSECSインスタンスが、EPCに装填されたSECSページにすぎないことを想起されたい。この結果、アクティブSECSページも自身のEPC_SIDを有する。非SECSエンクレーブページが属すSECSページのEPC_SIDは、非SECS25ページのSECS_SIDと称される。EPCに装填される各ページについて、ハードウェアはSECS_SIDの記録をとっておく。EPCに装填されるSECSページのSECS_SIDは、0xFF(または無効SID)と定義される。   In addition, all enclave pages loaded into the EPC, except SECS pages, are associated with the active SECS instance. Recall that the active SECS instance is only the SECS page loaded in the EPC. As a result, the active SECS page also has its own EPC_SID. The EPC_SID of the SECS page to which the non-SECS enclave page belongs is referred to as SECS_SID of the non-SECS 25 page. For each page loaded into the EPC, the hardware keeps a record of SECS_SID. The SECS_SID of the SECS page loaded in the EPC is defined as 0xFF (or invalid SID).

EPCMは、プロセッサがページキャッシュの内容を追跡するために利用するセキュアな構造である。30EPCMは、EPCに現在装填されている各ページのきっちり1つのエントリを保持する。それが表すページにおいては、各EPCMエントリが、ページが属すエンクレーブ、ページがエンクレーブページキャッシュに移動させられるリニアアドレス、ページのバージョン等の情報を追跡する。EPCM構造は、アドレス変換フローにおいてCPUにより利用されて、EPCに装填されるエンクレーブページに対してアクセス制御を実施する。EPCMエントリは、(x)uCodeにより、様々な命令フローの一環として管理される。   EPCM is a secure structure that the processor uses to track the contents of the page cache. The 30 EPCM holds exactly one entry for each page currently loaded in the EPC. In the page it represents, each EPCM entry tracks information such as the enclave to which the page belongs, the linear address to which the page is moved to the enclave page cache, the version of the page, and so on. The EPCM structure is used by the CPU in the address translation flow to perform access control on the enclave page loaded in the EPC. EPCM entries are managed by (x) uCode as part of various instruction flows.

本発明の一実施形態では、エンクレーブページキャッシュ(EPC)は、割り当て、割り当て解除が動的に行われてよい。一実施形態では、オペレーティングシステム等のソフトウェアが、EPC等のメモリページを割り当てたり、EPCのメモリ割り当て解除を行ったりする。一実施形態では、オペレーティングシステムは、エンクレーブの任意のページをEPC内に割り当てることもできる。一部の実施形態では、EPCは、メモリ内の全ての利用可能な位置を占めてよい。一実施形態において、動的EPCの固定EPCとの1つの違いは、動的EPCがメモリのページの追加および除去を可能とすることである。一実施形態では、ソフトウェアドライバ等の論理が、メモリ領域をEPCとして割り当てたり、EPCのメモリ割り当てを解除したりする。一実施形態では、起動前処理によりメモリの各ページのメタデータの格納に利用できるメモリがチェックされ、ソフトウェアがページをEPCまたは非EPCであると宣言し、ハードウェア論理が各ページの属性の追跡・実施(enforce)を行ってよい。   In one embodiment of the present invention, an enclave page cache (EPC) may be dynamically allocated and deallocated. In one embodiment, software such as an operating system allocates memory pages such as EPC and deallocates memory for EPC. In one embodiment, the operating system may allocate any page of the enclave in the EPC. In some embodiments, the EPC may occupy all available locations in memory. In one embodiment, one difference between dynamic EPC and fixed EPC is that dynamic EPC allows the addition and removal of pages of memory. In one embodiment, logic such as a software driver allocates a memory area as an EPC or deallocates the memory of the EPC. In one embodiment, pre-boot processing checks the memory available for storing metadata for each page of memory, software declares the page as EPC or non-EPC, and hardware logic tracks the attributes of each page. -Enforcement may be performed.

一実施形態では、ハードウェア論理は、変換ルックアサイドバッファ(TLB)およびページミスハンドラ(PMH)によって、EPCとして利用されるメモリに対するアクセスを制御してよい。一実施形態では、検索アドレスがTLB内に合致するものがあるとき(TLBヒットとして知られている)、セキュアなエンクレーブがEPCを退出するときにTLBをフラッシュしてよい。一実施形態では、検索アドレスがTLBに合致するものがない場合(TLBミスとして知られている)、さらなるルックアップによって、複数のメモリ参照においてエンクレーブページキャッシュマップ(EPCM)からデータを取得することができる。一実施形態では、PMHは、EPCMのルックアップを行うことができる。別の実施形態では、PMHのレンジレジスタをチェックして、連続物理アドレス、EPCに対する制御を制御する。オペレーティングシステムは、EPCページへのアクセスとして、直接メモリアクセス(DMA)を許可しない。もしもメモリの戻りページが、エンクレーブページとして表示されていた場合には、そのページのセキュアなエンクレーブ制御構造識別子(SECSID)を、現在実行中のエンクレーブと比較して、アクセスがセキュアであることを確かめてよい。戻りページのSECSIDと、現在実行中のエンクレーブのものとが合致しない場合には、PMHは停止メッセージを発行してよい。メモリの戻りページがエンクレーブページとして表示されていない場合、またはメモリの戻りページがエンクレーブページとして表示されており、そのページのSECSIDが実行中のエンクレーブのものと合致する場合には、PMHは、ページ変換をTLBに装填してよい。一実施形態では、キャッシュタグを利用して、書き戻しサイクルで他のラインからエンクレーブラインを識別することができる。しかし、少なくとも1つの実施形態では、そのタイプのメモリ要求が書き戻しサイクル中にEPCMにアクセスすると論理が判断する場合には、キャッシュタグは利用されない。   In one embodiment, hardware logic may control access to memory utilized as an EPC by a translation lookaside buffer (TLB) and a page miss handler (PMH). In one embodiment, the TLB may be flushed when a secure enclave exits the EPC when there is a match in the TLB (known as a TLB hit). In one embodiment, if no search address matches the TLB (known as a TLB miss), further lookup may retrieve data from the Enclave Page Cache Map (EPCM) in multiple memory references. it can. In one embodiment, the PMH may perform an EPCM lookup. In another embodiment, the PMH range register is checked to control control over the continuous physical address, EPC. The operating system does not allow direct memory access (DMA) as access to EPC pages. If the memory return page was displayed as an enclave page, compare the secure enclave control structure identifier (SECSID) of the page with the currently executing enclave to verify that the access is secure. It's okay. If the SECSID on the return page does not match that of the currently executing enclave, the PMH may issue a stop message. If the memory return page is not displayed as an enclave page, or if the memory return page is displayed as an enclave page and the SECSID for that page matches that of the running enclave, the PMH The conversion may be loaded into the TLB. In one embodiment, cache tags can be utilized to identify enclave lines from other lines in a writeback cycle. However, in at least one embodiment, the cache tag is not utilized if the logic determines that that type of memory request accesses the EPCM during a write-back cycle.

本発明の一実施形態では、ソフトウェア、BIOSが、オペレーティングシステムが起動してエンクレーブページを作成する前に、メモリを割り当てることができる。一実施形態では、ソフトウェアは、BIOSの一連のステップによりEPCを生成することができる。BIOSは、あるメモリをメタデータの格納用にリザーブすることができ、各プロセッサについてレンジレジスタを設定することができる。BIOSは、ベースアドレスおよびメモリサイズを入力とすることができる。システム構成は、MCHECKという処理によりチェックされて、全てのパッケージおよび全てのコアにおける全てのレジスタを、エンクレーブ外のアクセスから保護することができる目的に適した設定とする。MCHECKは、システムがリセットされるまでレジスタをロックする。別の実施形態では、ソフトウェアは、メモリの部分をEPCの一部と宣言することの出来るEPCADDとして知られている命令によりEPCにページを追加することができる。EPCADDシーケンスは、メモリアドレスを入力とすることができ、成功または失敗を示すメッセージを出力することができる。EPCADDが成功を示すメッセージを出力する場合には、EPCADDは、EPCM.Eビットを設定することができ、その物理アドレスに対応するページをシステムの全てのTLBからフラッシュする。本発明の一実施形態では、EPCADDは、RAXにおける01のエラーコードを戻して、入力アドレスを有するページが既にEPCページであることを示し、02のエラーコードを戻して、入力アドレスが範囲外であることを示すことができる。EPCADDがEPCの一部であるとして宣言するメモリページは、EPCセマンティクスにデータにアクセスするよう要求してよい。本発明のこの実施形態では、ソフトウェアは、EWBINVGとして知られている命令のEPCからページを除去して、暗号化されたデータを、暗号保護および整合性保護を継続させながら、引き続き利用可能にすることができる。このフォーマットのデータは、ハードディスクドライブの通常メモリに格納することができる。また別の実施形態では、EPCREMOVEとして知られている命令のソフトウェアが、EPC内のページを除去して、暗号化されたデータを利用不可能にすることができる。EPCREMOVEを実行するハードウェアは、ページおよびEPCMの部分をクリアする。EPCREMOVEは、先ずEWBINVPGを実行することなく実行することができる。一実施形態では、EPCREMOVEシーケンスは、メモリアドレスに基づいてEPCからページを除去することができる。本発明の一実施形態では、EPCREMOVE命令は、RAXに01のエラーコードを含み、除去されるページが、セキュアなエンクレーブ制御構造(SECS)の一部であり、除去不可能であることを示し、02のエラーコードは、除去されるページがEPCページではないことを示す。メモリのページのグローバルTLB撃墜は、本発明の一実施形態におけるEPCREMOVEから生じてよく、ページに前に占有されていたメモリは、汎用ソフトウェアアクセス用に利用可能となってよい。   In one embodiment of the invention, the software, BIOS, can allocate memory before the operating system boots and creates an enclave page. In one embodiment, the software can generate an EPC through a series of steps in the BIOS. The BIOS can reserve a memory for storing metadata and can set a range register for each processor. The BIOS can take a base address and a memory size as inputs. The system configuration is checked by a process called MCHECK to make a setting suitable for the purpose of protecting all registers in all packages and all cores from access outside the enclave. MCHECK locks the register until the system is reset. In another embodiment, software can add a page to an EPC with an instruction known as EPCADD that can declare a portion of memory as part of the EPC. The EPCADD sequence can take a memory address as input and can output a message indicating success or failure. When EPCADD outputs a message indicating success, EPCADD is stored in EPCM. The E bit can be set and the page corresponding to that physical address is flushed from all TLBs in the system. In one embodiment of the invention, EPCADD returns an error code of 01 in RAX to indicate that the page with the input address is already an EPC page, returns an error code of 02, and the input address is out of range. You can show that there is. Memory pages that EPCADD declares as part of EPC may require EPC semantics to access the data. In this embodiment of the invention, the software removes the page from the EPC of the instruction known as EWBINVG, making the encrypted data still available while continuing cryptographic and integrity protection. be able to. Data in this format can be stored in the normal memory of the hard disk drive. In yet another embodiment, instruction software known as EPCREMOVE can remove pages in the EPC, making encrypted data unavailable. The hardware executing EPCREMOVE clears the page and the EPCM part. EPCREMOVE can be executed without first executing EWBINVPG. In one embodiment, the EPCREMOVE sequence can remove pages from the EPC based on the memory address. In one embodiment of the present invention, the EPCREMOVE instruction includes an error code of 01 in RAX, indicating that the page being removed is part of a secure enclave control structure (SECS) and cannot be removed; An error code of 02 indicates that the page to be removed is not an EPC page. A global TLB down of a page of memory may result from EPCREMOVE in one embodiment of the present invention, and memory previously occupied by the page may be made available for general purpose software access.

PMHは、メモリ空間の保護されている領域へのアクセスを防止する。アーキテクチャによっては、これは、EPCへのアクセスの物理アドレスチェックのみといった簡単なもので済むこともある。さらなるPMHサポートを利用して、SEの性能向上または別の実装が可能となる場合もある。SEアーキテクチャは、エンクレーブページキャッシュに対するエンクレーブページへの不正アクセス防止にページミスハンドラ(PMH)を利用する。PMHは様々なイベントを検知して、これらイベントをマイクロコードに報告する。マイクロコードは、イベントをOS/VMMに報告してよい。次いでOS/VMMは、不良を修復するために適切な命令を実行することができる。   PMH prevents access to protected areas of memory space. Depending on the architecture, this may be as simple as just a physical address check for access to the EPC. Additional PMH support may be utilized to enable SE performance improvements or other implementations. The SE architecture uses a page miss handler (PMH) to prevent unauthorized access to the enclave page to the enclave page cache. PMH detects various events and reports these events to microcode. The microcode may report the event to the OS / VMM. The OS / VMM can then execute the appropriate instructions to repair the failure.

ECREATE命令を利用してエンクレーブを作成する場合には、リニアアドレスレンジをそのエンクレーブに対して指定する。このレンジは、そのエンクレーブの「リニアアドレスレンジ(linear address range)」と称される。エンクレーブのリニアアドレスレンジに属すメモリページは全て、エンクレーブの保護下にあり、SEC_INFOエントリが関連付けられていると考えることができる。   When an enclave is created using an ECREATE instruction, a linear address range is designated for the enclave. This range is referred to as the “linear address range” of the enclave. All memory pages belonging to the enclave linear address range are under enclave protection and can be considered to have associated SEC_INFO entries.

あるエンクレーブのリニアアドレスレンジに属すメモリページも、「エンクレーブページ(enclave page)」と称される。エンクレーブ内で実行しているプログラムは、エンクレーブページキャッシュ内に装填されておりそのページの所有者であるエンクレーブであるエンクレーブページにのみアクセスを許可される。プロセッサは、こうではない場合には例外クラスイベントを生成する。OS/VMMは、必要に応じて、エンクレーブページをEPCに装填する責任を負う。   A memory page belonging to a linear address range of an enclave is also referred to as an “enclave page”. A program running in an enclave is allowed access only to an enclave page that is loaded in the enclave page cache and is the enclave that is the owner of the page. Otherwise, the processor generates an exception class event. The OS / VMM is responsible for loading enclave pages into the EPC as needed.

論理プロセッサがエンクレーブを実行しており、そのエンクレーブページにメモリアクセスを生成する場合、このメモリアクセスは「エンクレーブアクセス(enclave access)」と称される。正しい実体によりアクセスされていることを確かめるためにかドレスチェックが行われてよい。   When a logical processor is performing an enclave and creates a memory access for that enclave page, this memory access is referred to as “enclave access”. A dress check may be performed to ensure that it is being accessed by the correct entity.

一実施形態では、PMHは、アクセス制御機能を提供して、プログラムがエンクレーブ内で実行していないときにEPCを保護する。各論理プロセッサについてイネーブルされているレンジレジスタは、プロセッサがエンクレーブコードを実行していないときにEPCに対するアクセスを制限する。このレンジレジスタは、プロセッサがエンクレーブコードの実行を開始するとディセーブルされる。その持ち場において、プロセッサは特殊なページテーブルを定位置に置く。これらページテーブルは、プロセッサによる制御を受けて、そのエンクレーブが所有しているEPCページのみにアクセスを許可する。プロセッサおよびマイクロコードは、これら2つのメカニズムを利用してEPCへのアクセスを制限する。   In one embodiment, the PMH provides an access control function to protect the EPC when the program is not running in the enclave. The range register enabled for each logical processor limits access to the EPC when the processor is not executing enclave code. This range register is disabled when the processor begins to execute the enclave code. In its place, the processor places a special page table in place. These page tables allow access only to EPC pages owned by the enclave under the control of the processor. The processor and microcode use these two mechanisms to restrict access to the EPC.

一部の実施形態では、性能、実装の複雑性、シリコンのコストといった数多くの軸同士の間を調整されてよい。この章では、開発者に対して可能性ある調整例の幾つかを示すために3つの実装例を紹介する。以下の表8−1は、これら保護の例および必要となるPMHサポートを示す。

Figure 2012530961
In some embodiments, a number of axes such as performance, implementation complexity, and silicon cost may be coordinated. This chapter introduces three implementations to show some of the possible adjustments to developers. Table 8-1 below shows examples of these protections and the required PMH support.
Figure 2012530961

表8−1の第1行に示すとおり、必要なアクセス制御保護を提供するには追加のレンジレジスタは1つでよい。この特定の実装例では、他の保護はマイクロ拡張によって提供される。レンジレジスタは、論理プロセッサごとにイネーブルされてよい。このメカニズムを利用する基本実装例を図2−2に示す。   As shown in the first row of Table 8-1, there may be one additional range register to provide the necessary access control protection. In this particular implementation, other protection is provided by micro-extensions. The range register may be enabled for each logical processor. An example of basic implementation that uses this mechanism is shown in Figure 2-2.

PMHは、拡張されたマイクロコードモードでもエンクレーブモードでも実行されていないLPからCMAレンジ(CPUのCMRRがカバーしている)へのアクセスを除去するよう修正される。加えて、エンクレーブモードで実行しているLPは、CMAのEPCサブレンジにのみアクセスを許可される。   The PMH is modified to remove access to the CMA range (covered by the CPU's CMRR) from LPs that are not running in extended microcode or enclave mode. In addition, LPs running in enclave mode are only allowed access to the CMA EPC subrange.

図15は、ページ不良エラーコードマップの実装を示す本発明の一実施形態を示す。ビット5 1540が設定されている場合、ビット9、ビット8、ビット7、ビット6を一緒に復号して、ページ不良エラーコードを決定することができる。resビット1512、I/Dビット1514、REVDビット1516、U/Sビット1518、W/Rビット1520、Pビット1522。   FIG. 15 illustrates one embodiment of the present invention illustrating the implementation of a page fault error code map. If bit 51540 is set, bit 9, bit 8, bit 7 and bit 6 can be decoded together to determine the page fault error code. res bit 1512, I / D bit 1514, REVD bit 1516, U / S bit 1518, W / R bit 1520, P bit 1522.

あるページがEPCにない場合、その旨を伝えるために「不良」がOS/VMMに提供される。表8−2に示すように、ページ不良エラーコードマップを変更する。これは、不良条件を報告するために利用される新たなビットを示している。EPC不良がない場合には、ビット5をゼロに設定して、ビット6から9もゼロに設定する。不良がEPC条件に起因している場合には、ビット5を設定して、ソフトウェアはビット6から9を復号して、EPC不良条件を解明してもよい。不良タイプについてのさらなる情報は次のセクションに記す。   If a page is not in the EPC, a “bad” is provided to the OS / VMM to convey that effect. As shown in Table 8-2, the page failure error code map is changed. This indicates a new bit used to report a bad condition. If there is no EPC failure, bit 5 is set to zero and bits 6 to 9 are also set to zero. If the failure is due to an EPC condition, bit 5 may be set and software may decode bits 6 through 9 to resolve the EPC failure condition. More information about the defect type is given in the next section.

ページ不良エラーコードのビット5が設定されている場合、ビット6から9が所与であると解釈される(表8−2)。これは、このページ不良を起こした条件を示している。状態の一部は、通常処理では生じ得ないであろう不法の条件を示しており、OS/VMM管理エラーを示している。

Figure 2012530961
If bit 5 of the page fault error code is set, bits 6 through 9 are interpreted as given (Table 8-2). This indicates the condition that caused this page failure. Some of the conditions indicate illegal conditions that would not occur in normal processing and indicate OS / VMM management errors.
Figure 2012530961

攻撃からEPCを保護するためには、プラットフォームの全てのTLBのEPCアドレスを無効化するメカニズムを利用することができる。この特徴により、全てのコアに対して、特定のページの無効化を知らせることができる。次いで、全てのプロセッサから撃墜完了報告を受けるまで待つ。   To protect EPC from attacks, a mechanism that invalidates the EPC address of all TLBs on the platform can be used. This feature can inform all cores of the invalidation of a specific page. Next, it waits until it receives a shooting completion report from all the processors.

エンクレーブが退出するたびに(EEXIT)、TLBは、TLBに現在存在しているエンクレーブページへのアクセスを禁ずることができる(may not allow accesses)。これは、TLBのクリアにより、またはさらなるビットを利用してエンクレーブエントリをタグ付けすることにより可能となる。   Each time an enclave exits (EEXIT), the TLB may forbid access to an enclave page that currently exists in the TLB. This can be done by clearing the TLB or by tagging the enclave entry using additional bits.

また別の方法としては、エンクレーブ退出時にTLBでエンクレーブビットを利用して、全てのエンクレーブエントリをクリアする、というものもある。別の方法としては、幾つかのビットを利用して特定のエンクレーブを特定するものもある。この場合、エンクレーブエントリは強制的に除去される必要がない。エンクレーブエントリは、tlbに残されてよい。アドレスをルックアップのためにtlbに送る場合には、これらビットはルックアップに追加される。これらビットは、エンクレーブの身元を示すコアからのエンクレーブidと比較される。ビットが合致した場合には、要求はこのエンクレーブから来ていることになる。合致しない場合には、要求がこのエンクレーブからのものではないことになるので、ルックアップはこの位置にヒットしない。   Another method is to clear all enclave entries using the enclave bit in the TLB when leaving the enclave. Another method uses several bits to identify a particular enclave. In this case, the enclave entry need not be forcibly removed. The enclave entry may be left in tlb. If the address is sent to tlb for lookup, these bits are added to the lookup. These bits are compared with the enclave id from the core that indicates the identity of the enclave. If the bits match, the request is from this enclave. If it does not match, the lookup will not hit this position because the request is not from this enclave.

エンクレーブ認証は、エンクレーブコードのエンクレーブ内における実行を許可した認可機関(つまり、このコードの著者/承認者)を見つける手段を提供する。エンクレーブ認証はさらに、エンクレーブマイクロコードフロー、フレキシブルシール&レポート、および、幾つかの新たなビジネスモデルの実施点を外部委託するファウンデーションも提供する。   Enclave authentication provides a means of finding an authorized authority (ie, the author / approver of this code) that has authorized the enclave code to execute within the enclave. Enclave certification also provides a foundation to outsource enclave microcode flow, flexible seals & reports, and some new business model implementation points.

セキュアエンクレーブアーキテクチャのある態様では、マイクロコード化された命令内の実装にあまり適していない複雑、且つ時間のかかるフローが必要となる場合がある。これに対する解決法は、セキュアエンクレーブアーキテクチャのこれらの部分をマイクロコードに外部委託することである。多くの場合、任されたコードは、繊細なプロセッサまたはプラットフォームデータへの特別なアクセスを要求する。例えばEPID信号は、単一の命令には長すぎる。この代わりに、クオーティング・エンクレーブを利用して、EPID秘密鍵への特別なアクセスを許可することにより、EPID署名されたクオートを生成する。エンクレーブ認証により、Intelは、クオーティング・エンクレーブのみによって、EPIDキーに対するアクセス等の特別なエンクレーブに許可された追加機能を特定することができる。Intelが提供するエンクレーブは、追加機能を有し、コアのエンクレーブ機能を実装するが、アーキテクチャエンクレーブと称される。   Certain aspects of the secure enclave architecture may require complex and time consuming flows that are not well suited for implementation within microcoded instructions. The solution to this is to outsource these parts of the secure enclave architecture to microcode. In many cases, delegated code requires special access to sensitive processor or platform data. For example, the EPID signal is too long for a single instruction. Instead, a quoted enclave is used to generate EPID-signed quotes by allowing special access to the EPID private key. Enclave authentication allows Intel to specify additional functions that are allowed for special enclaves, such as access to EPID keys, only by the quote enclave. The enclave provided by Intel has additional functionality and implements the core enclave functionality, but is referred to as an architecture enclave.

エンクレーブ・シール・ストレージは、エンクレーブのある属性(例えば装填時間計測値)にデータを暗号化する機能をエンクレーブソフトウェアに提供する。エンクレーブ証明フレームワークによって、エンクレーブは、エンクレーブを計測した証拠を外部の実体に提供することができる。多くの状況において、エンクレーブの正確なソフトウェアハッシュよりも、データのシールまたはエンクレーブのソースに対する証明のほうが望ましい。   Enclave seal storage provides enclave software with the ability to encrypt data to certain attributes of the enclave (eg, load time measurements). The enclave proof framework allows an enclave to provide outside entities with evidence of measuring the enclave. In many situations, proof of the data seal or source of the enclave is preferable to the exact software hash of the enclave.

一実施形態では、認証されたエンクレーブにおける署名が確認されると、エンクレーブの署名に利用されたキーの公的な部分は、シール&証明メカニズムに利用可能となり、この結果、販売業者は、エンクレーブ計測値に基づく強固な保護と、エンクレーブのコードのソースに基づくこれよりも柔軟な保護との間で選択することができるようになる。   In one embodiment, once the signature in the authenticated enclave is verified, the public part of the key used to sign the enclave is made available to the seal and certification mechanism so that the merchant can measure the enclave You can choose between strong protection based on value and more flexible protection based on the source of the enclave code.

エンクレーブ認証は2つの部分に分割される。各エンクレーブは、Intelにそのルートを辿る(rooted back to Intel)ことができる署名鎖(signature chain)を有するエンクレーブライセンスを伴っている。エンクレーブライセンスは、そのエンクレーブのソース/責任実体、エンクレーブが必要とする特別な機能、および、そのエンクレーブを実現する特別なビジネスモデル/取り決めを特定するために必要な追加情報を示す。ライセンスは、特別なエンクレーブに対するものであってよく、これは、このエンクレーブの計測値を示しており、または、キーについて示しており、これが後に必要に応じてエンクレーブに署名することができるようになる。   Enclave authentication is divided into two parts. Each enclave is accompanied by an enclave license with a signature chain that can be rooted back to Intel. The enclave license indicates the source / responsibility entity of the enclave, the special features required by the enclave, and the additional information needed to identify the specific business model / arrangement that implements the enclave. The license may be for a special enclave, which indicates the measurement value for this enclave, or for a key that will later be able to sign the enclave if necessary .

例えばAが、Aのビデオプレーヤで利用するエンクレーブを製造するライセンスを購入する場合を考える。このために、Intelは、販売業者Aのビデオプレーヤのルートキーと、Intelが販売業者Aがビデオプレーヤエンクレーブでの利用を許可される機能とに関するライセンスを生成する。次に販売業者Aは、ビデオプレーヤのルートキーを利用して、リリースする各ビデオプレーヤ修正版についての個々のライセンスファイルに署名する。これにより、エンクレーブのライセンス鎖が、複数の中間ライセンスを含むことになる。   For example, consider the case where A purchases a license for manufacturing an enclave used by A's video player. For this purpose, Intel generates a license regarding the root key of the video player of the seller A and the functions that the seller A is allowed to use in the video player enclave. Next, merchant A uses the video player's root key to sign an individual license file for each video player modified version to be released. As a result, the enclave license chain includes a plurality of intermediate licenses.

署名されたライセンス鎖は、エンクレーブ起動プロセス中の評価には理想的とはいえないので、代わりに、これらを、許可証(permit)と称される単一の命令の実行しやすい構造(single instruction digestible structure)に組み込む。許可証は、CMACアルゴリズムを利用して対称認証され、エンクレーブの初期化(EINIT)中に解釈される。

Figure 2012530961
Figure 2012530961
Figure 2012530961
Since signed license chains are not ideal for evaluation during the enclave activation process, they are instead replaced by a single instruction executable structure called a permit. digestible structure). The permit is symmetric authenticated using the CMAC algorithm and interpreted during enclave initialization (EINIT).
Figure 2012530961
Figure 2012530961
Figure 2012530961

ラインセンスの部分の殆どが許可証にコピーされ、同様の構造を成す。ライセンスIDは、ビジネス上の取り決めを特定するための64ビットの数値である。ライセンスの種類は、ライセンスを適用するプラットフォームを特定する。バルクライセンスにより、このエンクレーブを、セキュアなエンクレーブをサポートしているプラットフォーム上に立ち上げることができる。プラットフォームごとのライセンスにより、プラットフォームは先ず示されているライセンス認可機関に接触をとり、エンクレーブを立ち上げる許可を要求する。ひとたび許可されると、ライセンス認可機関とは接触をとる必要はなくなるが、これにより、ライセンス認可機関は、このエンクレーブが配置されたプラットフォームの数を課金目的で追跡することができる。このエンクレーブをライセンスしたISVは、エンクレーブのこのバージョンのセキュリティバージョン番号を構築することもできる。こうすることで、このバージョンがシールするデータを、前のバージョンではなくて将来のバージョンについて利用可能とすることができる。フラグフィールドは、この許可証を適用するために設定されうるエンクレーブのためのフラグを示す。機能マスクは、このエンクレーブに許可されうる特別な機能のビットマスクである。親のキーハッシュとは、このエンクレーブのライセンスを署名して、キーを署名した公開鍵でハッシュした公開鍵のハッシュである。実体ハッシュとは、このライセンスを適用する実体の予期されるハッシュである。エンクレーブの場合には、これは、適切に構築されたエンクレーブのMR.EADDの値である。ライセンスキーにおいては、これは公開鍵のハッシュである。   Most of the parts of the license are copied to the permit and have a similar structure. The license ID is a 64-bit numerical value for specifying a business agreement. The license type specifies the platform to which the license is applied. A bulk license allows this enclave to be launched on a platform that supports secure enclaves. With a per-platform license, the platform first contacts the indicated license authority and requests permission to launch the enclave. Once authorized, there is no need to contact the licensing authority, which allows the licensing authority to track the number of platforms on which this enclave is deployed for billing purposes. The ISV that licensed this enclave can also build the security version number for this version of the enclave. This way, the data sealed by this version can be made available for future versions rather than the previous version. The flag field indicates a flag for the enclave that can be set to apply this permit. The function mask is a bit mask of special functions that can be allowed for this enclave. The parent key hash is a hash of a public key obtained by signing the enclave license and hashing the key with the signed public key. The entity hash is an expected hash of the entity to which this license applies. In the case of an enclave, this is the MR. This is the value of EADD. For license keys, this is a hash of the public key.

ライセンスにおいては、ライセンスを署名するのに利用される公開鍵を、ライセンス自身に含める。許可証はCPUキーを利用してMACされる。正規のcpuMACは、EMKPERMIT命令がこの許可証を、ライセンス鎖が今度はIntelに対して認証されたことを示す。ライセンスの種類がバルクではない場合には、ライセンスMACが、アーキテクチャライセンスエンクレーブが適切なライセンス認可機関に連絡して、このプラットフォームがエンクレーブを立ち上げうるという確認を受けたことを示す。   In the license, the public key used to sign the license is included in the license itself. The permit is MACed using the CPU key. The regular cpuMAC indicates that the EMKPERMIT instruction has authenticated this license and that the license chain is now authenticated to Intel. If the license type is not bulk, the license MAC indicates that the architecture license enclave has contacted the appropriate license authority to confirm that the platform can launch the enclave.

全てのエンクレーブが許可証を要求するわけではない。エンクレーブの開発をし易くするために、開発中およびソフトウェアのライフサイクルのデバッグ段階に許可証をオプションとする。以下のポリシーがEINITにより実施される。非デバッグエンクレーブは常に許可証を立ち上げることを要求する。デバッグエンクレーブは、許可証なしに立ち上げられる。しかし、EINITに許可証が提示されない場合には、MR.Policy、ISV Secバージョン、許可証の見るバージョン(Permit See Version)、および機能の全てを0に設定する。   Not all enclaves require a permit. To facilitate the development of the enclave, permits are optional during development and during the debugging phase of the software life cycle. The following policies are enforced by EINIT. Non-debug enclaves always require that a license be launched. The debug enclave is launched without a permit. However, if no permit is presented to EINIT, MR. Policy, ISV Sec version, Permit See Version, and function are all set to zero.

許可証がデバッグエンクレーブの立ち上げに利用される場合には、permit−>フラグ「デバッグ」を設定することができ、デバッグエンクレーブが許可する機能のみを許可証に設定することができる。   When the permit is used for starting the debug enclave, the permission-> flag “debug” can be set, and only the function permitted by the debug enclave can be set as the permit.

図16は、本発明の一実施形態のエンクレーブを立ち上げる許可証を生成するプロセスの一例を示す。このプロセスは、3つの段階(許可証発行1600、さらなるライセンス承認1640、および初期化エンクレーブ1680)を有することができる。許可証発行1600段階では、ISVキー許可証1615を、EMKPERMIT命令1612をISVキーライセンス1610に実行することにより生成することができる。CPUのみ用のMACを有するエンクレーブ許可証1625は、EKPERMIT命令1612を、エンクレーブライセンス1620およびISVキー許可証1615に行うことにより生成することができる。さらなるライセンス承認1640段階では、CPUのみ用のMACを有するエンクレーブ許可証1625、および、ライセンスされる情報に対応する第三者エンクレーブ1642が、ライセンスエンクレーブ1644に入り、ライセンスエンクレーブ1644が、CPU用のMACおよびライセンスを有するエンクレーブ許可証1645を生成する。初期化エンクレーブ1680段階では、エンクレーブSECS1682、および、CPU用のMACおよびライセンスを有するエンクレーブ許可証1645が、EINIT1684命令に対する入力とされてよい。EINIT1684mリtリの出力は、ISVエンクレーブ1685となる。   FIG. 16 illustrates an example of a process for generating a permit to launch an enclave according to one embodiment of the present invention. This process can have three stages: permit issuance 1600, further license approval 1640, and initialization enclave 1680. In the license issuance 1600 stage, the ISV key permit 1615 can be generated by executing the EMKPERMIT instruction 1612 on the ISV key license 1610. An enclave permit 1625 having a CPU only MAC can be generated by issuing an EKPERMIT instruction 1612 to the enclave license 1620 and the ISV key permit 1615. In a further license approval 1640 stage, an enclave permit 1625 with a CPU-only MAC and a third party enclave 1642 corresponding to the licensed information enters the license enclave 1644, where the license enclave 1644 is a MAC for the CPU. And an enclave permit 1645 with license. In the initialization enclave 1680 stage, the enclave SECS 1682 and the enclave permit 1645 with the MAC and license for the CPU may be input to the EINIT 1684 instruction. The output of EINIT 1684m is an ISV enclave 1685.

エンクレーブを起動するには、ソフトウェアとともに出荷されるライセンスから許可証を生成して、CPUに提供して、エンクレーブを開始させることができる。このプロセスは、許可証発行、さらなるライセンス承認、および、エンクレーブ初期化という3つの段階に分割することができる。図16は、このプロセスのフローを示す。   To activate the enclave, a license can be generated from a license shipped with the software and provided to the CPU to initiate the enclave. This process can be divided into three phases: permit issuance, further license approval, and enclave initialization. FIG. 16 shows the flow of this process.

EMKPERMITという新たな命令を利用して、ライセンスから許可証を生成する。EMKPERMITは、単一のライセンスから単一の許可証を生成するが、連続呼び出しされることで、ライセンスの鎖を、許可書キーを利用してMACを有する単一の許可証に変換することもできる。次のセクションでは、このことを詳述する。   A license is generated from the license using a new command called EMKPERMIT. EMKPERMIT generates a single license from a single license, but can be called continuously to convert a chain of licenses into a single license with MAC using a license key. it can. The next section details this.

各ライセンスは、許可証を利用可能とするためにとることができるさらなるステップを決定する「ライセンスの種類」を含む。プラットフォームごとのライセンスは、クラウドのライセンス認可機関に、エンクレーブが配置されるプラットフォームの課金額を維持するよう要求する。この種類のライセンスにおいては、さらなる段階が必要となる。つまり、ライセンスエンクレーブと称されるアーキテクチャエンクレーブは、クラウドのライセンス認可機関と交渉して、承認されると、ライセンスキーを用いて許可証にさらなるMACを提供する。例えばアーキテクチャエンクレーブは常にバルクライセンスであり、これは、実行するためにライセンスキーMACが不要であることを意味する。これらは、セキュアなエンクレーブをサポートする任意のプラットフォーム上で動作する。   Each license includes a “license type” that determines the further steps that can be taken to make the permit available. The license for each platform requires the cloud licensing authority to maintain the billing amount for the platform on which the enclave is located. This type of license requires additional steps. That is, an architecture enclave, called a license enclave, negotiates with the cloud licensing authority and, when approved, provides additional MAC to the permit using the license key. For example, an architecture enclave is always a bulk license, which means that a license key MAC is not required to execute. They run on any platform that supports secure enclaves.

エンクレーブの初期化において許可証が実施形態される。初期化中に許可証が処理され、エンクレーブ計測値が許可証内のものと合致した場合には、MACは正しいことになり、エンクレーブが起動される。EINITはライセンスの種類を見て、さらなる承認を要するライセンスのライセンスMACのみを調査する。   A permit is implemented in the initialization of the enclave. If the permit is processed during initialization and the enclave measurement matches that in the permit, the MAC is correct and the enclave is activated. EINIT looks at the type of license and examines only the license MAC for licenses that require further approval.

EMKPERMITは、ライセンス上のRSA署名を検証するのに必要となる時間のために、特権付き命令である。この命令は、uCodeパッチフォーマットに準拠して、検証して、その内容から許可証を生成する非常に単純な署名付き証明書をとる。ライセンスは、署名およびそれを署名するのに利用するキーの公開部分の両方を含む。これにより、uCodeは、Intelのライセンス署名キーのハッシュのみを格納して、Intelが署名したライセンスを認証することができる。EMKPERMITは、さらに、キーの認証された承認を提供することにより、ISVキーが署名したライセンスを認証することができる。これは、ISVの公開鍵のハッシュを含む許可証を作成することによって行われる。この結果、EMKPERMITがIntelのライセンスを、内部ハッシュ、あるいは、第2の許可証に提供されているハッシュを持つISVキーを利用して、Intelのライセンスを検証することができる。   EMKPERMIT is a privileged instruction because of the time required to verify the RSA signature on the license. This instruction takes a very simple signed certificate that conforms to the uCode patch format and verifies and generates a permit from its contents. The license includes both the signature and the public part of the key used to sign it. Thereby, uCode can authenticate the license signed by Intel by storing only the hash of the license signature key of Intel. The EMKPERMIT can also authenticate the license signed by the ISV key by providing an authorized authorization of the key. This is done by creating a permit containing a hash of the ISV's public key. As a result, EMKPERMIT can verify the Intel license using the Intel license using the internal hash or the ISV key having the hash provided in the second permit.

EMKPERMITは、ライセンスへのポインタ、キー許可証へのオプションのポインタ、および、出力許可証へのポインタという3つのパラメータをとる。Intelが署名したライセンスについては、キー許可証が空値であり、内部的にハードコードされた許可証パラメータのセットが利用される。アーキテクチャエンクレーブのライセンスを認証する呼び出し方法を利用して、その許可証を生成する。EMKPERMITは、このライセンスの公開鍵がuCodeにより認可されるようにする(含まれている公開鍵のハッシュを内部ハッシュと比較することにより)。   EMKPERMIT takes three parameters: a pointer to a license, an optional pointer to a key certificate, and a pointer to an output certificate. For licenses signed by Intel, the key permit is null and an internally hard-coded set of permit parameters is used. The permission is generated by using a calling method for authenticating the license of the architecture enclave. EMKPERMIT ensures that the public key of this license is authorized by uCode (by comparing the hash of the included public key with the internal hash).

ISVの場合には、ISVのキーは、Intelが署名したライセンスを有する。キー許可証を利用しないEMKPERMITの呼び出しには、Intelのキーハッシュを利用して、ライセンス上の署名を検証して、ISVキーのハッシュを認可する許可証を生成して、合法なライセンス署名キーを表す。そしてEMKPERMITを再度呼び出す(ISVのキーの許可証を含む)。EMKPERMITは、キーの許可証のMACを認証して、前にIntelのハッシュを利用したISVキーのハッシュを利用する。エンクレーブライセンスの公開鍵がISVキーの値にハッシュを行い、且つ、エンクレーブライセンスがそれにより適切な署名を行う、ということを仮定して、EMKPERMITは、エンクレーブ用の許可証を生成する。この許可証は、ライセンス情報(全鎖で一貫していてよい)、ライセンス鎖の全ての公開鍵のハッシュ、エンクレーブの計測値、およびその機能を示している。   In the case of ISV, the ISV key has a license signed by Intel. To call EMKPERMIT without using a key certificate, use Intel's key hash to verify the signature on the license, generate a license that authorizes the hash of the ISV key, and provide a legal license signature key. Represent. Then call EMKPERMIT again (including ISV key permit). EMKPERMIT authenticates the MAC of the key certificate and uses the hash of the ISV key that previously used the Intel hash. Assuming that the enclave license's public key hashes the value of the ISV key and the enclave license thereby signs appropriately, EMKPERMIT generates a license for the enclave. This permit indicates the license information (which may be consistent throughout the chain), the hash of all public keys in the license chain, the enclave measurement, and its function.

以下のステップがu−codeによりEMKPERMIT中にとられる。

Figure 2012530961
The following steps are taken during EMKPERMIT by u-code.
Figure 2012530961

ライセンスエンクレーブは、uCodeが見える範囲の外で起動されるエンクレーブについての決定をするように設計される。例えばuCodeは、ISVのIntelとのビジネスにおける取り決めにより、さらなるエンクレーブ配置が許可されるかを評価する。ライセンスエンクレーブは、アセスメントを行う必要がある全ての材料の収集、および、エンクレーブの起動のさらなる承認、拒絶を行うように設計されている。ライセンスエンクレーブは、複雑なビジネスにおける取り決めのみをサポートする必要があり、バルクライセンス(例えば、必要とされている回数だけ任意のプラットフォームでエンクレーブを起動させる機能)には必要がない。   The license enclave is designed to make decisions about enclaves that are activated outside the range where uCode is visible. For example, uCode evaluates whether further enclave placement is permitted due to business arrangements with ISV's Intel. The license enclave is designed to collect all the materials that need to be assessed and to further approve and reject the enclave activation. License enclaves need to support only complex business arrangements, not bulk licenses (eg, the ability to launch an enclave on any platform as many times as needed).

ライセンスエンクレーブは、システムサービスであることが予期されている。ライセンスが、ライセンスエンクレーブからのさらなる承認が必要であると示す場合、EMKPERMITが生成したライセンス鎖およびエンクレーブ許可証をライセンスエンクレーブに渡す。ライセンスエンクレーブは次に、承認要求を生成する。そしてアプリケーションはこの承認要求を適切なライセンス認可機関に送り、ここで承認通知が生成される。そしてライセンスエンクレーブに戻されて、ライセンスエンクレーブは、ライセンスキーを利用して、ライセンスMACフィールド内の許可証をMACする。   The license enclave is expected to be a system service. If the license indicates that further approval from the license enclave is required, the license chain generated by EMKPERMIT and the enclave permit are passed to the license enclave. The license enclave then generates an approval request. The application then sends this approval request to the appropriate license authority, where an approval notification is generated. Returning to the license enclave, the license enclave MACs the permit in the license MAC field using the license key.

エンクレーブに対して許可証が発行されると、エンクレーブ機動プロセスでu−codeを利用して評価して実施することができる。これは、許可証のリニアアドレスをパラメータとして利用して、EINIT命令の一部として実施される。(1)スクラッチパッドの許可証をコピーする、(2)許可証上のcpuMACを、許可証キーを利用して検証する、(3)ライセンスタイプ!=バルクである場合には、ライセンスMACを、ライセンスキーを利用して検証する、(4)許可証内の計測値を、SECS内のMR.EADDと比較する、(5)許可証内のフラグを、SECS内のフラグと比較する、(6)許可証内のPubkeyハッシュをMR.Policyにコピーする、(7)ISV SVNをSECSにコピーする、(8)許可証内の機能マップをSECSにコピーする、という、さらなるステップをEINITに、認証されたエンクレーブメカニズムの一環として追加する。   When a permit is issued to the enclave, it can be evaluated and implemented using u-code in the enclave maneuver process. This is implemented as part of the EINIT command, using the linear address of the permit as a parameter. (1) Copy the scratch pad permit, (2) Verify cpuMAC on the permit using the permit key, (3) License type! = If bulk, the license MAC is verified using the license key. (4) The measured value in the permit is changed to MR. Compare with EADD, (5) Compare flag in permit with flag in SECS, (6) Set pubkey hash in permit to MR. Add additional steps to EINIT as part of the authenticated enclave mechanism: Copy to Policy, (7) Copy ISV SVN to SECS, and (8) Copy the function map in the permit to SECS.

<機能>
現在の機能マップは、このエンクレーブに利用可能な128ビットマスクの機能である。

Figure 2012530961
Figure 2012530961
<Function>
The current function map is a 128 bit mask function available for this enclave.
Figure 2012530961
Figure 2012530961

空間は、EINITがとるアクションに基づいて組織化される。ビット00−03は、リングレベルの制約がこのエンクレーブ上でアクティブになったときの将来の利用のためにリザーブされる。04−07は、将来許可されるページ保護を示すためにリザーブされている。08−23は、EGETKEYを通じて利用可能なプロセッサキーである。24−31は、他の制御(例えば証明のために名称ベースのモードを利用する、または、将来制限を希望する技術に対するもの等)のためである。一部の機能は、デバッグモードでエンクレーブによって利用されない。デバッグ列は、ある機能をデバッグモードにおいて利用して合法かを示す。   The space is organized based on the actions taken by EINIT. Bits 00-03 are reserved for future use when a ring level constraint is activated on this enclave. 04-07 is reserved to indicate page protection allowed in the future. 08-23 is a processor key that can be used through EGETKEY. 24-31 is for other controls (e.g., using name-based mode for certification, or for technologies that wish to be restricted in the future). Some features are not used by the enclave in debug mode. The debug column indicates whether a function is legal in the debug mode.

将来の世代においては、ビット00は、リングレベルおよびVTの制約が、このエンクレーブに適用されることを示していてよい。ビット01−02は、エンクレーブが実行を許可されるリングレベルを示しており、ビット02は、エンクレーブがVTルートモードで実行されるか示している。各EENTERにおいて、現在のCPLをビット01−02に比較して、このエンクレーブがこのリングレベルにおいて実行を許可されているかを判断する。これを実行する試みが誤ったリングで行われる場合、EENTERは失敗する。同様に、リング制約がアクティブな場合は、エンクレーブは、ビット03が起動中にはVTルートモードからしか入ることができない。第一世代では、これらビットがMBZである。   In future generations, bit 00 may indicate that ring level and VT constraints apply to this enclave. Bit 01-02 indicates the ring level at which the enclave is allowed to execute, and bit 02 indicates whether the enclave is executed in the VT root mode. At each EENTER, the current CPL is compared to bits 01-02 to determine if this enclave is allowed to execute at this ring level. If an attempt to do this is made on the wrong ring, EENTER will fail. Similarly, if the ring constraint is active, the enclave can only enter from VT root mode while bit 03 is active. In the first generation, these bits are MBZ.

エンクレーブページは、暗号化されても、整合性のみを保護されてもよい。さらに、ページは実行可能であってもなくてもよい。将来の世代においては、これらの属性を追跡して、EPCMのセキュリティ情報の部分で実施することができる。ページが実施可能であるか、またはエンクレーブが既にEINITされているかに基づいて、エンクレーブのエンクレーブページへの暗号化の利用を制御するために機能ビットがリザーブされる。   Enclave pages may be encrypted or only protected for integrity. Further, the page may or may not be executable. In future generations, these attributes can be tracked and implemented in the security information part of the EPCM. Function bits are reserved to control the use of encryption to the enclave page of the enclave, based on whether the page is operational or the enclave is already EINIT.

多くのアーキテクチャエンクレーブは、CPU内で、またはCPUにより保護されているキーへのアクセスを要求するリング3の実体である。EGETKEYはこれらキーに対するアクセスを提供し、機能ビットは、キーへのアクセスを許可することができるか決定するためにEGETKEYにより利用される。   Many architecture enclaves are ring 3 entities that require access to a key protected within or by the CPU. EGETKEY provides access to these keys, and the function bits are used by EGETKEY to determine if access to the keys can be granted.

以下は、これら特性および短い説明を有する現在のアーキテクチャエンクレーブのリストである。   The following is a list of current architecture enclaves with these characteristics and a short description.

プロビジョンエンクレーブは、KEY_PROVISION機能を有し、Intelにより承認されており、新たなデバイス証明キー(DAK)またはプロビジョン証明キー(PAK)が必要になるたびに、単一のパッケージプラットフォーム上で実行される。その目的は、エンクレーブに、EGETKEYが提供するプロビジョンシードに基づいて、デバイスID&プロビジョンキーを導出させる、というものである。次いでプロビジョンエンクレーブは、これらキーを利用して、プロビジョンサーバに対してプラットフォームの正当性を証明して、デバイス証明キー(DAK)を取得する。DAKを取得した後で、プロビジョンエンクレーブは、オプションとしてDAKを利用して、プラットフォーム証明キー(PAK)プロバイダとの間で認証を行い、PAKを再試行する。PAKの利用により、特定のISVについて保証することで、ユーザによりよいプライバシーを提供することができ、そのアクティビティがそのプラットフォームの前の所有者のものに関連付けられなくなる。PAKを取得してから、プロビジョンエンクレーブは、クオーティング・エンクレーブが取得することができるように、それをシールする。   Provision Enclave has KEY_PROVISION functionality, is approved by Intel, and runs on a single package platform each time a new Device Certification Key (DAK) or Provision Certification Key (PAK) is required The The purpose is to let the enclave derive the device ID & provision key based on the provision seed provided by EGETKEY. The provision enclave then uses these keys to prove the validity of the platform to the provision server and obtain a device certification key (DAK). After obtaining the DAK, the Provision Enclave optionally uses the DAK to authenticate with a Platform Certification Key (PAK) provider and retry the PAK. By using a PAK, guaranteeing for a particular ISV can provide the user with better privacy and the activity will not be associated with that of the previous owner of the platform. After obtaining the PAK, the Provision Enclave seals it so that the Quarting Enclave can obtain it.

クオーティング・エンクレーブは、機能KEY_REPORTを有し、エンクレーブにより承認されており、EPIDキーをプロビジョンするのに利用されたプロビジョンエンクレーブ(通常はIntel)と同じ著者を有する。その位置は、全てのappsに対して利用可能であるOSサービスである。その目的は、エンクレーブにプラットフォームEPIDキーのシールを解かせることである。EREPORTからのレポートは入力として提供される。エンクレーブは、EGETKEYを利用して、レポートキーを取得する。レポートキーは、次に、レポートを検証するのに利用される。エンクレーブは、EPIDの利用によりクオートに署名する。   The quota enclave has the function KEY_REPORT, is approved by the enclave, and has the same author as the provision enclave (usually Intel) used to provision the EPID key. The location is an OS service that is available for all apps. Its purpose is to let the enclave unseal the platform EPID key. A report from EEPPORT is provided as input. The enclave obtains a report key using EGETKEY. The report key is then used to verify the report. The enclave signs the quotes using the EPID.

ライセンスエンクレーブは、KEY_LICENSE機能を有し、Intelにより認可され、Root Intelにより署名されており、エンクレーブ(OSサービス)とともに出荷され、単独でインスタンス化されている。その目的は、複雑なライセンスポリシーを評価することである。エンクレーブがライセンスエンクレーブからさらなるライセンス確認を要求する場合には、EINITは、ライセンスエンクレーブがライセンスキーを利用してその許可証をCMACした後に限り、それを受け付けることができる。   The license enclave has a KEY_LICENSE function, is authorized by Intel, signed by Root Intel, shipped with the enclave (OS service), and instantiated alone. Its purpose is to evaluate complex license policies. If the enclave requests further license confirmation from the license enclave, EINIT can accept it only after the license enclave has CMACed its permit using the license key.

単一のパッケージシステムにおいて、エンクレーブのアーキテクチャが利用する全ての対称キーを、プロセッサのヒューズアレイに格納された単一の特異性ソースから導出する。キー階層は、SE TCB階層に分割されて、これはプラットフォーム実装に依存しており、その構造が全てのセキュアなエンクレーブ実装にわたり一貫したSEキー階層である。TCB復帰用のキーイング材料およびEPIDプロビジョンの基礎は、SEキー階層のルートとして機能するSE TCB階層により提供される。エンクレーブ命令セットおよびトラステッドアーキテクチャエンクレーブ両方で利用される全てのキーイング材料は、SEキー階層により提供される。   In a single package system, all symmetric keys utilized by the enclave architecture are derived from a single singularity source stored in the processor's fuse array. The key hierarchy is divided into SE TCB hierarchies, which are platform implementation dependent, and whose structure is a consistent SE key hierarchy across all secure enclave implementations. The keying material for TCB reversion and the basis of EPID provision is provided by the SE TCB hierarchy, which serves as the root of the SE key hierarchy. All keying material utilized in both the enclave instruction set and the trusted architecture enclave is provided by the SE key hierarchy.

プラットフォームは、ヒューズされている128ビットのプラットフォーム固有キーを提供する。これらキーは、秘密のCPU論理に格納されているキーを利用してヒューズで暗号化される。幾つかの単一の目的のキーはこのキーを利用して導出され、TCB復帰技術は、プラットフォームの要件に基づいて適用される。結果生じるキーは、SEキー階層のルートとして機能する。   The platform provides a 128-bit platform specific key that is fused. These keys are encrypted with fuses using keys stored in the secret CPU logic. Several single-purpose keys are derived using this key, and TCB reversion techniques are applied based on platform requirements. The resulting key serves as the root of the SE key hierarchy.

アーキテクチャエンクレーブのキーは、EGETKEY命令を利用して取得される。   The key for the architecture enclave is obtained using the EGETKEY instruction.

エンクレーブアーキテクチャは、REPORTの値の証明をプラットフォーム外のシステムに提供するために非対称キーの利用を必要とする。このキー(EPIDキー)は、最初はヒューズで提供されるが、配置後にキー階層から導出されるキーの1つを利用して再度プロビジョンされてよい。EPID証明キーのプロビジョン方法は、本明細書の範囲外である。さらなる情報は、デバイス証明キー(DAK)プロビジョン仕様を参照されたい。   The enclave architecture requires the use of asymmetric keys to provide proof of the REPORT value to off-platform systems. This key (EPID key) is initially provided with a fuse, but may be re-provisioned using one of the keys derived from the key hierarchy after placement. EPID certificate key provisioning methods are outside the scope of this specification. For more information, see the Device Certification Key (DAK) provision specification.

最後に、エンクレーブのアーキテクチャも、全てのプロセッサの論理にあるキーを利用して、OEMにおけるキーイング材料をプロビジョンする。このキーはアウトオブボックス経験グローバルキー(Out-of-Box Experience Global Key)として知られている。我々は、このキーに同様の導出処理を行い、ISVの固有性を提供する。OOBキーから導出されたこれらキーのISVによる利用法は、本明細書の範囲外である。   Finally, the enclave architecture also uses keying in all processor logic to provision keying material in the OEM. This key is known as the Out-of-Box Experience Global Key. We perform a similar derivation process on this key to provide ISV uniqueness. The use of these keys derived from OOB keys by ISV is outside the scope of this specification.

キー階層のSE TCBの部分はプラットフォーム特有であり、全ての基礎は、同じ基本のキーセットを必要とする。我々はこれらをベースキーと称す。これらは全てヒューズキーおよび論理キー内に導出され、SEキー階層のルートである。次いでこれらキーは、SE命令により、SEアーキテクチャで直接利用される全てのキーを導出するために利用される。これらキーはTCBキー階層の結果である。4つのSEベースキーに、プラットフォーム固有メカニズムによりSEアーキテクチャに利用可能となるEPIDコンポーネントが足し合わせられる。表12−1は、これらキーをそれぞれ示す。

Figure 2012530961
The SE TCB portion of the key hierarchy is platform specific and all foundations require the same basic key set. We call these base keys. These are all derived in the fuse key and logical key and are the root of the SE key hierarchy. These keys are then used by the SE instruction to derive all keys used directly in the SE architecture. These keys are the result of the TCB key hierarchy. The four SE base keys are combined with EPID components that are made available to the SE architecture through platform specific mechanisms. Table 12-1 shows these keys.
Figure 2012530961

図17は、単一のパッケージのセキュアなエンクレーブのためのプラットフォームキー階層の実装を示す本発明の一実施形態を示す。ボックスベースキー外1700は、利用可能な導出リソース1750から導出され1702、ボックスキー外1704が生成される。利用可能な導出リソース1750は、固有値1752、所有者エポック1754、セキュアなエンクレーブセキュリティバージョン1756、SECS計測値レジスタ1758、ISVセキュリティバージョン1760、およびSECSフラグ1762を含むエレメントを有するストリングである。プロビジョンキー1710は、Intelバックエンドに対してプラットフォームの正当性を証明することができる。EPID ID1712は署名キーである。初期safeIDキーブロブ1718は、クオートであり、safeIDシード1716に関連付けられている。ベースopsキー1714は、利用可能な導出リソース1750からの情報と組み合わせられて、エンクレーブキー1730、許可証キー1732、ライセンスキー1734、レポートキー1736、認証キー1738、およびシールキー1740を含む一連のキーを導出する1720ことができる。   FIG. 17 illustrates one embodiment of the present invention showing an implementation of a platform key hierarchy for a single package secure enclave. Out of box base key 1700 is derived 1702 from available derived resources 1750, and out of box key 1704 is generated. Available derived resources 1750 are strings having elements including unique value 1752, owner epoch 1754, secure enclave security version 1756, SECS measurement register 1758, ISV security version 1760, and SECS flag 1762. Provision key 1710 can prove the legitimacy of the platform to the Intel backend. EPID ID 1712 is a signature key. The initial safeID key blob 1718 is a quote and is associated with a safeID seed 1716. Base ops key 1714 is combined with information from available derived resources 1750 and is a series of keys including enclave key 1730, permit key 1732, license key 1734, report key 1736, authentication key 1738, and seal key 1740. Can be derived 1720.

図17aは、マルチパッケージキー階層の一実施形態を示す。   FIG. 17a illustrates one embodiment of a multi-package key hierarchy.

セキュアなエンクレーブ命令およびデータ構造は、キーイング材料のソースであるベースキーに依存している。表12−1に示すプラットフォームキー階層は、プラットフォームキー材料の階層関係、および、プラットフォームルートキーからのキーの導出方法の記述である。   Secure enclave instructions and data structures depend on the base key that is the source of the keying material. The platform key hierarchy shown in Table 12-1 is a description of a hierarchical relationship of platform key materials and a method of deriving a key from the platform root key.

エンクレーブラップキー(enclave wrapping key)1752は、エンクレーブページキャッシュ(EPC)内で保護されていない間にセキュアなエンクレーブ制御構造(SECS)のページを暗号化するのに利用される対称キーである。   An enclave wrapping key 1752 is a symmetric key used to encrypt secure enclave control structure (SECS) pages while not protected in an enclave page cache (EPC).

許可証キー1754は、許可証に正当性および整合性を提供するのに利用され、これにはエンクレーブの機能およびライセンス情報が含まれる。許可証はMACされて、EINITへの遷移中にその整合性が確かめられる。このキーはEMKPERMIT uCodeおよびEINITにより利用される。   Permit key 1754 is used to provide legitimacy and integrity to the permit, including enclave functionality and license information. The permit is MACed and its consistency is verified during the transition to EINIT. This key is used by EMKPERMIT uCode and EINIT.

ライセンスキー1756は、uCodeにより評価不可能なライセンスポリシーに準拠してアサートするのに利用される(is used assert compliance with)。ライセンスキーは、EINITが評価するライセンスエンクレーブから認証された承認を生成するのに利用される。EINIT uCodeが利用するこのキーは、EGETKEYを介して利用可能であり、KEY_LICENSE機能セットとともにエンクレーブされる。   The license key 1756 is used to assert in accordance with a license policy that cannot be evaluated by uCode (is used assert compliance with). The license key is used to generate an authorized authorization from the license enclave that EINIT evaluates. This key used by EINIT uCode is available via EGETKEY and is enclaveed with the KEY_LICENSE feature set.

レポートキー1758は、レポートの正当性および整合性を提供するのに利用される。レポートは、ERREPORTによりMACされ、クオーティング・エンクレーブに遷移する間に、整合性を確かめられる。このキーはEREPORT uCodeにより利用され、QUOTE機能セットを有するエンクレーブに対してEGETKEYを介して利用可能となる。   Report key 1758 is used to provide the legitimacy and consistency of the report. The report is MACed by ERREPORT and verified for consistency during the transition to the quota enclave. This key is used by the ERAPORT uCode and is available via EGETKEY to the enclave with the QUIOTE function set.

認証キー1760は、エンクレーブ固有キーであり、クオーティング・エンクレーブからISVエンクレーブに送信されるデータの正当性および整合性を提供するのに利用され、エンクレーブからエンクレーブへの認証を同じプラットフォームで実現する。キーは、EGETKEYを介して全てのエンクレーブに利用可能となり、ISV_AUTH機能セットを有するエンクレーブが、必要としているキーを特定することができる。   The authentication key 1760 is an enclave-specific key and is used to provide the correctness and integrity of data sent from the quartering enclave to the ISV enclave and provides enclave-to-enclave authentication on the same platform. Keys are made available to all enclaves via EGETKEY, and an enclave with an ISV_AUTH function set can identify the keys it needs.

シールキー1762は、128ビットを各エンクレーブに提供して、それらの含む繊細なデータを暗号化させる。複数のシールポリシーをこのシールキーに統合することで、ISVに、どのソフトウェアを使ってデータのシールを解くかについての柔軟性を持たせることができる。これらのキーは、EGETKEを介して任意のエンクレーブに利用可能となるが、個々にはシールキーは、要求されているシールポリシーに合致するエンクレーブにのみ利用可能となる。   Seal key 1762 provides 128 bits to each enclave to encrypt the sensitive data they contain. By integrating multiple seal policies into this seal key, the ISV can have the flexibility to use which software to unseal the data. These keys are available for any enclave via EGETKE, but individually the seal keys are only available for enclaves that meet the required seal policy.

EPID ID1712は、パッケージを一意に識別する。その唯一の目的は、デバイス証明キーのプロビジョンを可能とする、ということであり、デバイス証明キーは、EPIDベースの匿名証明キーである。EPID IDは、プロビジョンエンクレーブのみにアクセス可能である。プロビジョンエンクレーブは、これをセキュアなチャネルを介して、承認されたプロビジョンサーバのみに提供し、しかもこれは、ユーザまたはオペレーティングシステムが開始するプロビジョンプロセス中に限って行われる。このIDは、PROVISIONING機能を有するエンクレーブに対してEGETKEYを介して利用可能となる。   The EPID ID 1712 uniquely identifies the package. Its sole purpose is to allow provisioning of device certification keys, which are EPID-based anonymous certification keys. The EPID ID is accessible only to the provision enclave. Provision enclaves provide this only to authorized provision servers via a secure channel, and only during the provisioning process initiated by the user or operating system. This ID can be used via EGETKEY to an enclave having a PROVISIONING function.

プロビジョンキー1710は、Intelバックエンドにプラットフォームの正当性を証明すること、および、現在のSE TCBの実行を認証することに利用される。プロビジョンキーへのアクセスを示すことで、プロビジョンサーバは、エンクレーブが実際はEPID IDを所有しており、少なくとも特定のTCBセキュリティバージョン上で実行されているデバイスであることを確かめることができる。プロビジョンキーは、このパッケージおよびこれを要求するプロビジョンエンクレーブの署名者に固有である。これにより、単一のプラットフォームで利用されている場合、これら複数のプロビジョンインフラストラクチャの間を分離させることができる。このキーはEGETKEYを介して、KEY_PROVISION機能を有するエンクレーブに利用可能である。   Provision key 1710 is used to prove platform validity to the Intel backend and to authenticate the execution of the current SE TCB. By indicating access to the provision key, the provision server can ascertain that the enclave is actually a device that has an EPID ID and is running on at least a particular TCB security version. The provision key is unique to the signer of this package and the provision enclave that requires it. This allows separation between these multiple provision infrastructures when used on a single platform. This key can be used for an enclave having a KEY_PROVISION function via EGETKEY.

プロビジョンシールキーは、所有権に変更があった後であっても取得可能な方法でプロビジョンを暗号化することができるように、128ビットキーをプロビジョンエンクレーブに与える。このキーを利用して古いEPIDを暗号化することで、新たなEPIDの取得中にプラットフォームが無効になったことを証明することができる。プロビジョンキーはこのパッケージおよびこれを要求するプロビジョンエンクレーブの署名者に固有である。これにより、単一のプラットフォームで利用されている場合、これら複数のプロビジョンインフラストラクチャの間を分離させることができる。このキーはEGETKEYを介して、KEY_PROVISION機能を有するエンクレーブに利用可能である。   The provision seal key gives a 128-bit key to the provision enclave so that the provision can be encrypted in an obtainable manner even after ownership changes. By encrypting the old EPID using this key, it is possible to prove that the platform has become invalid during acquisition of a new EPID. The provision key is unique to the signer of this package and the provision enclave that requires it. This allows separation between these multiple provision infrastructures when used on a single platform. This key can be used for an enclave having a KEY_PROVISION function via EGETKEY.

ISVアウトオブボックス(OOB)経験キー1700は、全てのIntelプラットフォームとISVとの間の共有キーである。このキーは、特定のISVに固有のOOBルートから導出される。ISVは、このキーに購入アクセスすることができ、このキーに対して秘密を暗号化して、OEMのハードディスク画像内に配置することができる。これらの秘密は、セキュアなエンクレーブ内で安全に実行されているこれらのコードのみがアクセス可能であり、プラットフォームはオンライン動作または完全な証明キープロビジョンを行う必要がない。これらキーはEGETKEYを介して、OOB機能を有するエンクレーブに利用可能である。   The ISV Out of Box (OOB) experience key 1700 is a shared key between all Intel platforms and ISVs. This key is derived from the OOB root that is specific to a particular ISV. The ISV can purchase access to this key and encrypt the secret against this key and place it in the OEM hard disk image. These secrets are only accessible by those codes that are securely executed within the secure enclave, and the platform does not need to perform online operations or full proof key provisioning. These keys can be used for an enclave having an OOB function via EGETKEY.

プロビジョンキーは、セキュアなエンクレーブアーキテクチャに対して重要なキーであるが、プラットフォーム・キーイング材料からは導出されない。これらキーは、プロビジョンサーバまたはオフライン技術からプロビジョンされる。デバイス証明キー(DAK)は、個々のエンクレーブの特性を証明するための匿名署名キー(EPID)利用である。これは、キーまたは秘密のプロビジョン中にISVにより利用され、この繊細な情報を改ざんされていないアプリケーションの保護された導入にのみ送信するようにする。   The provision key is an important key to a secure enclave architecture, but is not derived from platform keying material. These keys are provisioned from a provision server or off-line technology. The device certification key (DAK) is the use of an anonymous signature key (EPID) to prove the characteristics of individual enclaves. This is used by the ISV during key or secret provisioning to ensure that this sensitive information is sent only to protected installations of untampered applications.

デバイス証明キーには2つのソースがある。好適なアーキテクチャは、ヒューズで圧縮される初期DAKを、EPIDキーブロブおよびEPIDエントロピーとして出荷する。これにより、プラットフォームは、最初の電源投入直後に証明を開始することができるようになる。第2のソースは、DAKプロビジョンサーバに接触をとり、EPID IDおよびプロビジョンキーを利用してハードウェアの正当性を証明した後に1つがダウンロードされる。この2番目の方法は、ヒューザされたEPID キーを有さないプラットフォームおよび基礎となるTCBのバージョンを無効化した後のプラットフォームにより利用される。EPIDヒューズは、EGETKEYを介してPROVISIONING機能を有するエンクレーブにアクセス可能である。   There are two sources of device certification keys. The preferred architecture ships the initial DAK that is compressed with a fuse as an EPID key blob and EPID entropy. This allows the platform to begin certification immediately after the first power up. The second source is downloaded after contacting the DAK provision server and using the EPID ID and provision key to validate the hardware. This second method is used by platforms that do not have a fused EPID key and platforms after invalidating the underlying TCB version. The EPID fuse can access an enclave having a PROVISIONING function via EGETKEY.

プラットフォーム証明キー(PAK)は、オプションとしてさらなるプライバシーのレベルを提供する。DAKのある利用を関連付けることもできる。特にISVエンクレーブが名称ベースの証明機能を有する場合には、単一のISVが、所与のEPIDがこのサービスを再利用するか判断することができる。(しかし複数のISVの間で、ユーザの追跡のための結託は行われない)。DAKは、所有者にではなくて、むしろプラットフォームに結び付けられているので、この関連付けは、ウォータフォール・イベント中継続する。従って一部のユーザは、第三者にPAKを発行してもらって日々の証明に利用するより、も自身のDAKを利用して自分のプラットフォームの正当性を証明するほうを好む。マルチパッケージのプラットフォームでは、各パッケージのDAKは、PAK(証明におけるプラットフォーム全体を表す)を構築するのに利用される。   A platform certification key (PAK) optionally provides an additional level of privacy. You can also associate certain uses of DAK. A single ISV can determine whether a given EPID reuses this service, especially if the ISV enclave has a name-based certification function. (But there is no collusion for tracking users between multiple ISVs). Since DAK is tied to the platform rather than to the owner, this association continues during the waterfall event. Therefore, some users prefer to use their DAKs to prove their platform validity rather than having a third party issue a PAK and use it for daily certification. In a multi-package platform, each package's DAK is used to build a PAK (representing the entire platform in the proof).

ユーザがアクセス可能なキーのキー導出は、NIST特殊公報800−108(擬似乱数関数を利用するキー導出について推奨されている)に準拠する。キー導出関数の構成においては、擬似乱数関数(PRF)が必要である。PRFは、NIST SP800−38Bに定義されているAES−CMACアルゴリズム、処理のブロック暗号モードについて推奨−認証のためのCMACモード、2005年5月(http://csrc.nist.gov/publications/nistpubs/800-108/sp800-108.pdf)に基づく。一般的なキー導出は、DerivativeKey=PRFParentKey(DerivativeString)である。 The key derivation of keys accessible by the user conforms to NIST Special Publication 800-108 (recommended for key derivation using a pseudo-random function). In the configuration of the key derivation function, a pseudo random function (PRF) is required. PRF recommends AES-CMAC algorithm defined in NIST SP800-38B, block cipher mode of processing-CMAC mode for authentication, May 2005 (http://csrc.nist.gov/publications/nistpubs /800-108/sp800-108.pdf). A general key derivation is DerivativeKey = PRF ParentKey (DerivativeString).

導出ストリング(derivative string)は、要求されている特定のキーに基づく8つの要素からなるサブセットからなる。表12−2は、導出の一部となりうる利用可能なエレメントをそれぞれ説明している。

Figure 2012530961
Figure 2012530961
Figure 2012530961
A derivation string consists of a subset of eight elements based on the specific key being requested. Table 12-2 describes each available element that can be part of the derivation.
Figure 2012530961
Figure 2012530961
Figure 2012530961

各キーは、予め定義された導出要素のセットを有しており、これは導出ストリングを含む。表12−3は、キー階層の各キーに含まれる要素を示している。各列はキーを表し、行は、そのキーに特定の要素が含まれているかを示す。デバッグストリングは、要求を発するエンクレーブのSECSが、デバッグモードにあることを示している場合に含められ、「要求」は、このエレメントが要求されておらず、キー導出のために要求において選択可能であることを示している。

Figure 2012530961
Each key has a predefined set of derived elements, which includes a derived string. Table 12-3 shows the elements included in each key of the key hierarchy. Each column represents a key, and a row indicates whether that key contains a particular element. The debug string is included if the SECS of the enclave issuing the request indicates that it is in debug mode, and “request” is not required for this element and can be selected in the request for key derivation. It shows that there is.
Figure 2012530961

セキュアなエンクレーブは、起動シーケンスの幾つかのポイントでソフトウェアのセキュリティ侵害を分離させ復帰させる技術をサポートしている。分離をサポートするために、エンクレーブに提供された全ての長期キーイング材料を、現在のTCBのセキュリティバージョンを利用して導出する。   Secure enclaves support technologies that isolate and recover software security breaches at several points in the boot sequence. In order to support separation, all long-term keying material provided to the enclave is derived utilizing the current TCB security version.

このセクションでは、復帰可能なTCBが、uCode、MCHECK、およびマイクロコード拡張(またはuVMM)からなるプラットフォームのアーキテクチャの一例について説明する。ハードウェア要件は、どのSEサポートプラットフォームについても同じであってよいが、具体的なキーフローは、特定のTCB要素に依存している。ここで利用されている技術に類似した技術を利用して他のプラットフォームをサポートすることもできる。リセット時のパッチ(Patch-at-Reset)をサポートするプラットフォームにおいては、このメカニズムは、リセット時のパッチを補い(compliment)、uCodeを完全復帰(uCode修正版におけるアップグレードおよび暗号化による分離の証拠を含む)させることができる。   This section describes an example of a platform architecture where the recoverable TCB consists of uCode, MCHECK, and microcode extension (or uVMM). The hardware requirements may be the same for any SE support platform, but the specific keyflow depends on the specific TCB element. Other platforms can be supported using techniques similar to those used here. On platforms that support patch-at-reset, this mechanism compliments the patch at reset and restores uCode fully (provides evidence of separation by upgrade and encryption in modified uCode). Can be included).

CPUベースの保護技術をサポートするためには、ハードウェアに以下のキーが必要である。これらキーはTCBキー階層の基盤となる。
<ステッピング固有の256ビットの論理キー>
256ビットの論理キーは、128ビットのヒューズ・ラップキー、および、128ビットのアウトオブボックス経験キー(out-of-box experience key)という2つの部分に分割される。しかし、uCodeを追加する単一の128ビットのキーを両方について利用することもできる。
<ダイ固有の544ビットのヒューズキー>
これらには、32ビットのグループid、256ビットのSafeIdA.x値、および256ビットのプレシードが含まれる。A.x値および256ビットのプレシードは、上述した128ビットのヒューズ・ラップキーで暗号化される。
<一次レジスタ>
キー導出プロセスでは、キーを格納して、パッケージ上に置き、uCodeのみに利用可能とさせる必要がある。プラットフォームのランタイム中は2つの128ビットレジスタが必要である。CMAが起動して動作するまでの間は、EPIDキーのために、さらなる256ビットの空間が必要である。この後は、該さらなる256ビットはCPUには不要となる。
<TCB SVNレジスタ>
このレジスタは、各TCB層にSVNを保持するよう分割された64ビットのロック可能レジスタである。分割の仕方はプラットフォーム設計者の裁量に任されているが、8個の8ビットのSVNに分割する、というのが妥当に思われる。このレジスタの各部分は、独立してロック可能である。
In order to support CPU-based protection technology, the hardware requires the following keys: These keys are the basis for the TCB key hierarchy.
<256-bit logical key unique to stepping>
The 256-bit logical key is divided into two parts: a 128-bit fuse wrap key and a 128-bit out-of-box experience key. However, a single 128-bit key that adds uCode can be used for both.
<Die-specific 544-bit fuse key>
These include a 32-bit group id, a 256-bit SafeIdA.x value, and a 256-bit preseed. The A.x value and the 256-bit pre-seed are encrypted with the 128-bit fuse wrap key described above.
<Primary register>
In the key derivation process, the key needs to be stored, placed on the package, and made available only to uCode. Two 128-bit registers are required during the platform runtime. Until the CMA is up and running, additional 256-bit space is required for the EPID key. After this, the additional 256 bits are not needed by the CPU.
<TCB SVN register>
This register is a 64-bit lockable register divided to hold SVN in each TCB layer. The way of splitting is at the discretion of the platform designer, but it seems reasonable to split it into eight 8-bit SVNs. Each part of this register can be locked independently.

キーを特定のTCBバージョンのセットに結合することは、ヒューズキーから第1セットのキーを、開始される機動シーケンスの種類(つまり、リセット時にパッチするのか、パッチは後で行うのか)に基づいてuCodeに導出させることにより行われる。このヒューズをロックした後、起動シーケンスの各装填において鎖状に導出(a chain of derivations)が行われる。   Combining keys into a specific set of TCB versions is based on the type of maneuver sequence that is initiated from the fuse key to the first set of keys (ie, whether to patch at reset or patch later) This is done by deriving to uCode. After locking this fuse, a chain of derivations is performed at each loading of the activation sequence.

低レベルのコードを装填した後で、鎖は、エンクレーブで実行されているソフトウェアの、ISVが割り当てられたセキュリティバージョン(ISV assigned security version)を含み続ける。特定の構成においては、現在のバージョンから導出したキー、および、前の構成からのキーにアクセスすることができる。これにより、新たな安定性のあるバージョンへユーザデータを途切れなく遷移させることができる。   After loading the low level code, the chain continues to contain the ISV assigned security version of the software running in the enclave. In certain configurations, keys derived from the current version and keys from previous configurations can be accessed. Thereby, user data can be transitioned to a new stable version without interruption.

ダイ固有のキーが生成されると、キー・ラップ・キーで暗号化される。これにより、ハードウェア監視ツールを利用してキーを抽出し、その部分に配置される前に通過するキーを保護することが益々難しくなる。   Once the die-specific key is generated, it is encrypted with the key wrap key. This makes it increasingly difficult to extract keys using a hardware monitoring tool and protect the passing keys before being placed in that part.

これらキーを暗号化するのに利用される暗号アルゴリズムは、10ラウンドの128ビットのAES−ECB復号である。キー生成サーバは、AES−ECB暗号化を各キーに行い、ヒューズで焼かれる暗号文キーを生成する。   The encryption algorithm used to encrypt these keys is 10 rounds of 128-bit AES-ECB decryption. The key generation server performs AES-ECB encryption on each key, and generates a ciphertext key to be burned with a fuse.

TCBキー階層におけるキー導出に利用される擬似乱数機能(PRF)は、プラットフォームに特有である。AES−NIをサポートするプラットフォーム用には、128ビットのAES−ECBが推奨される。目的は、他のキーからキーを導出するための不可逆的な方法を提供する、というものである。このセクションでは、以下の関数のプロトタイプを利用する。

Figure 2012530961
The pseudo-random function (PRF) used for key derivation in the TCB key hierarchy is platform specific. For platforms that support AES-NI, 128-bit AES-ECB is recommended. The goal is to provide an irreversible way to derive keys from other keys. This section uses the following function prototype:
Figure 2012530961

キー導出ではPRFに3つの方法がある。PRFループ導出は、異なるSVNのキー間の関係を構築しつつ、uCode SVNをキーに投入するのに利用される。具体的には、PRELoop(x-1)=PRFPRELoop(x)(const)である。 There are three PRF methods for key derivation. PRF loop derivation is used to populate the uCode SVN with keys while building the relationship between the keys of different SVNs. Specifically, PRELoop (x-1) = PRF PRELoop (x) (const).

これにより、データを前方マイグレーションさせる。uCode SVN3を実行する場合を例にとる。エンクレーブはEGETKEYを利用して、このバージョンに基づくシールキーを取得して(PRELoop(3))、これを利用してデータをシールする。フィールドuCodeパッチのアップグレードを配信し、次の起動uCode SVNは4である。アップグレードの後で、EGETKEY実装は、PRFLoop(4)にアクセス可能となる。エンクレーブが、EGETKEYにSVN3キーを送るよう要求する場合、PRELoop(3)=PRFPRELoop(4)(constant)を計算して、古いシールキーを取得することができる。 As a result, the data is migrated forward. Take the case of executing uCode SVN3 as an example. The enclave uses EGETKEY to obtain a seal key based on this version (PRELoop (3)), and uses this to seal the data. Deliver field uCode patch upgrade, the next boot uCode SVN is 4. After the upgrade, the EGETKEY implementation will be able to access PRFLoop (4). If the enclave requests EGETKEY to send the SVN3 key, it can calculate PRELoop (3) = PRF PRELoop (4) (constant) to obtain the old seal key.

この特性を構築するには、PRFのループを利用するが、特性PRFPRELoop(x-1)がPRFPRELoop(x)から計算されるので、SVNの最大値を構築して、ここから減算していく必要がある。特定の最大値は、パッチおよび要求される性能の尤度に基づいて各プラットフォームの種類に対して構築する必要がある。最大値の初期値としては32を推奨する。PRFループ導出は、以下のようになる。

Figure 2012530961
To build this characteristic, a PRF loop is used. Since the characteristic PRF PRELoop (x-1) is calculated from PRF PRELoop (x) , the maximum value of SVN is constructed and subtracted from this. We have to go. Specific maximum values need to be built for each platform type based on the patch and the likelihood of performance required. 32 is recommended as the initial maximum value. The PRF loop derivation is as follows.
Figure 2012530961

この方法は、uCodeのSVNをSVNキーに投入するために利用され、SEベースのキーの基礎となるキーである。ヒューズされるダイ固有キーは、288ビットのEPID値、および、256ビットのランダムキーを含む。全てのエフェメラルではない対称鍵は、これら256ビット(2個の128ビットキーからなる)から導出することができる。従って、単一のキーから複数のキーを導出するための技術の作成が可能である。こうするためには、ヒューズキーが復号されると、これを利用して異なる固定定数を利用してPRFを呼び出すことができる。鍵を分割すると、一般的には以下のような形になる。   This method is used to populate uCode SVN into the SVN key and is the basis of the SE-based key. The die unique key to be fused includes a 288-bit EPID value and a 256-bit random key. All non-ephemeral symmetric keys can be derived from these 256 bits (consisting of two 128-bit keys). Therefore, it is possible to create a technique for deriving a plurality of keys from a single key. To do this, once the fuse key is decrypted, it can be used to call the PRF using a different fixed constant. When a key is divided, it generally takes the following form.

Figure 2012530961
Figure 2012530961

この技術は、EPID IDおよびプロビジョンIDの一部として利用される乱数を生成するのに利用される。   This technique is used to generate random numbers that are used as part of the EPID ID and Provision ID.

SVNキーがuCode SVNに基づいてループ導出されると、SE CMA等の、離れた保護メモリ内に格納することができる。拡張マイクロコードは、SVNキーからキーを導出するためだけに、拡張マイクロコードに曝されるMSRを利用する。MSRは、導出の基礎が、グローバルなアウトオブボックスのキーなのか、ヒューズキーなのか、および、各TCB層について要求されているSVNセットを示すキー選択器を利用する。これにより、要求が現在の値以下であることを確かめることができる。UCodeは、任意の必要なPREを利用して、古いSVNキー、PRF,および要求されているTCB SVNを取得することができる。

Figure 2012530961
Once the SVN key is derived from the loop based on uCode SVN, it can be stored in a separate protected memory, such as SE CMA. Extended microcode uses the MSR exposed to the extended microcode only to derive the key from the SVN key. The MSR utilizes a key selector that indicates whether the basis of the derivation is a global out-of-box key or a fuse key, and the SVN set required for each TCB layer. This makes it possible to confirm that the request is below the current value. The UCode can use any necessary PRE to obtain the old SVN key, PRF, and the requested TCB SVN.
Figure 2012530961

適切なSVNキーが利用可能になると、要求されているTCB SVNのCMACのキーとして利用される。拡張マイクロコードは、これをCMACキーとして、Opsキー、またはプロビジョンベースキーの固定ストリングについてSEOpsシード(Intelが知らないヒューズキーの部分から導出した値)に対して利用する。つまり、se_base_key=CMAC(svn_base_key,se_ops_seed)である。   When the appropriate SVN key is available, it is used as the CMAC key for the requested TCB SVN. The extended microcode uses this as a CMAC key for an Ops key, or a fixed string of provision base keys, for a SEOps seed (a value derived from the part of the fuse key that Intel does not know). That is, se_base_key = CMAC (svn_base_key, se_ops_seed).

図18は、本発明の一実施形態における、マイクロコードベースのセキュアなエンクレーブキー階層の一例を示す。リセットマイクロコード1800階層では、グローバル・ラップ論理キー1801およびインテルが知っている固有のルートヒューズ1802を、ラップ解除1806機能への入力として利用する。ラップ解除1806およびマイクロコードSVN1805の出力がPRFループ1808に入力される。マイクロコードSVN1805およびグローバルルート論理キー1803は別のPRFループ1809に入る。PRFループ1808の出力は、SVNキー1810レジスタに格納される。PRFループ1809の出力は、グローバルキーレジスタ1812に格納される。マイクロコードSVN1805は、TCB SVNレジスタ1814に格納される。グローバルラップ論理キー1801およびSE EPID A.xヒューズ1893は、ラップ解除1807関数に入力され、結果をSE EPID1816レジスタに格納する。MCheck1820階層においては、MCheckSVN1821およびTCB SVNレジスタ1814の出力が、TCB SVNレジスタ1826に格納される。SVNキーレジスタ1810は、マイクロコードSVNレジスタ1822に格納される。グローバルキーレジスタ1812は、グローバルキーレジスタ1824に格納される。SE EPID1816は、SE EPID1828に格納される。装填マイクロコード1830階層では、マイクロコードSVN1831およびTCB SVNレジスタ1826の出力を、TCB SVNレジスタ1846に格納する。マイクロコードSVNレジスタ1822は、マイクロコードSVNレジスタ1832に格納される。グローバルキーレジスタ1824は、グローバルキーレジスタ1834に格納される。SE EPID1828は、SE EPID1838に格納される。XuMSR導出キー1840階層では、マイクロコードSVN差異1841がPRFループ1842およびPRFループ1844に入る。マイクロコードSVN1832レジスタがデータをPRFループ1842に送り、グローバルキーレジスタ1834がデータをPRFループ1844に送る。PRFループ1842の出力およびTCB SVNレジスタ1836の出力が、PRFループ1846に入り、PRFループ1844の出力およびTCB SVNレジスタ1836の出力が、PRFループ1848に入る。PRFループ1846の出力は、SVNベースキー1850に格納され、PRFループ1848の出力はグローバルキー1852に格納される。マイクロコード1860階層では、Intelが知らない固有のルートヒューズ1894をシード1 1856に格納して、EPIDグループIDヒューズがEPIDグループ1858に格納される。シード1 1856は、PREループ1886およびPRE1888に入る。PREループ1888の出力は、SE EPIDシード1 1892である。PRFループ1886の出力はSE opsシード1890である。SE opsシード1890は、SVNベースキー1850から得られ、要求されたSVN1864は、CMAC1868関数に入り、SE opsキー1872を生成する。現在のSVN1862は、SVNベースキー1850から得られ、CMAC1866関数に入り、SEプロビジョンキー1870を生成する。SVNベースキーが{0、0、0}1874に等しい場合、SVNベースキー1850は、シード0 1876に格納される。シード0 1876は、PRFループ1878およびPRFループ1880に入る。PRFループ1878の出力は、SE EPID ID1882であり、PRFループ1880の出力は、SE EPIDシード0 1884である。   FIG. 18 shows an example of a microcode-based secure enclave key hierarchy in one embodiment of the present invention. In the reset microcode 1800 hierarchy, the global wrap logic key 1801 and the unique root fuse 1802 known to Intel are utilized as inputs to the unwrap 1806 function. The outputs of wrap release 1806 and microcode SVN 1805 are input to PRF loop 1808. Microcode SVN 1805 and global root logical key 1803 enter another PRF loop 1809. The output of the PRF loop 1808 is stored in the SVN key 1810 register. The output of the PRF loop 1809 is stored in the global key register 1812. Microcode SVN 1805 is stored in TCB SVN register 1814. Global wrap logic key 1801 and SE EPID A.x fuse 1893 are input to the unwrap 1807 function and store the result in the SE EPID 1816 register. In the MCcheck 1820 hierarchy, the outputs of the MCcheck SVN 1821 and the TCB SVN register 1814 are stored in the TCB SVN register 1826. The SVN key register 1810 is stored in the microcode SVN register 1822. The global key register 1812 is stored in the global key register 1824. The SE EPID 1816 is stored in the SE EPID 1828. In the loaded microcode 1830 hierarchy, the outputs of the microcode SVN 1831 and the TCB SVN register 1826 are stored in the TCB SVN register 1846. The microcode SVN register 1822 is stored in the microcode SVN register 1832. The global key register 1824 is stored in the global key register 1834. The SE EPID 1828 is stored in the SE EPID 1838. In the XuMSR derived key 1840 hierarchy, the microcode SVN difference 1841 enters the PRF loop 1842 and the PRF loop 1844. Microcode SVN 1832 register sends data to PRF loop 1842 and global key register 1834 sends data to PRF loop 1844. The output of PRF loop 1842 and the output of TCB SVN register 1836 enter PRF loop 1846, and the output of PRF loop 1844 and the output of TCB SVN register 1836 enter PRF loop 1848. The output of PRF loop 1846 is stored in SVN base key 1850 and the output of PRF loop 1848 is stored in global key 1852. In the microcode 1860 hierarchy, a unique root fuse 1894 that Intel does not know is stored in seed 1 1856 and an EPID group ID fuse is stored in EPID group 1858. Seed 1 1856 enters PRE loop 1886 and PRE 1888. The output of PRE loop 1888 is SE EPID seed 1 1892. The output of PRF loop 1886 is a SE ops seed 1890. The SE ops seed 1890 is obtained from the SVN base key 1850, and the requested SVN 1864 enters the CMAC 1868 function to generate the SE ops key 1872. The current SVN 1862 is obtained from the SVN base key 1850 and enters the CMAC 1866 function to generate the SE provision key 1870. If the SVN base key is equal to {0, 0, 0} 1874, the SVN base key 1850 is stored in seed 0 1876. Seed 0 1876 enters PRF loop 1878 and PRF loop 1880. The output of PRF loop 1878 is SE EPID ID 1882 and the output of PRF loop 1880 is SE EPID seed 0 1884.

全てのコアが同期して、ドアベルまたは類似したメカニズムを利用して、全てがMCHECKに入るようにする。全てのコアがMCHECKを実行中になると、(1)uCodeが、ヒューズの読み取り、復号、およびロックを行う、(2)uCodeがPRFループをSVNキーに、PRFループをOOBEキーに利用して、uCodeのSVNを両キーに投入する。uCodeは、そのSVNをTCB SVNレジスタに書き込み、その部分をロックする、(3)MCHECKローダまたは早期MCKECKコードが、MCHECKのSVNをTCB SVNレジスタに書き込み、ロックする、(4)マイクロコード拡張パッチ・ローダが、マイクロコード拡張パッチSVNをTCB SVNレジスタに書き込み、ロックする、という各ステップがBSPから行われる。APは、キーフローに参加しない。   All cores are synchronized and utilize a doorbell or similar mechanism to ensure that everything enters the MCHECK. When all cores are executing MCHECK, (1) uCode reads, decodes, and locks the fuse. (2) uCode uses the PRF loop as the SVN key and the PRF loop as the OOBE key. Insert uCode SVN into both keys. uCode writes its SVN into the TCB SVN register and locks that part, (3) MCHECK loader or early MCHECK code writes and locks MCHECK's SVN into TCB SVN register, (4) Microcode extension patch Each step from the BSP is that the loader writes and locks the microcode extension patch SVN into the TCB SVN register. APs do not participate in keyflows.

拡張されたマイクロコード初期化中、またはEGETKEYの呼び出し時に、拡張マイクロコードは、要求を満たすのに必要となるSEベースキーを計算する。ベースキーは、さらに性能向上のために利用するために、CMA内にキャッシュされてよい。表12−4は、ベースキーの計算方法を示す。

Figure 2012530961
During extended microcode initialization or when calling EGETKEY, extended microcode calculates the SE base key needed to satisfy the request. The base key may be cached in the CMA for use for further performance improvement. Table 12-4 shows the calculation method of the base key.
Figure 2012530961

プラットフォームのウォータフォールでユーザのプライバシーおよびデータを保護するために、256ビットのランダム所有者エポックをキー導出に含める。この値は、所有者変更中にランダムに作成される。エンクレーブキーを利用する前に、ソフトウェアは、所有者エポックをSE_EPOCH_MSRに書き込んでよい。これはBIOSがフラッシュに永久書き込みを行うことにより実行されてよい。一部のユーザ入力(ユーザ起動パスワードのハッシュ等)からこれを計算することもできる。または、エンクレーブの利用を許可する前に、セキュアなエンクレーブドライバにより提供されてもよい。   To protect user privacy and data in platform waterfall, a 256-bit random owner epoch is included in the key derivation. This value is randomly created during owner change. Prior to utilizing the enclave key, the software may write the owner epoch to the SE_EPOCH_MSR. This may be done by the BIOS performing a permanent write to the flash. This can also be calculated from some user input (such as a hash of the user activation password). Alternatively, it may be provided by a secure enclave driver before allowing the use of the enclave.

この値の機密性は、プラットフォームにより暗号化されるデータが、ウォータフォールの後でラップトップの所有者により最初に認可されているエンクレーブでは復号できないことを保証する必要がある。この値のセキュリティ侵害は、エンクレーブデータのセキュリティ侵害につながらない。   The confidentiality of this value needs to ensure that data encrypted by the platform cannot be decrypted by an enclave that is first authorized by the laptop owner after the waterfall. A security breach of this value does not lead to a security breach of enclave data.

SEキー情報構造は、メモリまたはパッケージの保護された領域に格納されている非永久構造である。CMAが最もよく利用される位置であるが、オンダイで保護されたストレージのいずれかを利用することも可能である。電源投入中には、SEキー情報を初期化することができる。キーIDは乱数値に設定され、キーカウントは0に設定される。エンクレーブキー、許可書キー、およびレポートキーが利用されるごとに、キーIDが読み出され(the KeyID read)、キーカウントを増分する。2^32個のキーが利用された後で、キーIDが新たな乱数の値に変更され、キーカウントが0にリセットされる。SEキー情報配置を5に示す。

Figure 2012530961
The SE key information structure is a non-permanent structure stored in a protected area of memory or package. While CMA is the most commonly used location, it is possible to use any of the on-die protected storage. SE key information can be initialized during power-on. The key ID is set to a random value, and the key count is set to 0. Each time the enclave key, permit key, and report key are used, the key ID is read (the KeyID read) and the key count is incremented. After 2 ^ 32 keys are used, the key ID is changed to a new random value and the key count is reset to zero. The SE key information arrangement is shown in FIG.
Figure 2012530961

電源が投入されると、プラットフォームキーテーブルをuCodeにより初期化する。BIOSその他のホストファームウェアは、現在の所有者エポックを、永久ストレージから、または、ユーザから取得して、これをLoadOwnerEpochMSRに書き込む。この時点ではエンクレーブキー階層が利用可能である。   When the power is turned on, the platform key table is initialized by uCode. The BIOS or other host firmware obtains the current owner epoch from permanent storage or from the user and writes it to LoadOwnerEpochMSR. At this point, the enclave key hierarchy is available.

エンクレーブのアーキテクチャの多くは、エンクレーブデータの認証および機密性を提供するためにキーが利用され、プロセッサの複雑性を最小限にとどめるために、アーキテクチャエンクレーブを利用して、高レベルの利用のためにこれらキーを処理する。例えば、クオーティング・エンクレーブは、REPORTキーを利用して、EREPORT命令により生成されたREPORT構造がプラットフォーム上に作成されたことを確認して、PERMITINGエンクレーブは、PERMITキーを利用して、エンクレーブが起動されたときにEINITが消費するエンクレーブPERMITを生成する。   Many enclave architectures use keys to provide authentication and confidentiality of enclave data, and use architecture enclaves for high-level usage to minimize processor complexity. Process these keys. For example, the quota enclave uses the REPORT key to confirm that the REPORT structure generated by the ERPORT instruction has been created on the platform, and the PERMITTING enclave uses the PERMIT key to start the enclave. Generates an enclave PERMIT consumed by EINIT when done.

加えて、任意のアプリケーションレベルのエンクレーブが、エンクレーブ外のプラットフォーム上の格納されている秘密をシールするためにキーにアクセスする必要があり、アプリケーションエンクレーブが再度確立されたとき(電力サイクル中であっても)シールは解除される。   In addition, any application-level enclave needs to access the key to seal the stored secret on the off-enclave platform and when the application enclave is re-established (during power cycle Also) The seal is released.

こうするためのメカニズムはEGETKEY命令である。これは、現在のソフトウェア環境について秘密を構築するための単一のインタフェースである。
EGETKEYは現在、以下のキーにアクセスを提供している:(1)プロビジョンキーID(プロセッサについて一意に暗号化された(プロビジョンキーを利用して)データブロブを識別するために、アーキテクチャ・プロビジョン・エンクレーブが利用する)、(2)プロビジョンキー(プロセッサについて一意に暗号化されたデータブロブを復号するために、アーキテクチャ・プロビジョン・エンクレーブが利用する)、(3)プロビジョンシールキー(エンクレーブが、所有者が変わっても復号できるような形にEPIDを暗号化するために、アーキテクチャ・プロビジョン・エンクレーブが利用する)、(4)許可証キー(許可証を作成するためにアーキテクチャ許可証エンクレーブが利用する)、(5)レポートキー(レポート構造を検証するために、アーキテクチャ・クオーティング・エンクレーブが利用する)、(6)ISV認証キー(ISV AUTH KEY)(特定の対象アプリケーションエンクレーブのための認証データを作成するために、アーキテクチャ・クオーティング・エンクレーブが利用する)、(7)認証キー(AUTH KEY)(アーキテクチャ・クオーティング・エンクレーブが受け取ったデータを認証するために、アプリケーションエンクレーブが利用する)、(8)シールキー(エンクレーブ外に格納を希望するデータを暗号化するために、アプリケーションエンクレーブが利用する)、(9)OOB経験キー(アウトオブボックス経験利用のために(例えばBluRayプレーヤ)暗号化データを予めプロビジョンするために、ISVが利用する)。
The mechanism for doing this is the EGETKEY command. This is a single interface for building secrets about the current software environment.
EGETKEY currently provides access to the following keys: (1) Provision key ID (to identify the data blob that is uniquely encrypted (using the provision key) for the processor (2) Provision key (used by Architecture Provision Enclave to decrypt data blob uniquely encrypted for the processor), (3) Provision seal key (Used by the architecture provision enclave to encrypt the EPID in such a way that the enclave can be decrypted even if the owner changes), (4) a permit key (an architecture to create a permit) (5) Report key (Report) (6) ISV AUTH key (ISV AUTH KEY) (to create authentication data for a specific target application enclave to verify the structure) (Used by the enclave), (7) Authentication key (AUTH KEY) (Used by the application enclave to authenticate the data received by the architecture / quoting / enclave), (8) Seal key (stored outside the enclave) (9) OOB experience key (for example, BluRay player) for pre-provisioning encrypted data for out-of-box experience utilization (eg, BluRay player) To use).

これら値の殆どは、未加工でプロセッサに常駐はせず、実際には、単一のヒューズキーの値からEGETKEYの要求に応じて導出される。これらキーのそれぞれが単一のキーではなく、可能性のあるセットからの単一のキーにあるときに要求に応じて導出される。配信された特定のキーは、複数のパラメータに依存しており、そのうち一部がユーザ選択可能であり、その他がシステムまたは特定の状態に基づいている。   Most of these values are raw and do not reside in the processor, but are actually derived from a single fuse key value in response to EGETKEY requirements. Derived on demand when each of these keys is not a single key but a single key from a possible set. The specific key delivered depends on a number of parameters, some of which are user selectable and others based on the system or specific conditions.

キーを選択するために、キー要求構造をEGETKEY命令への入力として利用する。キーを選択することに加えて、ユーザは、キー要求構造を利用して、キー生成中に利用を希望する、制御下にあるこれら変数を、呼び出し者に特定させる。以下の図面は、キー要求構造を示す。

Figure 2012530961
To select a key, the key request structure is used as an input to the EGETKEY instruction. In addition to selecting a key, the user uses a key request structure to cause the caller to identify those variables under control that he wishes to use during key generation. The following drawings show the key request structure.
Figure 2012530961

キー選択は、ユーザが必要とするキーを特定するのに利用され、キーポリシーは、キーを作成するのに利用されるさらなる値を確かめるのに利用される(それが、アーキテクチャエンクレーブの特定のセキュリティバージョンであろうと、アーキテクチャエンクレーブの特定のセキュリティバージョンであろうと、アプリケーションエンクレーブの特定のバージョンであろうと、現在のエンクレーブに関連付けられた計測値レジスタであろうと(EGETKEYがENCLAVE内から呼び出されるとき))。   The key selection is used to identify the key that the user needs, and the key policy is used to verify the additional values used to create the key (which is the specific security of the architecture enclave. Whether it is a version, a specific security version of an architecture enclave, a specific version of an application enclave, or a measurement register associated with the current enclave (when EGETKEY is called from within ENCLAVE)) .

さらなるランダムネスがキー導出に利用することもでき、これは特に、キーの消耗を防止するために必要であり、PERMITINGおよびQUOTINGアーキテクチャエンクレーブにより利用される。また、シールキー(SEALing key)を作成するときにもアプリケーションエンクレーブにより利用される。ゼロにセットされたフィールドは、ランダムネスを追加しないことを意味しており、そうでない場合にはフィールドは、256ビットの整列したデータの値を指し示すことになる。以下の表は、キー選択フィールドの構造を特定する。

Figure 2012530961
Additional randomness can also be used for key derivation, which is particularly necessary to prevent key exhaustion and is used by the PERMITTING and QUATING architecture enclaves. It is also used by the application enclave when creating a seal key (SEALing key). A field set to zero means no randomness is added, otherwise the field will point to a 256-bit aligned data value. The following table specifies the structure of the key selection field.
Figure 2012530961

キーポリシーは、ビットフィールドセレクタであり、特定の値(ユーザまたはシステム状態いずれからのものであっても)が、キー導出に利用されるかを判断するのに利用される。

Figure 2012530961
The key policy is a bit field selector and is used to determine whether a particular value (whether from user or system state) is used for key derivation.
Figure 2012530961

<エンクレーブレジスタおよび制御>

Figure 2012530961
<Enclave register and control>
Figure 2012530961

2つのイネーブルレベルがエンクレーブに提供される。第1のイネーブルは、BIOSによるビットセットのoptである。これは一度の書き込み関数(write once function)である。次のリセットまでにエンクレーブ機能をイネーブルまたはディセーブルする。第2のイネーブルは、OSまたはVMMに提供されて、必要に応じてエンクレーブ機能をONまたはOFFに切り替える。   Two enable levels are provided to the enclave. The first enable is a bit set opt by the BIOS. This is a write once function. Enable or disable the enclave function before the next reset. The second enable is provided to the OS or VMM to switch the enclave function ON or OFF as needed.

図19は、本発明の一実施形態にみることができるエンクレーブCTL_MSRレジスタを示す。最下位ビットがイネーブル1900である。レジスタのビット1が1910でOnである。ビット2から63はリザーブされている。   FIG. 19 illustrates an enclave CTL_MSR register that can be found in one embodiment of the present invention. The least significant bit is enable 1900. Bit 1 of the register is 1910 and is On. Bits 2 to 63 are reserved.

エンクレーブ機能は、先ず、図19に示すエンクレーブCTL_MSRにイネーブルビットを設定することから始まる。このビットは、パッケージのリセットが行われるとディセーブルに初期設定される。このビットは、パッケージリセットの後に一度書き込むことができる。   The enclave function starts by setting an enable bit in the enclave CTL_MSR shown in FIG. This bit is initially disabled when the package is reset. This bit can be written once after package reset.

BIOSは、ビットをセットして、エンクレーブをイネーブルする。BIOSがビットをクリアすると、エンクレーブは、その部分がリセットされるまでイネーブルすることができない。   The BIOS sets the bit to enable the enclave. Once the BIOS clears the bit, the enclave cannot be enabled until that part is reset.

ソフトウェアは、CPUID命令を実行することで、エンクレーブのサポートを検知することができる。CPUIDは、エンクレーブがサポートされているか否かを示す結果を戻す。   Software can detect enclave support by executing a CPUID instruction. CPUID returns a result indicating whether enclaves are supported.

ビットのOptがクリアされると、CPUIDは、そのエンクレーブを実行しないことを報告する。   When the bit Opt is cleared, the CPUID reports that it does not execute the enclave.

システムソフトウェアは、図19に示すエンクレーブCTL_MSRを利用してエンクレーブ機能を制御する。Onビットは、ソフトウェアに、エンクレーブ機能に対するアクセスを動的に制御させる。   The system software controls the enclave function using the enclave CTL_MSR shown in FIG. The On bit allows software to dynamically control access to the enclave function.

ソフトウェアは、CPUID命令を実行することで、エンクレーブのサポートを検知することができる。エンクレーブCTL MSRにONビットがセットされている場合に、エンクレーブサポートが示される。   Software can detect enclave support by executing a CPUID instruction. Enclave support is indicated when the ON bit is set in the enclave CTL MSR.

TCSMSRレジスタは、TCSのアドレスを含む各プロセッサ上のレジスタであり、例外処理およびRDTCSPTRにより利用される。エンクレーブに入るときに装填される。レジスタは、EENTERを実行するときにTCSの値を装填され、ERDTCSPTRにより読み取られる。レジスタサイズは、プロセッサのモードに基づく。   The TCSMSR register is a register on each processor including the address of the TCS, and is used by exception handling and RDTCSPTR. Loaded when entering the enclave. The register is loaded with the value of TCS when executing EENTER and read by ERDTCSPTR. The register size is based on the processor mode.

各プロセッサ上にあるエンクレーブ・ベースアドレスレジスタは、実行中のエンクレーブの下位アドレスを含み、マイクロコードによりエンクレーブに入るときに装填される。レジスタサイズは、プロセッサのモードに基づく。このレジスタはソフトウェアからは見えず、一時的なマイクロコード(microcode temporary)である。   The enclave base address register on each processor contains the low address of the executing enclave and is loaded when the enclave is entered by microcode. The register size is based on the processor mode. This register is invisible to software and is a temporary microcode.

レジスタは、現在のエンクレーブのアドレスの上限を保持し、エンクレーブに入るときに装填される。レジスタは、エンクレーブが実行を開始するときに、SECSに格納されている値を装填される。これは、一時的なマイクロコードレジスタである。レジスタサイズは、プロセッサのモードに基づく。   The register holds the upper limit of the current enclave address and is loaded when entering the enclave. The register is loaded with the value stored in SECS when the enclave begins execution. This is a temporary microcode register. The register size is based on the processor mode.

エンクレーブページキャッシュ(EPC)最大サイズレジスタは、EPCの最大サイズを示す。このサイズは、4096バイトのページの数で与えられる。これは32ビットのレジスタである。このレジスタは、読み取り専用であり、現在の設計でEPCがサポートする最大サイズを示す。   The enclave page cache (EPC) maximum size register indicates the maximum size of the EPC. This size is given by the number of pages of 4096 bytes. This is a 32-bit register. This register is read-only and indicates the maximum size that EPC supports in the current design.

EPCサイズレジスタEPC_SIZE MSRは、EPCの現在定義されているサイズを示す。レジスタを装填することで、EPCがそのサイズに定義される。この値は、4096ビットのページで与えられる。例えば、4096ビットのページ1枚が1である。レジスタの値は、EPC_MAX値を超えることはできない。値がEPC_MAX値を超えると、WRMSR命令によりGP不良がとられる。このレジスタに書き込むことで、書き込み前に、EPCの全てのデータが無効化される。ソフトウェアは、このレジスタを更新する前に(必要であれば)全てのEPCエントリをセーブしてよい。   The EPC size register EPC_SIZE MSR indicates the currently defined size of the EPC. By loading a register, the EPC is defined to that size. This value is given in a 4096 bit page. For example, one 4096-bit page is one. The value of the register cannot exceed the EPC_MAX value. If the value exceeds the EPC_MAX value, a GP failure is taken by the WRMSR instruction. By writing to this register, all data of the EPC is invalidated before writing. The software may save all EPC entries (if necessary) before updating this register.

EPCベースレジスタは、EPCのベースの位置を示す。このレジスタに書き込むことで、書き込み前に、EPCの全てのデータが無効化される。ソフトウェアは、このレジスタを更新する前に(必要であれば)全てのEPCエントリをセーブしてよい。   The EPC base register indicates the position of the base of the EPC. By writing to this register, all data of the EPC is invalidated before writing. The software may save all EPC entries (if necessary) before updating this register.

概して、外部インタフェースは、エンクレーブのセキュリティを侵害しうる転送またはトランザクションを許可しない。セキュアなエンクレーブは、エンクレーブキーについてランダムな数を要求する。乱数生成器は、マイクロコードによりセキュアにアクセス可能である。パーツのコアに配置される必要はない。   In general, the external interface does not allow transfers or transactions that can compromise the security of the enclave. A secure enclave requires a random number for the enclave key. The random number generator is securely accessible by microcode. There is no need to place it in the core of the part.

図26は、本発明の一実施形態における、デジタル乱数生成器のためのプロセッサパッケージを示す。プロセッサパッケージ2600は、コア0 2640、コア1 2670という複数のコアを含みうる。コア0 2640は、外部命令マイクロコード2642、内部機能マイクロコード2644、内部機能マイクロコード2646、RNGマイクロコードモジュール2650、およびRNGキュー2654を含んでよい。コア1 2670は、外部命令マイクロコード2672、内部機能マイクロコード2674、内部機能マイクロコード2676、RNGマイクロコードモジュール2680、およびRNGキュー2684を含んでよい。読み取りランダム命令2630は、外部命令マイクロコード2642と通信してよく、読み取りランダム命令2635は、外部マイクロコード2672と通信してよい。プロセッサパッケージ2600は、さらに、DRNG2602を含んでよく、DRNG2602は、STD2608、OPE2610、PSK2612、およびTSC2614をとる。DRNG2602は、デジタルエントロピーソース2604を取得することができ、これはオンラインの自己テスト2606に接続する。オンラインの自己テスト2606の出力は、組み合わせられた調節器/決定論ランダムビット生成器(DRBG)2620の1つの入力であってよい。   FIG. 26 illustrates a processor package for a digital random number generator in one embodiment of the invention. The processor package 2600 can include a plurality of cores, core 0 2640 and core 1 2670. Core 0 2640 may include external instruction microcode 2642, internal function microcode 2644, internal function microcode 2646, RNG microcode module 2650, and RNG queue 2654. Core 1 2670 may include external instruction microcode 2672, internal function microcode 2675, internal function microcode 2676, RNG microcode module 2680, and RNG queue 2684. Read random instruction 2630 may communicate with external instruction microcode 2642 and read random instruction 2635 may communicate with external microcode 2672. The processor package 2600 may further include a DRNG 2602, which takes the STD 2608, the OPE 2610, the PSK 2612, and the TSC 2614. The DRNG 2602 can obtain a digital entropy source 2604 that connects to an online self test 2606. The output of the online self test 2606 may be one input of a combined regulator / deterministic random bit generator (DRBG) 2620.

エンクレーブは、作成時にデバッグエンクレーブとして設定されてよい。デバッグエンクレーブは、EDBGRDおよびEDBGWR命令を利用してエンクレーブの内容に外部アクセスすることができる。デバッグエンクレーブは、ECREATE内にデバッグエンクレーブを設定することによりセットアップされる。このビットはエンクレーブのECS内に格納される。   The enclave may be set as a debug enclave at the time of creation. The debug enclave can externally access the contents of the enclave using the EDGGRD and EDGWR instructions. The debug enclave is set up by setting the debug enclave in ECREATE. This bit is stored in the ECS of the enclave.

デバッグビットクレアで作成されるエンクレーブは、生成エンクレーブである。エンクレーブは、EPCは、エンクレーブがデバッグエンクレーブであると示すデバッグビットを含んでいる。エンクレーブは、メインメモリ内に、またはディスク上に、暗号化されたままで残っている。エンクレーブの内容を探す必要のあるデバッガは、メモリをEPCに装填する。EDBGRDおよびEDBGWR命令を利用して、EPCに常駐するエンクレーブメモリの位置にアクセスすることができる。デバッグエンクレーブは、実行するために許可証を必要とせず、有効な許可証なしに実行される。   The enclave created by the debug bitclaire is a generation enclave. The enclave includes a debug bit that indicates that the enclave is a debug enclave. The enclave remains encrypted in main memory or on disk. A debugger that needs to find the contents of the enclave loads the memory into the EPC. The EDBGRD and EDBGWR instructions can be used to access the location of the enclave memory resident in the EPC. The debug enclave does not require a permit to run and runs without a valid permit.

生成エンクレーブに入るときにデバッグ制御レジスタDR7は、TCSセーブ領域にセーブされる。DR7は図27に示されている。図27は、本発明の一実施形態では、デバッグレジスタDR7 2700である。レジスタDR7 2700は、L0 2702、L1 2706、L2 2710、L3 2714、G0 2704、G1 2708、G2 2712、およびG3 2716を含む。DR7 レジスタ2700の他のビットは、LE2718、GE2720、001 2722、GD2724、00 2726、R/W0 2728、LEN0 2730、R/W1 2732、LEN1 2734、R/W2 2736、LEN2 2738、R/W3 2740、およびLEN3 2742を含む。   When entering the generation enclave, the debug control register DR7 is saved in the TCS save area. DR7 is shown in FIG. FIG. 27 is a debug register DR7 2700 in one embodiment of the present invention. Register DR7 2700 includes L0 2702, L1 2706, L2 2710, L3 2714, G0 2704, G1 2708, G2 2712, and G3 2716. Other bits of the DR7 register 2700 are: LE2718, GE2720, 001 2722, GD2724, 00 2726, R / W0 2728, LEN0 2730, R / W1 2732, LEN1 2734, R / W2 2736, LEN2 2738, R / W3 2740, And LEN3 2742.

ビットL3−L0およびG3−G0は、0の値に設定されている。DR7は、エンクレーブの退出時に元の値に設定される。   Bits L3-L0 and G3-G0 are set to a value of zero. DR7 is set to the original value when leaving the enclave.

デバッグエンクレーブについては、デバッグレジスタの値を変更しない。RFLAGS.TFは、EENTER命令の開始時に設定され、以下の2つの場合を考慮に入れる必要がある。   For debug enclaves, the value of the debug register is not changed. RFLAGS. The TF is set at the start of the EENTER command and needs to take the following two cases into account.

1つの場合は、デバッガがレガシー(非SE認識)である、または、エンクレーブが生成(非デバッグ)モードにある場合である。   One case is when the debugger is legacy (non-SE aware) or the enclave is in generation (non-debug) mode.

SE認識デバッガは、デバッグモード・エンクレーブを対象としている。   The SE-aware debugger is intended for debug mode enclaves.

第1の場合には、#DB例外が、次のEEXIT命令の対象において生じうる。これにより、エンクレーブが、大きく、不透明な処理(large, opaque operation)として取り扱われる。第2の場合には、ユーザは、エンクレーブによる単一のステップへの完全な自由度を利用することができる(complete freedom to single step through the enclave)。この行為は、エンクレーブ内の3つのデータフィールド、および、EENTER、EEXIT、および、EIRETにおけるRFLAGS.TFの特殊処理によりサポートされる。

Figure 2012530961
Figure 2012530961
In the first case, a #DB exception can occur in the subject of the next EEXIT instruction. This treats the enclave as a large, opaque operation. In the second case, the user can take advantage of complete freedom to single step through the enclave. This action involves three data fields in the enclave, and RFLAGS.NET in EENTER, EEXIT, and EIRET. Supported by special processing of TF.
Figure 2012530961
Figure 2012530961

TCSセーブ領域にレジスタ値をセーブする。レジスタは0に設定される。エンクレーブの終了時には、レジスタは、エントリ値に復元される。エンクレーブが、開始時にイネーブルされた分岐トレース(branch trace)を有する場合、EENTERがエンクレーブに入る前の最終エントリとなる。エンクレーブの終了時に、終了後の始めの位置が分岐トレースに書き込まれる。   Save the register value in the TCS save area. The register is set to zero. At the end of the enclave, the register is restored to the entry value. If the enclave has a branch trace enabled at the start, it is the last entry before EENTER enters the enclave. At the end of the enclave, the first position after the end is written to the branch trace.

Int nおよびInt 3命令は、エンクレーブ内で実行されるときにGP不良として報告される。デバッガは、エンクレーブをデバッグするときにGP不良条件をフックすることができる。   Int n and Int 3 instructions are reported as GP failures when executed in an enclave. The debugger can hook the GP bad condition when debugging the enclave.

本文書では、AESブロック暗号のためにCMACモード処理を実施する新規な技術を記載する。CMACは、メッセージの真偽をサポートするモードであり、メッセージAおよびキーKを入力として受け付けて、認証タグTを戻す。認証タグの導出は、CBC(暗号ブロック鎖)アルゴリズムを利用して行われる。CMACは、長さ拡張攻撃に対する保護メカニズムを含むために、CBCよりも複雑である。これらを「CMACの3つの特性」と称する。以下では、CBCおよびCMACを概略する。   This document describes a novel technique for performing CMAC mode processing for AES block ciphers. CMAC is a mode that supports message authenticity, accepts message A and key K as input, and returns an authentication tag T. The authentication tag is derived using a CBC (encryption block chain) algorithm. CMAC is more complex than CBC because it includes a protection mechanism against length extension attacks. These are referred to as “three characteristics of CMAC”. In the following, CBC and CMAC are outlined.

図20は、本発明の一実施形態で利用される暗号ブロック鎖アルゴリズムを示す。初期化ベクトル2000およびステージ1入力2010は、排他的論理和ゲート2012に入る。排他的論理和ゲート2012の出力は、ステージ1ブロック暗号2015に入る。ステージ1ブロック暗号出力2018は次に、ステージ2排他的論理和ゲート2022に、ステージ2入力2020とともに入る。排他的論理和ゲート2022の出力は、ステージ2ブロック暗号2025に入る。ステージ2ブロック暗号出力2028は、暗号ブロック鎖の次の段階に入る(不図示)。   FIG. 20 shows a cryptographic block chain algorithm used in an embodiment of the present invention. Initialization vector 2000 and stage 1 input 2010 enter exclusive OR gate 2012. The output of the exclusive OR gate 2012 enters the stage 1 block cipher 2015. Stage 1 block cipher output 2018 then enters stage 2 exclusive OR gate 2022 with stage 2 input 2020. The output of the exclusive OR gate 2022 enters the stage 2 block cipher 2025. The stage 2 block cipher output 2028 enters the next stage of the cipher block chain (not shown).

CBCアルゴリズムは、ブロック暗号を利用して、一部のデータの機密性を確保する、または、このデータの認証タグを計算する。CBCアルゴリズムの基本をなす構想は、前の暗号からの出力が、暗号化前に次の入力ブロックでXORされる、というものである。このようにして、入力データに存在しうるパターンを、暗号文から排除することができる。また、ブロック暗号のトランザクションの間のXOR処理の組み合わせにより、理想的には許されない(forgeable)メッセージ認証タグを導出するために混合が大幅に行われる(strong mixing)。   The CBC algorithm uses block ciphers to ensure the confidentiality of some data or calculate an authentication tag for this data. The basic idea of the CBC algorithm is that the output from the previous cipher is XORed with the next input block before encryption. In this way, patterns that can exist in the input data can be excluded from the ciphertext. Also, the combination of XOR processing during block cipher transactions can result in strong mixing to derive ideally forgeable message authentication tags.

CBCアルゴリズムは、図20と以下に示される。暗号は、AESの場合同様に、128ビットの暗号と想定する。

Figure 2012530961
The CBC algorithm is shown in FIG. 20 and below. The cipher is assumed to be a 128-bit cipher as in the case of AES.
Figure 2012530961

CMACの仕様は、CBCアルゴリズムを初期化および終了させるために3つのさらなるアルゴリズムを含む。これらは、CMACの「3つの特徴」と称される。1つ目の特徴は、対称鍵Kから2つのサブキー値KおよびKを導出することに関する。サブキーKおよびKは、中間値Lから導出される。CMACは、対称鍵の値Kを利用して、ゼロからなるストリング(つまり0128)に、対称鍵値Kを利用して対称鍵ブロック暗号変換を行うことでLが得られる、と示している。この関係を、式(1)L=CIPHER(0128)で示す。 The CMAC specification includes three additional algorithms to initialize and terminate the CBC algorithm. These are referred to as “three features” of CMAC. The first feature relates to deriving two subkey values K 1 and K 2 from the symmetric key K. The subkeys K 1 and K 2 are derived from the intermediate value L. CMAC indicates that L can be obtained by performing symmetric key block cipher conversion using a symmetric key value K to a string of zeros (ie, 0 128 ) using a symmetric key value K. . This relationship is shown by the equation (1) L = CIPHER K (0 128 ).

Lが導出されると、Lの最上位ビットをチェックする。これがゼロであれば、Kを、左に1ビットシフトすることにより、Lから導出される。そうでない場合は、Lを左に1ビットシフトして、特殊な値RでXORして、Kを生成する。Rは、バイナリ形式の(012010000111)として定義される。Kも同じプロシージャでKから生成される。サブキーK、Kの導出は、以下の擬似符号に示されている。MSB()がある値の最上位ビットを示すこととする。

Figure 2012530961
When L is derived, the most significant bit of L is checked. If this is zero, the K 1, by 1 bit shift to the left is derived from L. Otherwise, the 1-bit shift to L to the left, and XOR with a special value R b, to produce a K 1. R b is defined as (0 120 10000111) in binary format. K 2 is also generated from K 1 in the same procedure. Derivation of the subkeys K 1 and K 2 is shown in the following pseudo code. MSB () indicates the most significant bit of a value.
Figure 2012530961

CMACの第2の特徴は、入力データにCBCアルゴリズムを利用する前に、パディングを行うことに関している。データの最後のブロックが完全なブロックではない場合にはそのブロックを、1に必要な数の0を付けたビットでパディングして、最終的なブロックが完全なものになるようにする。   The second feature of CMAC relates to padding before using the CBC algorithm for input data. If the last block of data is not a complete block, the block is padded with the necessary number of zeroed bits to make the final block complete.

CMACの第3の特徴は、長さ拡張攻撃を回避するために行われる最終ブロックに対する修正に関している。最終ブロックが完全に1ではない場合(パディング不要の場合)には、最終ブロックをサブキーKでXORする。そうでない場合には、サブキーKでXORする。CMACタグ生成および検証アルゴリズムを以下に示す。 A third feature of CMAC relates to modifications to the final block that are made to avoid length extension attacks. In the case the last block is not completely 1 (in the case of padding necessary), to XOR the last block with subkeys K 1. If this is not the case, the XOR in the subkey K 2. The CMAC tag generation and verification algorithm is shown below.

Figure 2012530961
Figure 2012530961

以下では、対称鍵ブロック暗号がAESとして利用され、プロセッサがAESラウンド加速(AES round acceleration)の命令セットをサポートしている場合の、CBC()アルゴリズムの実装方法例を示す。Intelアーキテクチャは、ウェストミア(Westmere)プロセッサ(2009)およびそれ以降の時間フレームにおいて4つの新たな命令をサポートする。これら命令は、AESENC(AESラウンド暗号)、AESENCLAST(AES最終ラウンド暗号)、AESDEC(AESラウンド復号)、AESDECLAST(AES最終ラウンド復号)である。これら命令の仕様を以下に示す。

Figure 2012530961
In the following, an example of how to implement the CBC () algorithm when a symmetric key block cipher is used as AES and the processor supports an AES round acceleration instruction set is shown. The Intel architecture supports four new instructions in the Westmere processor (2009) and subsequent time frames. These instructions are AESENC (AES round cipher), AESENCLAST (AES final round cipher), AESDEC (AES round decryption), and AESDECLAST (AES final round decryption). The specifications of these instructions are shown below.
Figure 2012530961

タグ検証プロセスがタグ生成と同じであることから、CMACモードを、AESラウンド命令を利用して実装するには、AESENC AESENCLASTのみの呼び出しで十分である。図21は、単一のAESブロックの暗号化と関連付けられたフローチャートである。図22は、CBCアルゴリズムを利用する多数のAESブロックの暗号化と関連付けられたフローチャートを示す。   Since the tag verification process is the same as tag generation, calling only AESENC AESENCLAST is sufficient to implement CMAC mode using AES round instructions. FIG. 21 is a flowchart associated with encryption of a single AES block. FIG. 22 shows a flowchart associated with encryption of multiple AES blocks utilizing the CBC algorithm.

キースケジュール変換を実装するためには、逆混合列(inverse mix columns)用のAESIMC命令とAESKEYGENASSIST命令とを利用することができる。AESKEYGENASSISTは、暗号化に利用されるラウンドキーを生成するために利用される。AESIMCは、暗号ラウンドキーを、均等な逆暗号化モデルに従って復号に利用可能な形式に変換するために利用される。AESIMCおよびAESKEYGENASSIST命令は、http://softwarecommunity.intel.com/articles/eng/3788.htmに記載されている。   To implement key schedule conversion, an AESIMC instruction and an AESKEYGENASSIST instruction for inverse mix columns can be used. AESKEYGENASSIST is used to generate a round key used for encryption. AESIMC is used to convert an encryption round key into a format that can be used for decryption according to an equivalent inverse encryption model. The AESIMC and AESKEYGENASSIST instructions are described at http://softwarecommunity.intel.com/articles/eng/3788.htm.

CMACは、128ビットの量のビッグエンディアン記述を利用して示される。CMACをリトルエンディアン・マシンを利用して正確に実装するには、16バイト幅の反映処理をソースコード実装のある時点で行う必要がある。この処理は、PSHUFB命令(1クロック・レイテンシー、スループット)の利用により迅速に行うことができる。以下に、バイトシャッフルが必要な時点を記述する。   The CMAC is indicated using a 128-bit quantity of big endian description. In order to accurately implement CMAC using a little endian machine, it is necessary to perform a 16-byte width reflection process at a certain point of implementation of the source code. This processing can be quickly performed by using a PSHUFB instruction (one clock latency, throughput). The following points describe when byte shuffling is necessary.

SUBKEYS()アルゴリズム実装バイト反映(byte reflection)は、AES暗号をゼロストリングに利用して導出された後であって、2つのサブキーが導出される前に、Lに対して行われる必要がある。バイト反映は、2つのサブキーに対して、Lから導出された後で必要である。SUBKEYS()実装は、以下のCで示される。

Figure 2012530961
Figure 2012530961
The SUBKEYS () algorithm implementation byte reflection needs to be performed on L after being derived using the AES cipher for the zero string and before the two subkeys are derived. Byte reflection is required after being derived from L for the two subkeys. The SUBKEYS () implementation is denoted by C below.
Figure 2012530961
Figure 2012530961

次に、最終ブロックが完全ではない場合に限って、最終ブロックに対するバイト反映をパディングの前後に行う必要がある。これらのステップは以下のCの実装例に示されている。

Figure 2012530961
Next, only when the final block is not complete, it is necessary to perform byte reflection on the final block before and after padding. These steps are illustrated in the C implementation example below.
Figure 2012530961

function_pshufb()が、128ビット幅のバイト反映を行う。   function_pshufb () performs byte reflection of 128-bit width.

<SMIのSE要件>
エンクレーブは、SMM空間内での実行を許可されていない。エンクレーブをSMMモードで実行しようとすると、命令のGP不良が生じる。SMIがエンクレーブ内で実行している間に生じると、プロセッサは、レジスタ状態を、遠隔のエンクレーブ内にセーブして、終了する。終了すると、TBD MSRビットを、エンクレーブの実行中にSMIが生じたことを示すように設定する。SMMコードは、エンクレームデータにアクセスできない。EPC領域に接触しようと試みると、実際のモードではジャンクデータを戻し、保護されたモードではEPCページ不良を戻すこととなる。
<SE requirements for SMI>
The enclave is not allowed to execute in the SMM space. Attempting to run the enclave in SMM mode results in a GP failure of the instruction. If SMI occurs while executing in the enclave, the processor saves the register state in the remote enclave and exits. When finished, the TBD MSR bit is set to indicate that an SMI occurred during enclave execution. The SMM code cannot access the claim data. Attempting to touch the EPC area will return junk data in the actual mode and return an EPC page failure in the protected mode.

一部の命令は実行が許可されない。どの命令が合法かを決定するためには幾つかの一般法則が利用される。
1.エンクレーブ内ではリングレベルの変更は許可されない。リングレベルの変更または変更の可能性の命令は禁止されている。
2.外部ソフトウェアは、エンクレーブ内のVMEXITSにサービス提供できない。エンクレーブ内でVMEXITを生成する、または生成する可能性のある全ての命令を禁ずる。
3.ソフトウェアは、エンクレーブ内で仮想マシンを生成することができない。全てのVMX命令を禁ずる。
4.エンクレーブの内部でI/O参照を実行する命令を禁ずる。
Some instructions are not allowed to execute. Several general rules are used to determine which instructions are legal.
1. Ring level changes are not allowed within the enclave. Ordering ring level changes or possible changes is prohibited.
2. External software cannot service VMEXITS in the enclave. Forbid all instructions that create or may generate VMEXIT in the enclave.
3. The software cannot create a virtual machine within the enclave. Forbid all VMX instructions.
4). Instructions that perform I / O references inside the enclave are prohibited.

エンクレーブの第一世代では、プロセッサは、エンクレーブに入るときに、IOPLセットを0として、リング3で実行されてよい。エンクレーブを仮想化または非仮想化環境で実行する際に、プログラミング環境を保存するためには、表18−1にリストされている命令が合法である。

Figure 2012530961
In the first generation of enclaves, the processor may run on ring 3 with the IOPL set at 0 when entering the enclave. The instructions listed in Table 18-1 are legal for preserving the programming environment when running the enclave in a virtualized or non-virtualized environment.
Figure 2012530961

エンクレーブ内の状態には制約が課されている。エンクレーブに入るとき、GDTR.limit、LDTR.limit, IA32_EFER.SCE、および、IA32_SYSENTER_CSをTCS領域にセーブする。ローカルの値がクリアされる。これらレジスタへアクセスする、またはアクセスを生じさせる命令は、エンクレーブ内で失敗する。GDTR.limit、LDTR.limit, IA32_EFER.SCE、および、IA32_SYSENTER_CSは、エンクレーブを抜けるときに復元される。

Figure 2012530961
Restrictions are imposed on the state in the enclave. When entering the enclave, save GDTR.limit, LDTR.limit, IA32_EFER.SCE, and IA32_SYSENTER_CS in the TCS area. The local value is cleared. Instructions that access or cause access to these registers will fail in the enclave. GDTR.limit, LDTR.limit, IA32_EFER.SCE, and IA32_SYSENTER_CS are restored when exiting the enclave.
Figure 2012530961

エンクレーブの寿命は、独立した(distinct phases)に分類できる。第1の段階は、エンクレーブ生成である。第2の段階は、エンクレーブ利用である。最終の段階は、エンクレーブ破壊である。   The life of an enclave can be classified as distinct phases. The first stage is enclave formation. The second stage is enclave utilization. The final stage is enclave destruction.

エンクレーブの生成および利用には、OS/VMMのサポートが必要となる。エンクレーブはOS/VMMにセキュリティ面で依存しないが、一定のハードウェアデータ構造を適切に維持するためにはOS/VMMが必要となる。OS/VMMがこれら構造の維持に失敗すると、セキュリティは損なわれないが、エンクレーブ全体が不良となる場合がある。   Enclave generation and use requires OS / VMM support. The enclave does not depend on the OS / VMM in terms of security, but the OS / VMM is required to properly maintain a certain hardware data structure. If the OS / VMM fails to maintain these structures, the security is not compromised, but the entire enclave may fail.

幾つかの命令は、エンクレーブの証明、秘密データのシールおよびシール解除、および、認証されたエンクレーブの許可をサポートする。   Some instructions support enclave verification, confidential data sealing and unsealing, and authorized enclave authorization.

第1の段階では、エンクレーブは、アプリケーションによる利用に備えて、セキュアに構築され、内部ソフトウェア環境が設定されていてよい。3つの命令を利用してエンクレーブを生成する。第1の命令ECREATEは、最初の状態環境を設定する。この命令は、エンクレーブキーを生成し、装填し、暗号化を行い、エンクレーブデータ構造の格納に利用される2ページの整合性チェックを行う。第2の命令EADDPREは、エンクレーブに1ページのデータを追加する。詳しくは、エンクレーブ内のコード、スタック、およびヒープに必要なページを追加する。第3の命令EINITは、公知の状態に内部ソフトウェア環境を設定する。この命令の完了時には、エンクレーブは第2の段階である「利用」に移動している。   In the first stage, the enclave may be securely constructed and an internal software environment set up for use by applications. An enclave is generated using three instructions. The first instruction ECREATE sets the initial state environment. This instruction generates, loads, encrypts the enclave key, and performs a two-page consistency check that is used to store the enclave data structure. The second instruction EADDPRE adds one page of data to the enclave. For more information, add the necessary pages for the code, stack, and heap in the enclave. The third instruction EINIT sets the internal software environment to a known state. Upon completion of this command, the enclave has moved to the second stage, “use”.

EINITを実行する前に、構築ソフトウェアは許可証を、EMKPERMITを実行することにより、または、許可エンクレーブを利用することにより取得していてよい。   Prior to running EINIT, the building software may have obtained a license by running EMKPERMIT or by using an authorization enclave.

エンクレーブは、EENTER命令により入力される。この命令により、マシンがエンクレーブモードへと遷移する。そして、予め定義されたエントリポイントへ制御を渡す。EEXIT命令は、エンクレーブから外部アプリケーションに戻る。EIRRET命令は、割り込みの終了からエンクレーブに戻る。   The enclave is input by an EENTER command. This command causes the machine to enter enclave mode. Then, control is transferred to a predefined entry point. The EEXIT instruction returns from the enclave to the external application. The EIRRET instruction returns to the enclave from the end of the interrupt.

EENTERまたはEIRETを介してエンクレーブに入る際には、以下の処理を命令により実行する。すなわち、処理は、GDTR.limitのセーブおよびクリア、LDTR.limit、IA32_EFER.SCE、IA32_SYSENTER_CSである。抜けるときに、GDTR、LDTR、IA32_EFER、および、IA32_SYSENTER_CSを復元する(On exit restore GDTR, LDTR, IA32_EFER, and IA32_SYSENTER_CS)。   When entering the enclave via EENTER or EIRET, the following processing is executed according to instructions. That is, the processes are saving and clearing GDTR.limit, LDTR.limit, IA32_EFER.SCE, and IA32_SYSENTER_CS. When exiting, restore GDTR, LDTR, IA32_EFER, and IA32_SYSENTER_CS (On exit restore GDTR, LDTR, IA32_EFER, and IA32_SYSENTER_CS).

エンクレーブの破壊には命令は存在しない。   There is no command to destroy the enclave.

EDBG_READ命令は、デバッグエンクレーブ内のある位置の8バイトの読み取りを行う。非デバッグエンクレーブにはアクセスが許可されていない。EDBG_WRITE命令は、デバッグエンクレーブ内のある位置への8バイトの書き込みを行う。非デバッグエンクレーブにはアクセスが許可されていない。   The EDBG_READ instruction reads 8 bytes at a certain position in the debug enclave. Access is not allowed for non-debug enclaves. The EDBG_WRITE instruction writes 8 bytes to a certain location in the debug enclave. Access is not allowed for non-debug enclaves.

エンクレーブページキャッシュ(EPC)は、2つの命令を解して管理される。2つの命令は、EPCページ(ELPGおよびEWBINVPG)を装填/格納する。   The enclave page cache (EPC) is managed through two instructions. Two instructions load / store EPC pages (ELPG and EWBINVPG).

EREPORTは、エンクレーブ計測値を保持する暗号的に保護された構造を生成する。EGETKEYは、様々な種類のエンクレーブ固有キーを取得する手段を提供する。EMKPERMITは、認証されたエンクレーブに対する許可証を生成するために利用される。

Figure 2012530961
:「内部」には利用可能なモデルがないが、内部からEMKPERMITに実行を許可することにまつわる被害は知られていない。
:将来のバージョンでは、リング0からもエンクレーブへのエントリが可能となるかもしれない。 EEPPORT generates a cryptographically protected structure that holds enclave measurements. EGETKEY provides a means to obtain various types of enclave specific keys. EMKPERMIT is used to generate a license for an authenticated enclave.
Figure 2012530961
Note 2 : Although there is no model available for “internal”, there is no known damage related to permitting execution from the inside to EMKPERMIT.
Note 3 : In future versions, it may be possible to enter the enclave from Ring 0 as well.

割り込みが生じると、プロセッサ状態をエンクレーブ内にセーブして(隠して)、状態をクリアする。さらに、割り込みの戻りアドレスを隠してもよい。   When an interrupt occurs, the processor state is saved (hidden) in the enclave and the state is cleared. Further, the return address of the interrupt may be hidden.

エンクレーブの実行中に生じる割り込みは、オペレーティングシステムが予期するような形態の割り込みスタックに情報をプッシュして、OSコードを変更する必要がないようにする。これを遂行するために、トランポリンコードへのポインタを、割り込みスタックへとRIPとしてプッシュする。このトランポリンコードは、ゆくゆくは、特殊パラメータ(q.v.)を有するEENTER命令によりエンクレーブへ戻る。   Interrupts that occur during enclave execution push information to the form of an interrupt stack as expected by the operating system so that there is no need to change the OS code. To accomplish this, a pointer to the trampoline code is pushed as a RIP onto the interrupt stack. This trampoline code eventually returns to the enclave with an EENTER command having a special parameter (q.v.).

利用される割り込みスタックは、非SEモードで利用されたものと同じ規則により選択される。つまり規則とは、(1)特権付きレベル変更がある場合には、割り込みスタックは、新たなリングに関連付けられたものである、(2)特権付きレベル変更がない場合には、現在のアントラステッド・スタック(Untrusted Stack)を利用する、(3)IA−32e ISTメカニズムを利用する場合には、この方法を利用して割り込みスタックを選択する。   The interrupt stack used is selected according to the same rules used in non-SE mode. Thus, the rules are: (1) if there is a privileged level change, the interrupt stack is associated with the new ring; (2) if there is no privileged level change, the current untrusted -When using the stack (Untrusted Stack), (3) When using the IA-32e IST mechanism, the interrupt stack is selected using this method.

図23は、スタックスイッチで割り込んだ後のアプリケーションおよび割り込みスタックの一実施形態を示す。現在のセーブ状態領域フレーム2300は、RSPレジスタ2305を含む。スレッド制御構造2310は、状態セーブ領域2312および割り込み戻りルーチン2314のカウントを含みうる。割り込みスタック2330は、SSレジスタ2332、RSPレジスタ2334、フラグレジスタ2336、CSレジスタ2338、命令レジスタ2340、およびエラーコード2342を含む。割り込みスタック2330は、RSPレジスタ2334内のデータを、アプリケーションスタック2320およびセーブ状態領域2300のカウントに送ってよい。エラーコード2342は、プッシュ2346後に、RSPから来てよい。割り込みルーティングルーチン2314および命令レジスタ2340は、uRTS2344のスレッドごとのトランポリンを送出する。   FIG. 23 illustrates one embodiment of the application and interrupt stack after interrupting with a stack switch. The current save state area frame 2300 includes an RSP register 2305. Thread control structure 2310 may include a count of state save area 2312 and interrupt return routine 2314. The interrupt stack 2330 includes an SS register 2332, an RSP register 2334, a flag register 2336, a CS register 2338, an instruction register 2340, and an error code 2342. The interrupt stack 2330 may send the data in the RSP register 2334 to the application stack 2320 and the save state area 2300 count. Error code 2342 may come from RSP after push 2346. The interrupt routing routine 2314 and the instruction register 2340 send a trampoline for each uRTS 2344 thread.

いずれの場合にも、割り込みスタックおよびそれにプッシュされた情報の選択は、非SE処理と矛盾しない。図23は、スタックスイッチで割り込んだ後の、アプリケーションおよび割り込みスタックを示す。スタックスイッチのない割り込みは、アプリケーションスタックを利用する。加えて、TCSポインタは、後ほどEENTER命令が、割り込み後にエンクレーブを再開するときに利用するので、RBXに配置される。   In either case, the selection of the interrupt stack and the information pushed to it is consistent with non-SE processing. FIG. 23 shows the application and interrupt stack after being interrupted by the stack switch. Interrupts without a stack switch use the application stack. In addition, the TCS pointer is placed in the RBX because it is used later when the EENTER instruction resumes enclave after an interrupt.

TCS::IRR(割り込み戻りルーチン)は、後に特別なスレッドに戻る、スレッドごとのコードシーケンスを指し示している。このポインタは、戻りRIPとして割り込みスタックにプッシュされる。これによりデータ構造のセットが、IRETを、割り込み戻りコード(特別なEENTER命令を含む)が実行されるアプリケーションに戻す。EENTERは、割り込み時に初期化されるRBXレジスタをとり、これをTCSとして利用して、エンクレーブに再度入る。   TCS :: IRR (Interrupt Return Routine) points to a code sequence for each thread that later returns to a special thread. This pointer is pushed onto the interrupt stack as a return RIP. This causes the set of data structures to return the IRET to the application where the interrupt return code (including the special EENTER command) is executed. EENTER takes an RBX register that is initialized at the time of interruption, uses this as a TCS, and reenters the enclave.

CF(キャリー・フラグ)、SF(サイン・フラグ)、PF(パリティ・フラグ)、OF(オーバフロー・フラグ)、AS(調節フラグ)、DF(方向フラグ)、ZF(ゼロ・フラグ)というRFLAGSのビットは、レジスタを割り込みスタックにプッシュする前にクリアされる。   RFLAGS bits such as CF (carry flag), SF (sign flag), PF (parity flag), OF (overflow flag), AS (adjustment flag), DF (direction flag), ZF (zero flag) Is cleared before pushing the register onto the interrupt stack.

図24は、本発明の一実施形態の複数の状態セーブ領域スロットのスタックを実装することのできる方法を示す。スレッド制御構造2400は、次の状態セーブ領域スロット2402、現在の状態セーブ領域スロット2404、および、状態セーブ領域スロット2406を含んでよい。状態セーブ領域0 2410、状態セーブ領域12412、および状態セーブ領域N 2418は、状態セーブ領域内の3つの別個の選択位置である。次の状態セーブ領域スロット2402は、状態セーブ領域で利用される位置を特定する(状態セーブ領域0 2410)。現在の状態セーブ領域スロット2404は、状態セーブ領域で利用される位置を特定する(状態セーブ領域1 2412)。状態セーブ領域スロット2406は、状態セーブ領域で利用される位置を特定する(状態セーブ領域N 2418)。   FIG. 24 illustrates how a stack of multiple state save area slots can be implemented in one embodiment of the present invention. The thread control structure 2400 may include a next state save area slot 2402, a current state save area slot 2404, and a state save area slot 2406. State save area 0 2410, state save area 12412, and state save area N 2418 are three separate selected locations within the state save area. The next state save area slot 2402 identifies the location used in the state save area (state save area 0 2410). The current state save area slot 2404 identifies the location used in the state save area (state save area 1 2412). The state save area slot 2406 specifies a position used in the state save area (state save area N 2418).

状態セーブ領域は、割り込み時点のエンクレーブ状態を保持する。割り込みは、次のエンクレーブに再度入る可能性のあるユーザモードに送られうるので、SSAは、図19−3に示すような複数のSSAスロットからなるスタックである。利用される状態セーブ領域の位置は、TCSの3つの変数により制御されるが、3つの変数とは、状態セーブ領域スロット(NSSA)の数(状態セーブ領域スタックの全スロット数を定義する)、現在の状態のセーブ領域スロット(CSSA)(次の割り込み上で利用される現在のスロットを定義する)、状態セーブ領域(SSA)(割り込み上にプロセッサ状態をセーブするのに利用されるセーブ領域スロットのセット)である。   The state save area holds the enclave state at the time of interruption. Since an interrupt can be sent to a user mode that may re-enter the next enclave, the SSA is a stack of multiple SSA slots as shown in FIG. 19-3. The location of the state save area used is controlled by three variables of the TCS, which are the number of state save area slots (NSSA) (defining the total number of slots in the state save area stack), Save area slot (CSSA) for current state (defines the current slot used on the next interrupt), save area slot (SSA) (save area slot used to save processor state on interrupt) Set).

エンクレーブ内のスレッド上で実行中に割り込みが生じたときには、マイクロコードが、TCS::SSAおよびTCS::CSSAを調べて、利用されるセーブ領域を決定する。プロセッサ状態がセーブされクリアされ(秘密のリークを防止するために)、TCS::CSSAを増分する。後述するように、最終スロットで例外が生じた場合には、例外をエンクレーブに送ることができない。   When an interrupt occurs during execution on a thread in the enclave, the microcode examines TCS :: SSA and TCS :: CSSA to determine the save area to be used. The processor state is saved and cleared (to prevent secret leaks) and increments TCS :: CSSA. As will be described later, if an exception occurs in the last slot, the exception cannot be sent to the enclave.

注:EENTERでは、CCSAをNSSA未満としてよく、割り込みについて少なくとも1つのセーブ領域が存在するよう保証される(割り込みから戻るためにEENTERを利用中ではない限り)。   Note: In EENTER, CCSA may be less than NSSA, and it is guaranteed that there is at least one save area for interrupts (unless EENTER is being used to return from interrupt).

図25は、割り込み、不良、およびトラップの状態遷移を有する状態マシンの一部を示す。可能性のある状態は、非アクティブ2500、アクティブ2510、予期2520、処理済み(EENTER不法)2530、および処理中2540である。EENTERがTCS:ENTRY2502に配置されると、非アクティブ2500は、アクティブ2510に遷移する。EEXIT2504が生じると、アクティブ2510は非アクティブ2500に遷移する。割り込み、不良、またはトラップ2512が生じると、アクティブ2510は予期2520に遷移する。EIRET2514が生じると、予期2520はアクティブ2510に遷移する。EENTERがTCS:HANDLER2524に配置されると、予期2520が処理中2540に遷移する。EIRET2522が生じると、予期2520が処理中2540に遷移する。割り込み、不良、またはトラップ2526が生じると、処理中2540は予期2520に遷移する。EEXIT2532が生じると、処理中2540が処理済み2530に遷移する。エンクレーブ例外ハンドラで処理割り込みが生じ、EIRET2534が生じると、処理済2530が処理中2540に遷移する。エンクレーブ例外ハンドラからではない処理割り込みが生じ、EIRET2534が生じると、処理済み2530がアクティブ2510に遷移する。点線の遷移2522、2526、2534は、エンクレーブ例外ハンドラ内の割り込みの処理中のみに生じる。   FIG. 25 shows a portion of a state machine with interrupt, bad, and trap state transitions. Possible states are inactive 2500, active 2510, expectation 2520, processed (EENTER illegal) 2530, and in process 2540. When EENTER is placed in TCS: ENTRY 2502, inactive 2500 transitions to active 2510. When EEXIT 2504 occurs, active 2510 transitions to inactive 2500. Active 2510 transitions to expectation 2520 when an interrupt, fault, or trap 2512 occurs. When EIRET 2514 occurs, expectation 2520 transitions to active 2510. When EENTER is placed in TCS: HANDLER 2524, expectation 2520 transitions to in-process 2540. When EIRET 2522 occurs, expectation 2520 transitions to 2540 during processing. When an interrupt, bad, or trap 2526 occurs, the in-process 2540 transitions to an expectation 2520. When EEXIT 2532 occurs, in-process 2540 transitions to processed 2530. When a processing interrupt occurs in the enclave exception handler and EIRET 2534 occurs, processed 2530 transitions to in-process 2540. When a processing interrupt that is not from the enclave exception handler occurs and an EIRET 2534 occurs, the processed 2530 transitions to the active 2510. Dotted transitions 2522, 2526, 2534 occur only during the handling of interrupts in the enclave exception handler.

図25は、エンクレーブ状態マシンの、割り込みに対処する部分を示す。割り込みは、オプションのスタックスイッチおよび割り込みスタックに合成割り込みフレームをプッシュすることから始まる。イベントが割り込みであった場合には、エンクレーブは割り込み状態に入る。イベントが例外であった場合には、エンクレーブは例外状態に入る。これら2つの状態は、エンクレーブへのエンクレーブ例外を確実に配信するために、さらには、攻撃アプリケーションコードによるスプリアス例外の配信を妨げるために、区別される。   FIG. 25 shows the portion of the enclave state machine that handles interrupts. Interrupts begin by pushing a composite interrupt frame to the optional stack switch and interrupt stack. If the event is an interrupt, the enclave enters the interrupt state. If the event is an exception, the enclave enters an exception state. These two states are differentiated to ensure delivery of enclave exceptions to the enclave and to further prevent delivery of spurious exceptions by attacking application code.

割り込み状態に遷移すると、アントラステッド・コード(アプリケーション、OSまたはこれらの両方)は、EENTER/RETURN_FROM_INTERRUPTを利用したエンクレーブの再開を行うだけでよい。   Upon transitioning to the interrupt state, the untrusted code (application, OS, or both) only needs to restart the enclave using EENTER / RETURN_FROM_INTERRUPT.

例外状態に遷移すると、アントラステッド・コード(アプリケーション、OSまたはこれらの両方)は、(1)EIRETを利用してエンクレーブを再開して割り込まれたIPに戻る。これは、例えばページ不良を処理する方法である。割り込みが不良により生じ、不良条件を修正するために何も行われていない場合には、不良命令を再度実行して、不良を再度起こす(and will fault again)。しかしトラップの後のEIRETは、トラップ命令の後に命令に戻る、(2)エンクレーブ例外ハンドラを呼び出す、(3)スレッドまたはエンクレーブを破棄する、と決定してよい。   Upon transitioning to the exception state, the untrusted code (application, OS, or both) (1) resumes enclave using EIRET and returns to the interrupted IP. This is, for example, a method for handling page defects. If the interrupt is caused by a failure and nothing has been done to correct the failure condition, the failure instruction is executed again and the failure is again caused (and will fault again). However, the EIRET after the trap may decide to return to the instruction after the trap instruction, (2) call the enclave exception handler, (3) destroy the thread or enclave.

予期状態のEENTERは、処理中状態に進む。トラップハンドラからのEEXIT(処理中状態)は、処理済状態に進む。ENTER/NORMALは、この状態において不法である。トランポリンからのEIRETは、最後の割り込みからSSAにプッシュされた状態(アクティブまたは処理中状態)を再開する。   The expected EENTER goes to the in-process state. EEXIT (processing state) from the trap handler proceeds to the processed state. ENTER / NORMAL is illegal in this state. The EIRET from the trampoline resumes the state (active or in-process state) pushed to the SSA since the last interrupt.

セキュアなエンクレーブ命令を2つのオペコード(つまり、特権付きオペコードと特権なしオペコード)に分割する。命令処理は、命令の呼び出し時にRAXの値により決定される。

Figure 2012530961
Figure 2012530961
Split the secure enclave instruction into two opcodes (ie, privileged opcode and unprivileged opcode). Instruction processing is determined by the value of RAX when the instruction is called.
Figure 2012530961
Figure 2012530961

ECREATE命令は、保護されているSECSを初期化する。ソースオペランドは、page_info構造を指し示している。コンテンツページフィールドは、保護されていないSECS構造を指し示している。SECS構造は、ページが整列されていてもよい。SECSベースの下位の12ビットおよび境界値は0であってよい。SECSは、EPC内の空のスロットのアドレスである。sec_infoは、保護されていないsec_info構造のアドレスである。対応するsec_infoフラグフィールドは、適切に初期化されてよい。

Figure 2012530961
Figure 2012530961
Figure 2012530961
Figure 2012530961
Figure 2012530961
The ECREATE instruction initializes the protected SECS. The source operand points to the page_info structure. The content page field points to an unprotected SECS structure. The SECS structure may have pages aligned. The SECS base lower 12 bits and the boundary value may be zero. SECS is the address of an empty slot in the EPC. sec_info is the address of the unprotected sec_info structure. The corresponding sec_info flag field may be appropriately initialized.
Figure 2012530961
Figure 2012530961
Figure 2012530961
Figure 2012530961
Figure 2012530961

<EADDPRE>
<命令の説明>
EADDPREは、特権のあるソフトウェアに、lin_addrが指定するエンクレーブ内のページに、エンクレーブの外部のページをコピーさせ、エンクレーブページの属性は、sec_infoフラグフィールドを利用して設定される。命令の一部として、ページをハッシュして、結果生じるハッシュ値を、エンクレーブの計測値レジスタに拡張する。EADDPREは、EINIT命令がまだ初期化していないエンクレーブに対してのみ実行することができる。

Figure 2012530961
Figure 2012530961
Figure 2012530961
Figure 2012530961
Figure 2012530961
Figure 2012530961
Figure 2012530961
<EADDPRE>
<Description of instruction>
EADDPRE causes privileged software to copy a page outside the enclave to a page in the enclave specified by lin_addr, and the attributes of the enclave page are set using the sec_info flag field. As part of the instruction, the page is hashed and the resulting hash value is extended to the enclave's measurement value register. EADDPRE can only be executed for enclaves that have not yet been initialized by the EINIT instruction.
Figure 2012530961
Figure 2012530961
Figure 2012530961
Figure 2012530961
Figure 2012530961
Figure 2012530961
Figure 2012530961

<EADDPOST>
<命令の説明>
EALLOCATEは、特権のあるソフトウェアに、lin_addrが指定するエンクレーブのSMAPエントリを初期化させ、エンクレーブページの属性は、sec_infoフラグフィールドを利用して設定される。エンクレーブがページにアクセスできるようになる前に、EACCEPT命令を用いてエンクレーブのページにアクセスしてよい。EALLOCATEは、EINIT命令が初期化したエンクレーブにのみ実行される。

Figure 2012530961
Figure 2012530961
Figure 2012530961
Figure 2012530961
Figure 2012530961
Figure 2012530961
<EADDPOST>
<Description of instruction>
EALLOCATE causes privileged software to initialize the enclave SMAP entry specified by lin_addr, and the attributes of the enclave page are set using the sec_info flag field. Before the enclave can access the page, the enclave instruction may be used to access the enclave page. EALLOCATE is only executed for enclaves that have been initialized by the EINIT instruction.
Figure 2012530961
Figure 2012530961
Figure 2012530961
Figure 2012530961
Figure 2012530961
Figure 2012530961

<EMKPERMIT>
<命令の説明>
エンクレーブまたはライセンスを認証して、これを用いて許可証を生成する。rbx==NULLである場合には、証明書はIntelにより署名されてよい。他の場合には、ライセンスは、rbx許可証に示されるキーにより署名されてよい。

Figure 2012530961
Figure 2012530961
Figure 2012530961
Figure 2012530961
Figure 2012530961
<EMKPERMIT>
<Description of instruction>
Authenticate the enclave or license and use it to generate a permit. If rbx == NULL, the certificate may be signed by Intel. In other cases, the license may be signed with the key indicated on the rbx permit.
Figure 2012530961
Figure 2012530961
Figure 2012530961
Figure 2012530961
Figure 2012530961

<EINIT>
<命令の説明>
EINITは、エンクレーブを、ソフトウェア環境で実行準備できた状態として表示する。ついに初期化に成功すると(At the end successful initialization)、EENTERをエンクレーブに対して許可する。

Figure 2012530961
Figure 2012530961
Figure 2012530961
Figure 2012530961
<EINIT>
<Description of instruction>
EINIT displays the enclave as ready for execution in the software environment. Finally, when initialization is successful (At the end successful initialization), EENTER is permitted to the enclave.
Figure 2012530961
Figure 2012530961
Figure 2012530961
Figure 2012530961

<ELPG>
<命令の説明>
この命令は、ページをエンクレーブページキャッシュ(EPC)に装填するのに利用される。

Figure 2012530961
Figure 2012530961
Figure 2012530961
Figure 2012530961
Figure 2012530961
<ELPG>
<Description of instruction>
This instruction is used to load a page into an enclave page cache (EPC).
Figure 2012530961
Figure 2012530961
Figure 2012530961
Figure 2012530961
Figure 2012530961

<EWBINVPG>
<命令の説明>
この命令は、EPCからメインメモリにダーティページを書き戻すために利用される。

Figure 2012530961
Figure 2012530961
Figure 2012530961
Figure 2012530961
Figure 2012530961
<EWBINVPG>
<Description of instruction>
This instruction is used to write the dirty page back from the EPC to the main memory.
Figure 2012530961
Figure 2012530961
Figure 2012530961
Figure 2012530961
Figure 2012530961

<EUPSMAP>
<命令の説明>
この命令は、EPCに常駐しているエンクレーブページのバージョンをチェックおよび更新する。

Figure 2012530961
Figure 2012530961
Figure 2012530961
Figure 2012530961
<EUPSMMAP>
<Description of instruction>
This instruction checks and updates the version of the enclave page resident on the EPC.
Figure 2012530961
Figure 2012530961
Figure 2012530961
Figure 2012530961

<EREMOVE>
<命令の説明>
この命令は、データがEPCに装填されたときにSMAPを更新する。

Figure 2012530961
Figure 2012530961
Figure 2012530961
Figure 2012530961
Figure 2012530961
<EREMOVE>
<Description of instruction>
This instruction updates the SMAP when data is loaded into the EPC.
Figure 2012530961
Figure 2012530961
Figure 2012530961
Figure 2012530961
Figure 2012530961

<EADDSMAP>
<命令の説明>
この命令は、エンクレーブを既に初期化したとき、SMAPに新たなページを追加するために利用される。

Figure 2012530961
Figure 2012530961
Figure 2012530961
Figure 2012530961
Figure 2012530961
Figure 2012530961
<EADDDSMAP>
<Description of instruction>
This instruction is used to add a new page to the SMAP when the enclave has already been initialized.
Figure 2012530961
Figure 2012530961
Figure 2012530961
Figure 2012530961
Figure 2012530961
Figure 2012530961

<EMODIFY>
<命令の説明>
この命令は、SEC_INFOフィールドを修正して、エンクレーブが該エンクレーブ内のページを修正することを許可する。エンクレーブは、ページに対する変更を要求するが、プロセスを完了するために変更を受け付けてもよい。

Figure 2012530961
Figure 2012530961
Figure 2012530961
<EMODIFY>
<Description of instruction>
This instruction modifies the SEC_INFO field to allow the enclave to modify pages in the enclave. The enclave requests changes to the page, but may accept changes to complete the process.
Figure 2012530961
Figure 2012530961
Figure 2012530961

<EACCEPT>
<命令の説明>
エンクレーブ内のソフトウェアは、この命令を利用して、SEC_INFOフィールドへの変更を受け付ける。これにより、SMAPを新たなページタイプに更新することができる。

Figure 2012530961
Figure 2012530961
Figure 2012530961
<EACCEPT>
<Description of instruction>
Software in the enclave accepts a change to the SEC_INFO field using this instruction. Thereby, SMAP can be updated to a new page type.
Figure 2012530961
Figure 2012530961
Figure 2012530961

<EENTER>
<命令の説明>
EENTER命令は、エンクレーブに実行を渡す。命令の最後に、CPUは、TCS oENTRYまたはoHANDLERで指定されるIPで、エンクレーブモードで実行されている。EENTERは、TCSが有効であり、エントリ可能であることを確かめる。TCSおよび対応するSSAは、命令を続けるためにメモリに常駐させてよい。EENTERはさらに、状態マシンをチェックして、エントリのタイプを判断し、TCS内で一度に1つの論理プロセッサのみがアクティブであることを確かめる。RFLAGS.TFは、EENTER上で、僅かに修正された振る舞いを有する。RFLAGS.TFがTCS.SAVE_TFに格納されて、その後、TCS.TFから装填される。次にデバッグ例外が、RFLAGS.TFの更新値に応じて条件付きで生成される。エンクレーブがデバッグモードにない場合には、デバッグレジスタDR7をTCS.DR7にセーブして、クリアする。IA32_DEBUGCTL MSRについても同様である。

Figure 2012530961
Figure 2012530961
Figure 2012530961
Figure 2012530961
Figure 2012530961
<EENTER>
<Description of instruction>
The EENTER command passes execution to the enclave. At the end of the instruction, the CPU is running in enclave mode with an IP specified by TCS oENTRY or oHANDLER. EENTER confirms that the TCS is valid and can be entered. The TCS and corresponding SSA may reside in memory to continue the instruction. EENTER also checks the state machine to determine the type of entry and ensures that only one logical processor is active at a time in the TCS. RFLAGS. TF has a slightly modified behavior on EENTER. RFLAGS. TF is TCS. Stored in SAVE_TF, and then TCS. Loaded from TF. Next, the debug exception is RFLAGS. Conditionally generated according to the update value of TF. When the enclave is not in the debug mode, the debug register DR7 is set to TCS. Save to DR7 and clear. The same applies to IA32_DEBUGCTL MSR.
Figure 2012530961
Figure 2012530961
Figure 2012530961
Figure 2012530961
Figure 2012530961

<RFLAGS.TFの振る舞い>
EENTERの実行開始時のRFLAGS.TFの値は、EENTER完了時のトラップに影響しない。TCSから装填されるRFLAGS.TFの値は、トラップがとられているかを決定する。
<DR7の振る舞い>
エンクレーブがデバッグモードにない場合には、デバッグレジスタDR7をTCS.DR7にセーブして、クリアする。
<IA32_DEBUG_CTLの振る舞い>
エンクレーブがデバッグモードにない場合には、IA32_DEBUG_CTL MSRをTCS.DEBUG_CTLにセーブして、クリアする。

Figure 2012530961
Figure 2012530961
<RFLAGS. Behavior of TF>
RFLAGS. At the start of execution of EENTER The value of TF does not affect the trap when EENTER is completed. RFLAGS .. loaded from TCS. The value of TF determines whether a trap is taken.
<DR7 behavior>
When the enclave is not in the debug mode, the debug register DR7 is set to TCS. Save to DR7 and clear.
<Behavior of IA32_DEBUG_CTL>
If the enclave is not in debug mode, set IA32_DEBUG_CTL MSR to TCS. Save to DEBUG_CTL and clear.
Figure 2012530961
Figure 2012530961

<EEXIT>
EEXITは、エンクレーブの外部へと抜ける。
<命令の説明>
EEXITは、エンクレーブモードをディセーブルして、RBSが指定する位置に分岐する。この命令によりレジスタは影響を受けない。秘密がいずれかのレジスタに含まれる場合には、これらレジスタをクリアするのはエンクレーブソフトウェアの任務となる。RFLAGS.TFは、EEXIT上で、僅かに修正された振る舞いを有する。RFLAGS.TFがTCS.SAVE_TFから装填される。次に、デバッグ例外が、RFLAGS.TFの更新値に応じて条件CR-0021付きで生成される。エンクレーブがデバッグモードにない場合には、デバッグレジスタDR7をTCS.DR7に装填する。この振る舞い、および、RFLAGS.TFの振る舞いは、???に詳述されている。

Figure 2012530961
Figure 2012530961
Figure 2012530961
<EEXIT>
EEXIT exits out of the enclave.
<Description of instruction>
EEXIT disables the enclave mode and branches to the position specified by the RBS. This instruction does not affect the register. If secrets are contained in any of the registers, it is up to the enclave software to clear these registers. RFLAGS. TF has a slightly modified behavior on EEXIT. RFLAGS. TF is TCS. Loaded from SAVE_TF. Next, the debug exception is RFLAGS. It is generated with a condition CR-0021 in accordance with the update value of TF. When the enclave is not in the debug mode, the debug register DR7 is set to TCS. Load DR7. This behavior and RFLAGS. What is the behavior of TF? ? ? Is described in detail.
Figure 2012530961
Figure 2012530961
Figure 2012530961

<RFLAGS.TFの振る舞い>
EEXITの実行開始時のRFLAGS.TFの値は、EEXITの完了時のトラップには影響しない。SSAから装填されるRFLAGS.TFの値は、トラップをとるかを決定する。
<DR7の振る舞い>
エンクレーブがデバッグモードにない場合には、デバッグレジスタDR7をTCS.DR7に装填する。
<IA32_DEBUG_CTLの振る舞い>
エンクレーブがデバッグモードにない場合には、IA32_DEBUG_CTL MSRをTCS.DEBUG_CTLから装填する。

Figure 2012530961
<RFLAGS. Behavior of TF>
RFLAGS. At the start of execution of EEXIT. The value of TF does not affect the trap when EEXIT is completed. RFLAGS. The value of TF determines whether a trap is taken.
<DR7 behavior>
When the enclave is not in the debug mode, the debug register DR7 is set to TCS. Load DR7.
<Behavior of IA32_DEBUG_CTL>
If the enclave is not in debug mode, set IA32_DEBUG_CTL MSR to TCS. Load from DEBUG_CTL.
Figure 2012530961

<EIRET>
<命令の説明>
EIRET命令は、SSAに前に格納していたマシン状態を利用して、例外または割り込みのために中断していたエンクレーブの実行を再開する。EIRETは、TCSが有効であり、再開可能であることを確かめる。TCSおよび対応するSSAが、処理を進めるために命令のためのメモリに常駐している場合がある。EIRETはさらに、状態マシンをチェックして、エントリの種類を判断し、TCS内で一度に1つの論理プロセッサのみがアクティブであることを確かめる。RFLAGS.TFがEIRET上に設定されている場合、命令の完了時にデバッグ例外が生じる(つまり、通常のTFの振る舞い)。この例外は、エンクレーブ内で生じたものとして報告され(通常のSEで定義されている方法により)、内部では命令は実行されない。EIRETはSSAからのRFLAGSを復元するので、TFは、EIRETの終了時に設定されてよい。この場合、TFは、以下の命令に影響する(これも通常のTFの振る舞いである)。

Figure 2012530961
Figure 2012530961
Figure 2012530961
Figure 2012530961
<EIRET>
<Description of instruction>
The EIRET instruction uses the machine state previously stored in the SSA to resume execution of the enclave that was suspended due to an exception or interrupt. EIRET verifies that the TCS is valid and can be resumed. The TCS and corresponding SSA may reside in memory for instructions to proceed. EIRET further checks the state machine to determine the type of entry and verifies that only one logical processor is active at a time in the TCS. RFLAGS. If TF is set on EIRET, a debug exception occurs on completion of the instruction (ie normal TF behavior). This exception is reported as occurring in the enclave (in the manner defined in normal SE) and no instructions are executed internally. Since EIRET restores RFLAGS from SSA, TF may be set at the end of EIRET. In this case, TF affects the following instructions (this is also normal TF behavior):
Figure 2012530961
Figure 2012530961
Figure 2012530961
Figure 2012530961

<RFLAGS.TFの振る舞い>
RFLAG.TFがEIRET命令の始めに設定されている場合、#DBが完了後に生じる。例外は、TFが設定されていなければ制御が転送されたRIPで報告される。実際、エンクレーブにおいて転送処理は行われない。EIRETの通常処理の一環として、RFLAGSをSSAコピーから復元する。結果生じるTFが設定されている場合には、エンクレーブ内の対象命令の実行後に#DBが生じる。これらの振る舞いは、通常のIA IRET命令の振る舞いと矛盾しない。
<DR7の振る舞い>
DR7は、最後の割り込みまたは例外で前にセーブされたSSAコピーからを復元される。
<IA32_DEBUG_CTLの振る舞い>
IA32_DEBUG_CTL MSRは、最後の割り込みまたは例外で前にセーブされたSSAコピーから復元される。

Figure 2012530961
<RFLAGS. Behavior of TF>
RFLAG. If TF is set at the beginning of the EIRET instruction, #DB occurs after completion. The exception is reported in the RIP to which control has been transferred unless TF is set. Actually, no transfer process is performed in the enclave. As part of normal EIRET processing, RFLAGS is restored from the SSA copy. If the resulting TF is set, #DB occurs after execution of the target instruction in the enclave. These behaviors are consistent with the behavior of normal IA IRET instructions.
<DR7 behavior>
DR7 is restored from the previously saved SSA copy at the last interrupt or exception.
<Behavior of IA32_DEBUG_CTL>
The IA32_DEBUG_CTL MSR is restored from the SSA copy previously saved with the last interrupt or exception.
Figure 2012530961

<EREPORT>
EREPORT命令は、エンクレーブの内容に関する計測値を報告する。
<命令の説明>
EREPORTは、エンクレーブ計測値レジスタ、その機能およびデバッグステータス(フラグ)を取得する。これらの値全ては、対称メッセージ認証コードを利用して保護され、REPORTキーを利用して検証することができる。REPORTキーを要求するエンクレーブでは、適切な機能がSECSに設定されて、EGETKEY命令によりこれを取得することができる。この命令の結果は、宛先位置output_buffer_laに配置される。

Figure 2012530961
Figure 2012530961
Figure 2012530961
<EEPPORT>
The EEPPORT instruction reports measurements related to the contents of the enclave.
<Description of instruction>
EEPPORT acquires the enclave measurement value register, its function, and debug status (flag). All of these values are protected using a symmetric message authentication code and can be verified using a REPORT key. In an enclave that requires a REPORT key, the appropriate function is set in SECS and can be obtained by the EGETKEY command. The result of this instruction is placed at the destination location output_buffer_la.
Figure 2012530961
Figure 2012530961
Figure 2012530961

<ERDMR>
ERDMR命令は、エンクレーブSECSから計測値レジスタの値を読み取る。
<命令の説明>
この命令は、エンクレーブ外からのみ実行可能である。SECSが有効なSECページを指し示している場合には、命令は、output_buffer_laにより特定されるアドレスに、エンクレーブ計測値レジスタの内容を出力する。

Figure 2012530961
Figure 2012530961
Figure 2012530961
<ERDMR>
The ERDMR instruction reads the value of the measurement value register from the enclave SECS.
<Description of instruction>
This instruction can only be executed from outside the enclave. If SECS points to a valid SEC page, the instruction outputs the contents of the enclave measurement value register to the address specified by output_buffer_la.
Figure 2012530961
Figure 2012530961
Figure 2012530961

<EGETKEY>
エンクレーブコードにより利用されて、プロセッサキー階層から特定のキーを戻す。
<命令の説明>
要求されるキーは、KeyRequest構造を利用して特定され、そのアドレスは入力として提供される。このアドレスは自然整列される。出力は常に256ビットのデータ値となる。この値とするためには、output_laは自然整列される必要がある。

Figure 2012530961
Figure 2012530961
Figure 2012530961
Figure 2012530961
Figure 2012530961
Figure 2012530961
Figure 2012530961
<EGETKEY>
Used by the enclave code to return a specific key from the processor key hierarchy.
<Description of instruction>
The required key is specified using the KeyRequest structure and its address is provided as input. This address is naturally aligned. The output is always a 256-bit data value. To achieve this value, output_la needs to be naturally aligned.
Figure 2012530961
Figure 2012530961
Figure 2012530961
Figure 2012530961
Figure 2012530961
Figure 2012530961
Figure 2012530961

<ERDTCSPTR>
<命令の説明>
ERDTCSPTR命令は、現在のTCSリニアアドレスをRBXに読み込むために利用される。

Figure 2012530961
Figure 2012530961
<ERDTCSPTR>
<Description of instruction>
The ERDTCSPTR instruction is used to read the current TCS linear address into the RBX.
Figure 2012530961
Figure 2012530961

<EDBGRD>
<命令の説明>
EDBGRD命令は、デバッグエンクレーブから8バイトを読み取るのに利用される。

Figure 2012530961
Figure 2012530961
Figure 2012530961
<EDBGRD>
<Description of instruction>
The EDGGRD instruction is used to read 8 bytes from the debug enclave.
Figure 2012530961
Figure 2012530961
Figure 2012530961

<EDBGWR>
<命令の説明>
EDBGWR命令は、8バイトをデバッグ・エンクレーブページに書き込むために利用される。

Figure 2012530961
Figure 2012530961
Figure 2012530961
<EDBGWR>
<Description of instruction>
The EDBGWR instruction is used to write 8 bytes to the debug enclave page.
Figure 2012530961
Figure 2012530961
Figure 2012530961

<ERDINFO>
ERDINFO命令は、エンクレーブページキャッシュの内容に関する情報を戻す。
<命令の説明>
エンクレーブ外で実行されると、EREPORTは、自身の機能およびデバッグステータス(フラグ)を、エンクレーブ計測値レジスタに報告する。これらの値全ては、対称メッセージ認証コードを利用して保護され、EVERIFYREPORT命令を利用して検証することができる。この命令の結果は、宛先位置output_buffer_laに配置される。

Figure 2012530961
Figure 2012530961
Figure 2012530961
<ERDINFO>
The ERDINFO instruction returns information about the contents of the enclave page cache.
<Description of instruction>
When executed outside the enclave, EEPPORT reports its capabilities and debug status (flag) to the enclave measurement register. All of these values are protected using a symmetric message authentication code and can be verified using the EVERIFYREPORT instruction. The result of this instruction is placed at the destination location output_buffer_la.
Figure 2012530961
Figure 2012530961
Figure 2012530961

<ルーチン参照>
<退出(Exit)>
このセクションでは、退出処理についての擬似コードを提供する。このコードは、エンクレーブコードが計画していないエンクレーブからの退出があるときに呼び出される。エンクレーブの実行は、停止した場所から再開される。再開に必要な情報は、外部スタック上にセーブされる。プロセッサのアーキテクチャ状態は、適切なセーブ領域にセーブされる。

Figure 2012530961
Figure 2012530961
<Routine reference>
<Exit>
This section provides pseudo code for exit processing. This code is called when there is an exit from an enclave that the enclave code does not plan. Enclave execution resumes from where it stopped. Information necessary for resumption is saved on the external stack. The processor architecture state is saved in the appropriate save area.
Figure 2012530961
Figure 2012530961

<リーダ・ロックの取得>
RWロックにより、論理プロセッサは、共有リソースにアクセスして、スレッドが共有リソースにアクセスすることのできる2つのモードを提供する。この2つのモードとは、(1)共有モード:複数のリーダ論理プロセッサに対する共有の読み取り専用アクセスを許可し、これにより、これら複数のプロセッサが、共有リソースからコンカレントにデータを読み出すことができるようになるモード、(2)排他的モード:一度の1つの書き込み論理プロセッサへの読み書きアクセスを許可するモードであり、排他的モードでロックが取得されると、他のスレッドは、書き込みを行っている実体がロックを解除するまでは共有リソースにアクセスできなくなる、である。

Figure 2012530961
Figure 2012530961
Figure 2012530961
Figure 2012530961
Figure 2012530961
<Acquisition of reader / lock>
With the RW lock, the logical processor accesses the shared resource and provides two modes in which threads can access the shared resource. These two modes are: (1) Shared mode: Permits shared read-only access to multiple reader logical processors so that these multiple processors can read data from shared resources concurrently. (2) Exclusive mode: a mode that allows read / write access to one write logical processor at a time. When a lock is acquired in the exclusive mode, other threads are entities that are writing. The shared resource cannot be accessed until the lock is released.
Figure 2012530961
Figure 2012530961
Figure 2012530961
Figure 2012530961
Figure 2012530961

<サブルーチンの説明>
このサブルーチンは、実際のところ、uCodeがPMHアドレス−変換機能をxuCodeに曝すとき利用されるハードウェアの追加である。XUTRANSLATEは、主に、PMHコンテキストおよびリニアアドレスを入力として、出力として最終物理アドレスを生成するxuOpである。PMHがページテーブル・ウォークの間に不良条件に遭遇すると、これらがxuCodeに報告される。xuOpの詳細は、本書類の範囲外である。

Figure 2012530961
<Description of subroutine>
This subroutine is actually an addition of hardware that is used when uCode exposes the PMH address-translation function to xuCode. XUTRANSLATE is a xuOp that mainly receives a PMH context and a linear address as input and generates a final physical address as output. If PMH encounters bad conditions during the page table walk, these are reported to xuCode. The details of xuOp are outside the scope of this document.
Figure 2012530961

<サブルーチンの説明>
このサブルーチンは、識別されたキーを有する導出バッファ(DerivationBuffer)にCMAC処理を行うことでキーを生成する際に利用される。導出バッファは、128ビットの倍数でなくてはならない。

Figure 2012530961
Figure 2012530961
<Description of subroutine>
This subroutine is used when generating a key by performing CMAC processing on a derived buffer (DerivationBuffer) having the identified key. The derivation buffer must be a multiple of 128 bits.
Figure 2012530961
Figure 2012530961

一般的には、殆どのSEは、マイクロコード実装される。CMA、パッケージ外およびコア内のデータ移動制御する論理を含む複数の位置にハードウェアによるサポートが必要である。 In general, most of the SE is implemented in microcode. Hardware support is required at multiple locations including CMA, logic to control data movement outside the package and within the core.

EPCは、LPがマイクロコードードで実行中、または、LPがエンクレーブ内で実行中であり、アクセスされているリニアアドレスがそのエンクレーブがカバーするリニアアドレスレンジに属している場合にのみ、論理プロセッサ(LP)によりアクセス可能である。言い換えると、EPCレンジに行くことが許されるのはマイクロコードクセスまたはエンクレーブアクセスのみである。EPCレンジに対する他のアクセスはすべて、不法とみなされる。 EPC during LP execution microcode mode, or, LP is running in the enclave, only if the linear address being accessed belongs to a linear address range that enclave covers, logic Accessible by the processor (LP). In other words, it is only microcode access or enclave access to be allowed to go to EPC range. All other accesses to the EPC range are considered illegal.

注:フィールドは(未だ)特に決まった順序で記載されていない。一部のフィールドは、銘々のデータ構造内の異なるメモリページに移動させられてよく、これにより例えば異なる保護手段が可能となる。

Figure 2012530961
Note: The fields are not listed (yet) in any particular order. Some fields may be moved to different memory pages within the branded data structure, allowing for different protection measures, for example.
Figure 2012530961

一部の実施形態では、性能、実装の複雑性、シリコンのコストといった数多くの軸同士の間を調整されてよい。この章では、開発者に対して可能性ある調整例の幾つかを示すために3つの実装例を紹介する。以下の表8−1は、これら保護の例および必要となるPMHサポートを示す。

Figure 2012530961
In some embodiments, a number of axes such as performance, implementation complexity, and silicon cost may be coordinated. This chapter introduces three implementations to show some of the possible adjustments to developers. Table 8-1 below shows examples of these protections and the required PMH support.
Figure 2012530961

表8−1の第1行に示すとおり、必要なアクセス制御保護を提供するには追加のレンジレジスタは1つでよい。この特定の実装例では、他の保護はマイクロよって提供される。レンジレジスタは、論理プロセッサごとにイネーブルされてよい。このメカニズムを利用する基本実装例を図2−2に示す。 As shown in the first row of Table 8-1, there may be one additional range register to provide the necessary access control protection. In this particular implementation, other protection therefore are provided to the micro. The range register may be enabled for each logical processor. An example of basic implementation that uses this mechanism is shown in Figure 2-2.

PMHは、イクロコードモードでもエンクレーブモードでも実行されていないLPからCMAレンジ(CPUのCMRRがカバーしている)へのアクセスを除去するよう修正される。加えて、エンクレーブモードで実行しているLPは、CMAのEPCサブレンジにのみアクセスを許可される。 PMH are modified to remove access to microswitch code mode CMA range from the LP has not been executed in the enclave mode (CMRR of the CPU is covered). In addition, LPs running in enclave mode are only allowed access to the CMA EPC subrange.

署名されたライセンス鎖は、エンクレーブ起動プロセス中の評価には理想的とはいえないので、代わりに、これらを、許可証(permit)と称される単一の命令の実行しやすい構造(single instruction digestible structure)に組み込む。許可証は、CMACアルゴリズムを利用して対称認証され、エンクレーブの初期化(EINIT)中に解釈される。

Figure 2012530961
Figure 2012530961
Figure 2012530961
Since signed license chains are not ideal for evaluation during the enclave activation process, they are instead replaced by a single instruction executable structure called a permit. digestible structure). The permit is symmetric authenticated using the CMAC algorithm and interpreted during enclave initialization (EINIT).
Figure 2012530961
Figure 2012530961
Figure 2012530961

EMKPERMITは、ライセンス上のRSA署名を検証するのに必要となる時間のために、特権付き命令である。この命令は、証して、その内容から許可証を生成する非常に単純な署名付き証明書をとる。ライセンスは、署名およびそれを署名するのに利用するキーの公開部分の両方を含む。これにより、uCodeは、Intelのライセンス署名キーのハッシュのみを格納して、Intelが署名したライセンスを認証することができる。EMKPERMITは、さらに、キーの認証された承認を提供することにより、ISVキーが署名したライセンスを認証することができる。これは、ISVの公開鍵のハッシュを含む許可証を作成することによって行われる。この結果、EMKPERMITがIntelのライセンスを、内部ハッシュ、あるいは、第2の許可証に提供されているハッシュを持つISVキーを利用して、Intelのライセンスを検証することができる。 EMKPERMIT is a privileged instruction because of the time required to verify the RSA signature on the license. This instruction, to validate, to take a very simple signed certificate to generate a permit from its contents. The license includes both the signature and the public part of the key used to sign it. Thereby, uCode can authenticate the license signed by Intel by storing only the hash of the license signature key of Intel. The EMKPERMIT can also authenticate the license signed by the ISV key by providing an authorized authorization of the key. This is done by creating a permit containing a hash of the ISV's public key. As a result, EMKPERMIT can verify the Intel license using the Intel license using the internal hash or the ISV key having the hash provided in the second permit.

このセクションでは、復帰可能なTCBが、uCode、MCHECK、およびマイクロコードまたはuVMM)からなるプラットフォームのアーキテクチャの一例について説明する。ハードウェア要件は、どのSEサポートプラットフォームについても同じであってよいが、具体的なキーフローは、特定のTCB要素に依存している。ここで利用されている技術に類似した技術を利用して他のプラットフォームをサポートすることもできる This section describes an example of a platform architecture where the recoverable TCB consists of uCode, MCHECK, and microcode ( or uVMM). The hardware requirements may be the same for any SE support platform, but the specific keyflow depends on the specific TCB element. Other platforms can be supported using techniques similar to those used here .

キーを特定のTCBバージョンのセットに結合することは、ヒューズキーから第1セットのキーを、開始される機動シーケンスの種類基づいてuCodeに導出させることにより行われる。このヒューズをロックした後、起動シーケンスの各装填において鎖状に導出(a chain of derivations)が行われる。 Coupling the key to a specific set of TCB versions is done by having the uCode derive the first set of keys from the fuse key based on the type of maneuver sequence being initiated. After locking this fuse, a chain of derivations is performed at each loading of the activation sequence.

これにより、データを前方マイグレーションさせる。uCode SVN3を実行する場合を例にとる。エンクレーブはEGETKEYを利用して、このバージョンに基づくシールキーを取得して(PRELoop(3))、これを利用してデータをシールする。フィールドuCodeアップグレードを配信し、次の起動uCode SVNは4である。アップグレードの後で、EGETKEY実装は、PRFLoop(4)にアクセス可能となる。エンクレーブが、EGETKEYにSVN3キーを送るよう要求する場合、PRELoop(3)=PRFPRELoop(4)(constant)を計算して、古いシールキーを取得することができる。 As a result, the data is migrated forward. Take the case of executing uCode SVN3 as an example. The enclave uses EGETKEY to obtain a seal key based on this version (PRELoop (3)), and uses this to seal the data. Deliver the field uCode upgrade and the next activation uCode SVN is 4. After the upgrade, the EGETKEY implementation will be able to access PRFLoop (4). If the enclave requests EGETKEY to send the SVN3 key, it can calculate PRELoop (3) = PRF PRELoop (4) (constant) to obtain the old seal key.

この特性を構築するには、PRFのループを利用するが、特性PRFPRELoop(x-1)がPRFPRELoop(x)から計算されるので、SVNの最大値を構築して、ここから減算していく必要がある。特定の最大値は、求される性能基づいて各プラットフォームの種類に対して構築する必要がある。最大値の初期値としては32を推奨する。PRFループ導出は、以下のようになる。

Figure 2012530961
To build this characteristic, a PRF loop is used. Since the characteristic PRF PRELoop (x-1) is calculated from PRF PRELoop (x) , the maximum value of SVN is constructed and subtracted from this. We have to go. Specific maximum value, it is necessary to construct for the type of each platform on the basis of the performances requested. 32 is recommended as the initial maximum value. The PRF loop derivation is as follows.
Figure 2012530961

SVNキーがuCode SVNに基づいてループ導出されると、SE CMA等の、離れた保護メモリ内に格納することができる。イクロコードは、SVNキーからキーを導出するためだけに、イクロコードに曝されるMSRを利用する。MSRは、導出の基礎が、グローバルなアウトオブボックスのキーなのか、ヒューズキーなのか、および、各TCB層について要求されているSVNセットを示すキー選択器を利用する。これにより、要求が現在の値以下であることを確かめることができる。UCodeは、任意の必要なPREを利用して、古いSVNキー、PRF,および要求されているTCB SVNを取得することができる。

Figure 2012530961
Once the SVN key is derived from the loop based on uCode SVN, it can be stored in a separate protected memory, such as SE CMA. Microcode is, only in order to derive the key from SVN key, use the MSR that are exposed to the microcode. The MSR utilizes a key selector that indicates whether the basis of the derivation is a global out-of-box key or a fuse key, and the SVN set required for each TCB layer. This makes it possible to confirm that the request is below the current value. The UCode can use any necessary PRE to obtain the old SVN key, PRF, and the requested TCB SVN.
Figure 2012530961

適切なSVNキーが利用可能になると、要求されているTCB SVNのCMACのキーとして利用される。イクロコードは、これをCMACキーとして、Opsキー、またはプロビジョンベースキーの固定ストリングについてSEOpsシード(Intelが知らないヒューズキーの部分から導出した値)に対して利用する。つまり、se_base_key=CMAC(svn_base_key,se_ops_seed)である。 When the appropriate SVN key is available, it is used as the CMAC key for the requested TCB SVN. Microcode, as a CMAC key to this, Ops key, or to use for a fixed string of pro-vision-based key for SEOps seed (a value that Intel has been derived from the portion of the fuse key do not know). That is, se_base_key = CMAC (svn_base_key, se_ops_seed).

全てのコアが同期して、ドアベルまたは類似したメカニズムを利用して、全てがMCHECKに入るようにする。全てのコアがMCHECKを実行中になると、(1)uCodeが、ヒューズの読み取り、復号、およびロックを行う、(2)uCodeがPRFループをSVNキーに、PRFループをOOBEキーに利用して、uCodeのSVNを両キーに投入する。uCodeは、そのSVNをTCB SVNレジスタに書き込み、その部分をロックする、(3)MCHECKローダまたは早期MCKECKコードが、MCHECKのSVNをTCB SVNレジスタに書き込み、ロックする、(4)マイクロコードッチ・ローダが、マイクロコードッチSVNをTCB SVNレジスタに書き込み、ロックする、という各ステップがBSPから行われる。APは、キーフローに参加しない。 All cores are synchronized and utilize a doorbell or similar mechanism to ensure that everything enters the MCHECK. When all cores are executing MCHECK, (1) uCode reads, decodes, and locks the fuse. (2) uCode uses the PRF loop as the SVN key and the PRF loop as the OOBE key. Insert uCode SVN into both keys. uCode writes the SVN the TCB SVN register, lock the portion, (3) MCHECK loader or early MCKECK code, write a SVN of MCHECK the TCB SVN register, lock, (4) microcode patch loader, writing microcode patch SVN to TCB SVN register, locks, each step that is performed from the BSP. APs do not participate in keyflows.

イクロコード初期化中、またはEGETKEYの呼び出し時に、イクロコードは、要求を満たすのに必要となるSEベースキーを計算する。ベースキーは、さらに性能向上のために利用するために、CMA内にキャッシュされてよい。表12−4は、ベースキーの計算方法を示す。

Figure 2012530961
During microcode initializes, or when EGETKEY call, microcode calculates the SE base key needed to satisfy the request. The base key may be cached in the CMA for use for further performance improvement. Table 12-4 shows the calculation method of the base key.
Figure 2012530961

図26は、本発明の一実施形態における、デジタル乱数生成器のためのプロセッサパッケージを示す。プロセッサパッケージ2600は、コア0 2640、コア1 2670という複数のコアを含みうる。コア0 2640は、イクロコード2642、イクロコード2644、イクロコード2646、RNGマイクロコードモジュール2650、およびRNGキュー2654を含んでよい。コア1 2670は、イクロコード2672、イクロコード2674、イクロコード2676、RNGマイクロコードモジュール2680、およびRNGキュー2684を含んでよい。読み取りランダム命令2630は、イクロコード2642と通信してよく、読み取りランダム命令2635は、イクロコード2672と通信してよい。プロセッサパッケージ2600は、さらに、DRNG2602を含んでよく、DRNG2602は、STD2608、OPE2610、PSK2612、およびTSC2614をとる。DRNG2602は、デジタルエントロピーソース2604を取得することができ、これはオンラインの自己テスト2606に接続する。オンラインの自己テスト2606の出力は、組み合わせられた調節器/決定論ランダムビット生成器(DRBG)2620の1つの入力であってよい。 FIG. 26 illustrates a processor package for a digital random number generator in one embodiment of the invention. The processor package 2600 can include a plurality of cores, core 0 2640 and core 1 2670. Core 0 2640, microcode 2642, microcode 2644 may include microcode 2646, RNG microcode module 2650, and RNG queue 2654. Core 1 2670, microcode 2672, microcode 2674 may include microcode 2676, RNG microcode module 2680, and RNG queue 2684. Reading random instructions 2630 may communicate with microcode 2642, read the random instructions 2635 may communicate with microcode 2672. The processor package 2600 may further include a DRNG 2602, which takes the STD 2608, the OPE 2610, the PSK 2612, and the TSC 2614. The DRNG 2602 can obtain a digital entropy source 2604 that connects to an online self test 2606. The output of the online self test 2606 may be one input of a combined regulator / deterministic random bit generator (DRBG) 2620.

<サブルーチンの説明>
このサブルーチンは、実際のところ、uCodeがPMHアドレス−変換機能をCodeに曝すとき利用されるハードウェアの追加である。XUTRANSLATEは、主に、PMHコンテキストおよびリニアアドレスを入力として、出力として最終物理アドレスを生成するOpである。PMHがページテーブル・ウォークの間に不良条件に遭遇すると、これらがCodeに報告される。Opの詳細は、本書類の範囲外である。
<Description of subroutine>
This subroutine, indeed, uCode the PMH address - an additional hardware utilized when exposing the conversion function u Code. XUTRANSLATE is a u Op that mainly receives a PMH context and a linear address as input and generates a final physical address as output. If PMH encounters bad conditions during the page table walk, these are reported to u Code. The details of u Op are outside the scope of this document.

Claims (15)

保護データにアクセスする、保護モードで実行されるプログラムの実行中に、前記保護データを、エンクレーブページキャッシュ(EPC)と第2の格納領域との間で移動させる第1の命令を少なくとも実行する実行論理を備えるプロセッサ。   Execution executing at least a first instruction for moving the protection data between an enclave page cache (EPC) and a second storage area during execution of a program executed in protection mode that accesses the protection data A processor with logic. 前記プログラムがハードディスクドライブまたは保護メモリに格納されているときに、セキュリティマップ(SMAP)が前記プログラムの整合性の確保を助ける請求項1に記載のプロセッサ。   The processor of claim 1, wherein a security map (SMAP) helps to ensure the integrity of the program when the program is stored on a hard disk drive or protected memory. セキュアなエンクレーブで実行されているソフトウェアスレッドを識別する、ユーザのプログラムに前記ソフトウェアスレッドの実体を知らせる第1の命令を実行する実行論理を備えるプロセッサ。   A processor comprising execution logic for executing a first instruction for identifying a software thread executing in a secure enclave and informing a user program of the identity of the software thread. セキュアなエンクレーブに格納されているデータの整合性を判断するべく、セキュアなマップ(SMAP)フィールドとセキュリティ情報(SEC_INFO)フィールドとを含む少なくとも1つの情報フィールドに動的にアクセスする第1の命令を少なくとも実行する実行論理を備えるプロセッサ。   A first instruction for dynamically accessing at least one information field including a secure map (SMAP) field and a security information (SEC_INFO) field to determine the integrity of data stored in the secure enclave A processor having at least execution logic to be executed. メモリに格納されているセキュアなエンクレーブの状態を、ローカルエージェントまたは遠隔エージェントのいずれかに報告する第1の命令を実行する実行論理を備えるプロセッサ。   A processor comprising execution logic that executes a first instruction that reports a state of a secure enclave stored in memory to either a local agent or a remote agent. ソフトウェアプログラムの実行中に、前記ソフトウェアプログラムを攻撃から保護するクリプト・メモリ・アパーチャ(CMA)と、
前記ソフトウェアプログラムが実行していない間に前記ソフトウェアプログラムを保護するセキュアなマップ(SMAP)と
を備えるプロセッサ。
A crypto memory aperture (CMA) that protects the software program from attacks during execution of the software program;
A processor comprising: a secure map (SMAP) that protects the software program while the software program is not running.
セキュアなエンクレーブ内の対応するメモリまたはソフトウェアスレッドの割り当てまたは割り当て解除をする少なくとも1つのセキュアなエンクレーブアクセス命令を実行する実行論理を備えるプロセッサ。   A processor comprising execution logic that executes at least one secure enclave access instruction that allocates or deallocates a corresponding memory or software thread in the secure enclave. 単一のプロセッササイクルにおいてセキュアなエンクレーブ内で複数のメモリ更新を行わせる階層保護ツリー、SMAPを備えるプロセッサ。   A processor with a hierarchical protection tree, SMAP, that allows multiple memory updates within a secure enclave in a single processor cycle. セキュアなエンクレーブに固有キーを提供する第1の命令を実行する実行論理を備えるプロセッサ。   A processor comprising execution logic for executing a first instruction that provides a unique key to a secure enclave. アントラステッド・エージェントが管理するトラステッド環境を構築する第1の命令を実行する論理を備えるプロセッサ。   A processor comprising logic for executing a first instruction to build a trusted environment managed by an untrusted agent. セキュアなエンクレーブにアクセスするためのライセンスの有効性を、前記エンクレーブのサイズをライセンス証明書が規定するサイズと比較して判断する命令を実行する論理を備えるプロセッサ。   A processor comprising logic for executing instructions to determine the validity of a license for accessing a secure enclave by comparing the size of the enclave with a size specified by a license certificate. セキュアなエンクレーブのユーザレベルのポリシー管理を行う、制御ビットにより制御される論理を備えるプロセッサ。   A processor with logic controlled by control bits for user-level policy management of secure enclaves. ユーザに対してライセンス許諾されるセキュアなエンクレーブの少なくとも1つのインスタンスに対するアクセスを許可する少なくとも1つの命令を実行する論理を備えるプロセッサ。   A processor comprising logic that executes at least one instruction that grants access to at least one instance of a secure enclave licensed to a user. セキュアなエンクレーブのデバッグを行わせる、デバッグを許可されたエンクレーブのみのエンクレーブセキュリティを侵害する少なくとも1つの命令を実行する論理を備えるプロセッサ。   A processor comprising logic to execute at least one instruction that violates enclave security of only enclaves that are allowed to debug, enabling secure enclave debugging. それぞれエンクレーブページキャッシュ(EPC)に対してメモリページの割り当てまたは割り当て解除を行う少なくとも1つの命令を実行する実行論理を備えるプロセッサ。   A processor comprising execution logic that executes at least one instruction that allocates or deallocates memory pages to each enclave page cache (EPC).
JP2012516046A 2009-12-22 2009-12-22 Method and apparatus for providing secure application execution Expired - Fee Related JP5443599B2 (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/US2009/069212 WO2011078855A1 (en) 2009-12-22 2009-12-22 Method and apparatus to provide secure application execution

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP2013262672A Division JP6068325B2 (en) 2013-12-19 2013-12-19 Processor that provides secure application execution

Publications (2)

Publication Number Publication Date
JP2012530961A true JP2012530961A (en) 2012-12-06
JP5443599B2 JP5443599B2 (en) 2014-03-19

Family

ID=44196072

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012516046A Expired - Fee Related JP5443599B2 (en) 2009-12-22 2009-12-22 Method and apparatus for providing secure application execution

Country Status (7)

Country Link
JP (1) JP5443599B2 (en)
KR (1) KR101457355B1 (en)
CN (1) CN102473224B (en)
BR (1) BRPI0924512A2 (en)
DE (1) DE112009005466T5 (en)
GB (2) GB2481563B (en)
WO (1) WO2011078855A1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016509321A (en) * 2013-03-06 2016-03-24 インテル・コーポレーション A starting point of trust for measuring virtual machines
JP2016537879A (en) * 2013-11-04 2016-12-01 アップル インコーポレイテッド Use of biometrics for payments based on NFC
JP2017117443A (en) * 2015-12-22 2017-06-29 インテル コーポレイション Method to increase cloud availability and silicon isolation using secure enclaves
JP2018509680A (en) * 2015-02-23 2018-04-05 インテル・コーポレーション Instructions and logic to branch the secure enclave process and establish a child enclave in the secure enclave page cache
JP6885640B1 (en) * 2020-10-01 2021-06-16 株式会社ラムダシステムズ Image processing device

Families Citing this family (62)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9087200B2 (en) 2009-12-22 2015-07-21 Intel Corporation Method and apparatus to provide secure application execution
US8739177B2 (en) 2010-06-21 2014-05-27 Intel Corporation Method for network interface sharing among multiple virtual machines
US9053042B2 (en) 2012-06-27 2015-06-09 Intel Corporation Method, system, and device for modifying a secure enclave configuration without changing the enclave measurement
US9519803B2 (en) * 2012-11-30 2016-12-13 Intel Corporation Secure environment for graphics processing units
NZ731337A (en) 2012-12-07 2019-02-22 Vertex Pharma Compounds useful as inhibitors of atr kinase
US9747102B2 (en) 2012-12-28 2017-08-29 Intel Corporation Memory management in secure enclaves
US9323686B2 (en) 2012-12-28 2016-04-26 Intel Corporation Paging in secure enclaves
US20140189246A1 (en) * 2012-12-31 2014-07-03 Bin Xing Measuring applications loaded in secure enclaves at runtime
US9058494B2 (en) * 2013-03-15 2015-06-16 Intel Corporation Method, apparatus, system, and computer readable medium to provide secure operation
US9430384B2 (en) * 2013-03-31 2016-08-30 Intel Corporation Instructions and logic to provide advanced paging capabilities for secure enclave page caches
US9087202B2 (en) * 2013-05-10 2015-07-21 Intel Corporation Entry/exit architecture for protected device modules
US20160085955A1 (en) * 2013-06-10 2016-03-24 Doosra, Inc. Secure Storing and Offline Transferring of Digitally Transferable Assets
US9338918B2 (en) 2013-07-10 2016-05-10 Samsung Electronics Co., Ltd. Socket interposer and computer system using the socket interposer
US20150033034A1 (en) * 2013-07-23 2015-01-29 Gideon Gerzon Measuring a secure enclave
US9698989B2 (en) * 2013-07-23 2017-07-04 Intel Corporation Feature licensing in a secure processing environment
US9767044B2 (en) * 2013-09-24 2017-09-19 Intel Corporation Secure memory repartitioning
US9501668B2 (en) 2013-09-25 2016-11-22 Intel Corporation Secure video ouput path
WO2015060858A1 (en) * 2013-10-24 2015-04-30 Intel Corporation Methods and apparatus for protecting software from unauthorized copying
WO2015094176A1 (en) 2013-12-17 2015-06-25 Intel Corporation Secure enclaves for use by kernel mode applications
KR101801567B1 (en) * 2013-12-19 2017-11-27 인텔 코포레이션 Policy-based trusted inspection of rights managed content
CN105745660B (en) 2013-12-19 2018-11-16 英特尔公司 For supporting the technology of multiple digital rights management agreements on a client device
US9448950B2 (en) 2013-12-24 2016-09-20 Intel Corporation Using authenticated manifests to enable external certification of multi-processor platforms
US9413765B2 (en) 2014-03-25 2016-08-09 Intel Corporation Multinode hubs for trusted computing
US9864861B2 (en) * 2014-03-27 2018-01-09 Intel Corporation Object oriented marshaling scheme for calls to a secure region
US9703733B2 (en) * 2014-06-27 2017-07-11 Intel Corporation Instructions and logic to interrupt and resume paging in a secure enclave page cache
US9705892B2 (en) 2014-06-27 2017-07-11 Intel Corporation Trusted time service for offline mode
CN105573831B (en) * 2014-10-13 2019-11-26 龙芯中科技术有限公司 Data transfering method and device
US10181027B2 (en) * 2014-10-17 2019-01-15 Intel Corporation Interface between a device and a secure processing environment
US9940456B2 (en) 2014-12-16 2018-04-10 Intel Corporation Using trusted execution environments for security of code and data
US9606940B2 (en) 2015-03-27 2017-03-28 Intel Corporation Methods and apparatus to utilize a trusted loader in a trusted computing environment
US9875189B2 (en) 2015-06-12 2018-01-23 Intel Corporation Supporting secure memory intent
US9716710B2 (en) * 2015-06-26 2017-07-25 Intel Corporation Technologies for virtualized access to security services provided by a converged manageability and security engine
US9996479B2 (en) * 2015-08-17 2018-06-12 Micron Technology, Inc. Encryption of executables in computational memory
US10061941B2 (en) * 2015-08-19 2018-08-28 Altera Corporation Systems and methods for multiport to multiport cryptography
US10031861B2 (en) * 2015-09-25 2018-07-24 Intel Corporation Protect non-memory encryption engine (non-mee) metadata in trusted execution environment
US10846409B2 (en) * 2015-11-19 2020-11-24 Nagravision S.A. Method to verify the execution integrity of an application in a target device
US10503931B2 (en) * 2016-05-09 2019-12-10 Arris Enterprises Llc Method and apparatus for dynamic executable verification
IE20170239A1 (en) * 2016-11-14 2018-05-16 Google Llc System of Enclaves
US10324857B2 (en) * 2017-01-26 2019-06-18 Intel Corporation Linear memory address transformation and management
CN108469986B (en) * 2017-02-23 2021-04-09 华为技术有限公司 Data migration method and device
CN110785746B (en) 2017-06-28 2024-04-12 Arm有限公司 Memory region locking
GB2564097B (en) * 2017-06-28 2019-10-23 Advanced Risc Mach Ltd Memory region locking
GB2563882B (en) * 2017-06-28 2019-10-23 Advanced Risc Mach Ltd Interrupting sequences of command actions performed upon memory regions
CN107392011B (en) * 2017-08-22 2019-11-22 海光信息技术有限公司 A kind of page transfer method
KR102080497B1 (en) * 2017-10-31 2020-02-24 삼성에스디에스 주식회사 Method for Exchanging Data between Channels of System based on Multi-Channel Blockchain and System thereof
US11943368B2 (en) 2017-11-03 2024-03-26 Microsoft Technology Licensing, Llc Provisioning trusted execution environment based on chain of trust including platform
US20190140846A1 (en) * 2017-11-03 2019-05-09 Microsoft Technology Licensing, Llc Provisioning trusted execution environment(s) based on chain of trust including platform
US10867092B2 (en) 2017-12-16 2020-12-15 Intel Corporation Avoiding asynchronous enclave exits based on requests to invalidate translation lookaside buffer entries
US10552344B2 (en) 2017-12-26 2020-02-04 Intel Corporation Unblock instruction to reverse page block during paging
US10970390B2 (en) * 2018-02-15 2021-04-06 Intel Corporation Mechanism to prevent software side channels
US10838773B2 (en) 2018-03-30 2020-11-17 Intel Corporation Techniques for dynamic resource allocation among cryptographic domains
US11556436B2 (en) 2018-08-22 2023-01-17 Intel Corporation Memory enclaves using process address space identifiers in a scalable input/output (I/O) virtualization (S-IOV) architecture
CN111614464B (en) * 2019-01-31 2023-09-29 创新先进技术有限公司 Method for safely updating secret key in blockchain, node and storage medium
CN110008736A (en) * 2019-01-31 2019-07-12 阿里巴巴集团控股有限公司 The method and node, storage medium of secret protection are realized in block chain
CN110032883B (en) * 2019-01-31 2020-05-29 阿里巴巴集团控股有限公司 Method, system and node for realizing privacy protection in block chain
CN110032885B (en) * 2019-02-19 2020-03-06 阿里巴巴集团控股有限公司 Method, node and storage medium for implementing privacy protection in block chain
CN109901880B (en) * 2019-02-28 2020-11-20 瑞芯微电子股份有限公司 Spinlock hardware circuit and electronic equipment
CN110069920A (en) * 2019-03-06 2019-07-30 上海交通大学 Guarantee the method and system of SGX safety based on virtualization
CN110096887B (en) 2019-03-22 2020-06-30 阿里巴巴集团控股有限公司 Trusted computing method and server
WO2019120335A2 (en) * 2019-04-19 2019-06-27 Alibaba Group Holding Limited Methods and devices for executing trusted applications on processor with support for protected execution environments
US11792644B2 (en) * 2021-06-21 2023-10-17 Motional Ad Llc Session key generation for autonomous vehicle operation
CN113821835B (en) * 2021-11-24 2022-02-08 飞腾信息技术有限公司 Key management method, key management device and computing equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002232417A (en) * 2001-01-31 2002-08-16 Toshiba Corp Microprocessor
JP2002353960A (en) * 2001-05-30 2002-12-06 Fujitsu Ltd Code performing device and code distributing method
JP2005099984A (en) * 2003-09-24 2005-04-14 Toshiba Corp On-chip multicore type tamper resistant processor
JP2007226481A (en) * 2006-02-22 2007-09-06 Fujitsu Ltd Secure processor
JP2008033457A (en) * 2006-07-26 2008-02-14 Internatl Business Mach Corp <Ibm> Method and central processing unit for processing encrypted software
JP2008210225A (en) * 2007-02-27 2008-09-11 Fujitsu Ltd Secure processor system, secure processor, and control method for it

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7934076B2 (en) * 2004-09-30 2011-04-26 Intel Corporation System and method for limiting exposure of hardware failure information for a secured execution environment
CA2593441A1 (en) * 2005-02-11 2006-08-17 Universal Data Protection Corporation Method and system for microprocessor data security
CN101116081A (en) * 2005-02-11 2008-01-30 通用数据保护公司 Method and system for microprocessor data security
US7657754B2 (en) * 2005-12-08 2010-02-02 Agere Systems Inc Methods and apparatus for the secure handling of data in a microcontroller
US8973094B2 (en) * 2006-05-26 2015-03-03 Intel Corporation Execution of a secured environment initialization instruction on a point-to-point interconnect system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002232417A (en) * 2001-01-31 2002-08-16 Toshiba Corp Microprocessor
JP2002353960A (en) * 2001-05-30 2002-12-06 Fujitsu Ltd Code performing device and code distributing method
JP2005099984A (en) * 2003-09-24 2005-04-14 Toshiba Corp On-chip multicore type tamper resistant processor
JP2007226481A (en) * 2006-02-22 2007-09-06 Fujitsu Ltd Secure processor
JP2008033457A (en) * 2006-07-26 2008-02-14 Internatl Business Mach Corp <Ibm> Method and central processing unit for processing encrypted software
JP2008210225A (en) * 2007-02-27 2008-09-11 Fujitsu Ltd Secure processor system, secure processor, and control method for it

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016509321A (en) * 2013-03-06 2016-03-24 インテル・コーポレーション A starting point of trust for measuring virtual machines
JP2016537879A (en) * 2013-11-04 2016-12-01 アップル インコーポレイテッド Use of biometrics for payments based on NFC
JP2018092651A (en) * 2013-11-04 2018-06-14 アップル インコーポレイテッド Using biometric authentication for nfc-based payment
US10121144B2 (en) 2013-11-04 2018-11-06 Apple Inc. Using biometric authentication for NFC-based payments
JP2021015623A (en) * 2013-11-04 2021-02-12 アップル インコーポレイテッドApple Inc. Using biometric authentication for nfc-based payment
JP7005725B2 (en) 2013-11-04 2022-01-24 アップル インコーポレイテッド Use of biometrics for NFC-based payments
JP2018509680A (en) * 2015-02-23 2018-04-05 インテル・コーポレーション Instructions and logic to branch the secure enclave process and establish a child enclave in the secure enclave page cache
JP2017117443A (en) * 2015-12-22 2017-06-29 インテル コーポレイション Method to increase cloud availability and silicon isolation using secure enclaves
JP6885640B1 (en) * 2020-10-01 2021-06-16 株式会社ラムダシステムズ Image processing device

Also Published As

Publication number Publication date
CN102473224A (en) 2012-05-23
GB2481563B (en) 2017-07-19
CN102473224B (en) 2016-10-12
BRPI0924512A2 (en) 2016-03-01
JP5443599B2 (en) 2014-03-19
GB2550698B (en) 2018-04-11
DE112009005466T5 (en) 2012-10-31
WO2011078855A1 (en) 2011-06-30
KR20120099472A (en) 2012-09-10
GB201709341D0 (en) 2017-07-26
GB2481563A (en) 2011-12-28
GB2550698A (en) 2017-11-29
GB201118724D0 (en) 2011-12-14
WO2011078855A9 (en) 2011-09-09
KR101457355B1 (en) 2014-11-04

Similar Documents

Publication Publication Date Title
US10885202B2 (en) Method and apparatus to provide secure application execution
JP5443599B2 (en) Method and apparatus for providing secure application execution
US8972746B2 (en) Technique for supporting multiple secure enclaves
US10685145B2 (en) Secure processor and a program for a secure processor
US10325118B2 (en) Cryptographic cache lines for a trusted execution environment
US10237059B2 (en) Diversified instruction set processing to enhance security
JP2005527019A (en) Multi-token seal and seal release
JP6068325B2 (en) Processor that provides secure application execution
JP5316592B2 (en) Secure processor program
JP6777288B2 (en) Processor
JP5365664B2 (en) Secure processor
JP6480403B2 (en) apparatus
JP6085320B2 (en) Processor, program, system and method

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130416

A601 Written request for extension of time

Free format text: JAPANESE INTERMEDIATE CODE: A601

Effective date: 20130716

A602 Written permission of extension of time

Free format text: JAPANESE INTERMEDIATE CODE: A602

Effective date: 20130723

A601 Written request for extension of time

Free format text: JAPANESE INTERMEDIATE CODE: A601

Effective date: 20130913

A602 Written permission of extension of time

Free format text: JAPANESE INTERMEDIATE CODE: A602

Effective date: 20130924

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20131003

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20131219

R150 Certificate of patent or registration of utility model

Ref document number: 5443599

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees