Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
RustでIntel SGX(Rust LT#5)
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Kosuke Ito
May 27, 2019
Programming
900
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
更なる可用性を求めて、5年間運用したKotlinのアプリケーションをGoでリプレイスする話
ken_tunc
0
470
Starting & Sustaining Code-Based E2E Testing for Non-Coding QA Teams( #jasstniigata )
teyamagu
PRO
1
960
ソニーのクラウド共通基盤の変遷とAI時代の開発スタイルに合わせた進化 / The Journey of Sony’s Common Cloud Platform and Its Evolution for AI-Native Development
kenjiyoneyama
0
250
re:Inventに行く前に知っておきたい現地参加のノウハウ
nokomoro3
0
400
プロダクトコードからライブラリの境界を見つける
elmetal
PRO
0
110
Streamlitで実現する自然言語データアプリ開発
ayumu_yamaguchi
1
350
SalesForceを内製化!? ~ HR事業を支える顧客管理基盤のインフラを大公開 ~
oku053
0
160
Herb in Rails 8.2: Your ERB views, now HTML-aware @ Rails World 2026, Austin, Texas
marcoroth
0
200
AIに “答え“を書かせるのを やめてみた
___akari11
0
110
IBM Bob でAI駆動開発『QC-Playbook』
ichirokano2
0
110
dotNET_vulnclicker_intro.pdf
deka_morita
0
130
自サークルのIdPからログアウトできるようになるまで
taiseiue
1
130
Featured
See All Featured
Ruling the World: When Life Gets Gamed
codingconduct
0
390
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
840
Tell your own story through comics
letsgokoyo
1
1.1k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
280
WENDY [Excerpt]
tessaabrams
14
40k
Leo the Paperboy
mayatellez
10
2.4k
YesSQL, Process and Tooling at Scale
rocio
174
15k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
400
Technical Leadership for Architectural Decision Making
baasie
3
600
BBQ
matthewcrist
90
10k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
203
77k
Building a Scalable Design System with Sketch
lauravandoore
464
34k
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!!
ありがとうございました