Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
RustでIntel SGX(Rust LT#5)
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Kosuke Ito
May 27, 2019
Programming
880
1
Share
RustでIntel SGX(Rust LT#5)
Intel SGX, Intel SGX SDK, Rust SGX SDKについてざっくりお話させていただきました。
Kosuke Ito
May 27, 2019
Other Decks in Programming
See All in Programming
条件判定に名前、つけてますか? #phperkaigi #c
77web
2
940
PHPで TLSのプロトコルを実装してみる
higaki_program
0
730
今年もTECHSCOREブログを書き続けます!
hiraoku101
0
220
車輪の再発明をしよう!PHP で実装して学ぶ、Web サーバーの仕組みと HTTP の正体
h1r0
3
490
一度始めたらやめられない開発効率向上術 / Findy あなたのdotfilesを教えて!
k0kubun
3
2.8k
RSAが破られる前に知っておきたい 耐量子計算機暗号(PQC)入門 / Intro to PQC: Preparing for the Post-RSA Era
mackey0225
3
120
「速くなった気がする」をデータで疑う
senleaf24
0
130
Symfony + NelmioApiDocBundle を使った スキーマ駆動開発 / Schema Driven Development with NelmioApiDocBundle
okashoi
0
260
Linux Kernelの1文字のミスで 権限昇格ができた話
rqda
0
2.2k
forteeの改修から振り返るPHPerKaigi 2026
muno92
PRO
3
200
それはエンジニアリングの糧である:AI開発のためにAIのOSSを開発する現場より / It serves as fuel for engineering: insights from the field of developing open-source AI for AI development.
nrslib
1
820
Claude Codeログ基盤の構築
giginet
PRO
7
3.9k
Featured
See All Featured
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
160
Context Engineering - Making Every Token Count
addyosmani
9
790
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.4k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.7k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.8k
Designing for Performance
lara
611
70k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
170
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.2k
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.4k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
0
260
Crafting Experiences
bethany
1
110
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
190
Transcript
RustでIntel SGX Rust LT #5
自己紹介 名前:伊藤光佑 twitter: @thank_youkyou Aerial Partners エンジニア 暗号資産の会計システム「Gtax」
Intel SGX • Software Guard Extensions ハードウェアレベルでデータを攻撃者から守る技術 • enclave ◦
OSが攻撃されても安全なCPU内の保護領域 ◦ アプリケーションの機密な処理を分割する
何に使うの? • 様々なレイヤーの脅威を避けたいアプリケーション ◦ 暗号鍵管理 ◦ アイデンティティ管理 ◦ 機密記録
どうやって使うの? • ハードウェア ◦ SGXサポートのIntelプロセッサ • ソフトウェア ◦ Intel SGX
SDK ▪ C++でIntel SGXアプリケーションを書ける
C++?
Rustがいい!
Rust SGX SDK Intel SGX アプリケーションをRustでかける Rustのメモリ安全性を活用できる C/C++と同等に高速
アプリケーションコードの構成 enclave SGXによって保護したい処理 app enclave内の処理を呼び出す メインアプリケーション
コードの構成 • Enclave Definition Language • lib.rs • main.rs
Enclave Definition Language • enclaveで実行する関数のインターフェイスを定義する public sgx_status_t say_hello();
コードの構成 • Enclave Definition Language • lib.rs • main.rs
lib.rs 定義した関数を実装する • C言語から利用する #[no_mangle] pub extern "C" fn say_hello()
-> sgx_status_t { // Rustのplintlnマクロ println!("{}", "hello world"); // 戻り値は成功ステータス sgx_status_t::SGX_SUCCESS }
コードの構成 • Enclave Definition Language • lib.rs • main.rs
main.rs 定義した関数を呼び出す • C言語の関数として呼び出す • 定義した引数に加えてenclaveのidとstatusを受け取るretvalを渡す let result = unsafe
{ say_hello(enclave.geteid(), &mut retval) };
利用例 Enigma データを秘匿化したまま演算するP2Pネットワーク ブロックチェーン上のオフチェーンレイヤー プライベートデータに関する重い処理も可能な 分散型アプリケーションを作る • データマーケットプレイス • アイデンティティの管理
• 電子投票
SGXアプリ つくるならRust!!
ありがとうございました