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
Kosuke Ito
May 27, 2019
Programming
1
840
RustでIntel SGX(Rust LT#5)
Intel SGX, Intel SGX SDK, Rust SGX SDKについてざっくりお話させていただきました。
Kosuke Ito
May 27, 2019
Tweet
Share
Other Decks in Programming
See All in Programming
A2A プロトコルを試してみる
azukiazusa1
2
1.1k
地方に住むエンジニアの残酷な現実とキャリア論
ichimichi
5
1.3k
既存デザインを変更せずにタップ領域を広げる方法
tahia910
1
240
datadog dash 2025 LLM observability for reliability and stability
ivry_presentationmaterials
0
110
生成AIコーディングとの向き合い方、AIと共創するという考え方 / How to deal with generative AI coding and the concept of co-creating with AI
seike460
PRO
1
330
プロダクト志向なエンジニアがもう一歩先の価値を目指すために意識したこと
nealle
0
110
なぜ適用するか、移行して理解するClean Architecture 〜構造を超えて設計を継承する〜 / Why Apply, Migrate and Understand Clean Architecture - Inherit Design Beyond Structure
seike460
PRO
1
690
関数型まつりレポート for JuliaTokai #22
antimon2
0
150
すべてのコンテキストを、 ユーザー価値に変える
applism118
2
790
5つのアンチパターンから学ぶLT設計
narihara
1
110
AIエージェントはこう育てる - GitHub Copilot Agentとチームの共進化サイクル
koboriakira
0
380
FormFlow - Build Stunning Multistep Forms
yceruto
1
190
Featured
See All Featured
A designer walks into a library…
pauljervisheath
207
24k
It's Worth the Effort
3n
185
28k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
The Language of Interfaces
destraynor
158
25k
Into the Great Unknown - MozCon
thekraken
39
1.9k
Six Lessons from altMBA
skipperchong
28
3.8k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Adopting Sorbet at Scale
ufuk
77
9.4k
Agile that works and the tools we love
rasmusluckow
329
21k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
138
34k
Building Better People: How to give real-time feedback that sticks.
wjessup
367
19k
Automating Front-end Workflow
addyosmani
1370
200k
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!!
ありがとうございました