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
1
870
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
Windows on Ryzen and I
seosoft
0
290
Angular-Apps smarter machen mit Gen AI: Lokal und offlinefähig - Hands-on Workshop!
christianliebel
PRO
0
110
2026年は Rust 置き換えが流行る! / 20260220-niigata-5min-tech
girigiribauer
0
240
API Platformを活用したPHPによる本格的なWeb API開発 / api-platform-book-intro
ttskch
1
140
米国のサイバーセキュリティタイムラインと見る Goの暗号パッケージの進化
tomtwinkle
2
590
Codexに役割を持たせる 他のAIエージェントと組み合わせる実務Tips
o8n
4
1.3k
S3ストレージクラスの「見える」「ある」「使える」は全部違う ─ 体験から見た、仕様の深淵を覗く
ya_ma23
0
550
The free-lunch guide to idea circularity
hollycummins
0
180
GC言語のWasm化とComponent Modelサポートの実践と課題 - Scalaの場合
tanishiking
0
110
[SF Ruby Feb'26] The Silicon Heel
palkan
0
110
オブザーバビリティ駆動開発って実際どうなの?
yohfee
3
850
Agentic AI: Evolution oder Revolution
mobilelarson
PRO
0
180
Featured
See All Featured
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.4k
Information Architects: The Missing Link in Design Systems
soysaucechin
0
830
Measuring & Analyzing Core Web Vitals
bluesmoon
9
780
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
Designing Powerful Visuals for Engaging Learning
tmiket
0
280
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
350
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.8k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.2k
Everyday Curiosity
cassininazir
0
160
sira's awesome portfolio website redesign presentation
elsirapls
0
190
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
Believing is Seeing
oripsolob
1
84
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!!
ありがとうございました