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
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
thread_parallel_with_free-threaded_Python_and_NumPy.pdf
riku_sakamoto
0
270
AIは賢い。でも実行環境は? CLIおじさんがAI時代に伝えたいこと ~ CLIおじさんがAI時代に伝えたいこと ~
curekoshimizu
1
230
新卒PdEのリアル
ryu1013
1
480
tsc.rip を支える技術 / Kyoto.なんか #8
susisu
0
4.4k
コンパウンドプロダクト開発のためのローカルプロセスマネージャー再発明 #layerxgo
izumin5210
0
660
Vibes Containers 〜AIで変わるコンテナ設計と運用〜
tkikuc
3
520
AWS DevOps Agentで インシデント対応をAIに任せたい
honmarkhunt
7
2.7k
Security issues being discussed on Web Platforms
petamoriken
0
570
LL言語やWebフレームワークのPostgreSQL対応 〜DBの機能がユーザーに届くまで〜
kentaroutakeda
0
150
GKE アップグレード前に知っておきたい Blue/Green と PDB の関係
stkk
0
160
What We Talk About When We Talk About XP
m_seki
2
460
初心者DevRelとして参加者だった私が、DevRel Talks!#2に登壇するまでにしてきたこと
sokohirai
0
360
Featured
See All Featured
Producing Creativity
orderedlist
PRO
348
41k
Rails Girls Zürich Keynote
gr2m
96
14k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
3k
Raft: Consensus for Rubyists
vanstee
141
7.7k
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
63
45k
The untapped power of vector embeddings
frankvandijk
2
1.9k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
560
GraphQLとの向き合い方2022年版
quramy
50
15k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
600
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
320
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.8k
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!!
ありがとうございました