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
cris (supplementary material)
Search
ktr
January 11, 2018
Programming
0
64
cris (supplementary material)
supplementary material
ktr
January 11, 2018
Tweet
Share
More Decks by ktr
See All by ktr
Monorepo における Go テストの差分実行 / Running Differential Go Tests in a Monorepo
ktr_0731
0
120
Designing libraries in Go way
ktr_0731
6
1.5k
Go Modules and Proxy Walkthrough
ktr_0731
8
27k
ソフトウェアの複雑さに立ち向かう技術 / Tackling software complexity
ktr_0731
0
180
Fuzzy finder as a Go library
ktr_0731
3
5.8k
つよくてニューゲーム / NewGame++
ktr_0731
0
970
やはり俺の Go アプリケーション設計はまちがっている。 / My Go Application Design Is Wrong, As I Expected
ktr_0731
13
3.6k
GopherCon2018
ktr_0731
2
1.8k
Evans: more expressive gRPC client
ktr_0731
2
470
Other Decks in Programming
See All in Programming
Webフレームワークとともに利用するWeb components / JSConf.jp おかわり
spring_raining
1
130
Learning Kotlin with detekt
inouehi
1
190
未経験でSRE、はじめました! 組織を支える役割と軌跡
curekoshimizu
1
200
はじめての Go * WASM * OCR
sgash708
1
120
Expoによるアプリ開発の現在地とReact Server Componentsが切り開く未来
yukukotani
1
200
ソフトウェアエンジニアの成長
masuda220
PRO
12
2.2k
コミュニティ駆動 AWS CDK ライブラリ「Open Constructs Library」 / community-cdk-library
gotok365
2
260
AIレビュー導入によるCIツールとの共存と最適化
kamo26sima
1
210
Django NinjaによるAPI開発の効率化とリプレースの実践
kashewnuts
1
290
SwiftUI移行のためのインプレッショントラッキング基盤の構築
kokihirokawa
0
170
5分で理解する SOLID 原則 #phpcon_nagoya
shogogg
1
400
sappoRo.R #12 初心者セッション
kosugitti
0
280
Featured
See All Featured
Optimizing for Happiness
mojombo
377
70k
jQuery: Nuts, Bolts and Bling
dougneiner
63
7.7k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
Product Roadmaps are Hard
iamctodd
PRO
51
11k
Speed Design
sergeychernyshev
27
820
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.7k
[RailsConf 2023] Rails as a piece of cake
palkan
53
5.3k
How STYLIGHT went responsive
nonsquared
99
5.4k
Fontdeck: Realign not Redesign
paulrobertlloyd
83
5.4k
Writing Fast Ruby
sferik
628
61k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Building Applications with DynamoDB
mza
93
6.2k
Transcript
Blockchain を 利用したファイル改竄検知 !LUS@
ファイルの完全性の検証 ハッシュアルゴリズムによる検証
ファイルの完全性の検証 ハッシュアルゴリズムによる検証 hash := H(content) md5('hello') = b1946ac92492d2347c6235b4d2611184
ファイルの完全性の検証 ハッシュアルゴリズムによる検証 hash := H(content) md5('hello') = b1946ac92492d2347c6235b4d2611184 'hello' b1946ac92492d2347c6235b4d2611184
ファイルの完全性の検証 ハッシュアルゴリズムによる検証 hash := H(content) md5('hello') = b1946ac92492d2347c6235b4d2611184 'hello' b1946ac92492d2347c6235b4d2611184
hash := H(received_content) md5('hello') = b1946ac92492d2347c6235b4d2611184
ファイルの完全性の検証 ハッシュアルゴリズムによる検証 hash := H(content) md5('hello') = b1946ac92492d2347c6235b4d2611184 'bad hello'
b1946ac92492d2347c6235b4d2611184 hash := H(received_content) md5('hello') = b1946ac92492d2347c6235b4d2611184
ファイルの完全性の検証 ハッシュアルゴリズムによる検証 hash := H(content) md5('hello') = b1946ac92492d2347c6235b4d2611184 'bad hello'
b1946ac92492d2347c6235b4d2611184 hash := H(received_content) md5('bad hello') = 842dc2b34384799a1f1a3a1315ab1f5b
ファイルの完全性の検証 署名 + ハッシュアルゴリズムによる検証 hash := H(content) signature := SignByPrivateKey(hash)
ファイルの完全性の検証 署名 + ハッシュアルゴリズムによる検証 hash := H(content) signature := SignByPrivateKey(hash)
content public key signature
ファイルの完全性の検証 署名 + ハッシュアルゴリズムによる検証 hash := H(content) signature := SignByPrivateKey(hash)
content public key signature expectedHash := decodeByPublicKey(signature) actualHash := H(content) check expectedHash == actualHash
ファイルの完全性の検証 ファイル自体が改竄されると検出できない hash := H(badContent) signature := SignByPrivateKey(hash) content public
key signature expectedHash := decodeByPublicKey(signature) actualHash := H(content) check expectedHash == actualHash
Blockchain • bitcoin のコアを支える技術 • P2P のシステム • 記録された情報への改竄を検出でき、復元可能
Blockchain
Ethereum • bitcoin の Blockchain をベースにした派生 • スマートコントラクトを実装している
スマートコントラクト • Blockchain ネットワーク上で動くアプリケーション • アプリケーションの状態を変更する様なアクション (command) は Blockchain に記録される
• アプリケーションの保有するデータを改竄できない
今回のアプリのアーキテクチャ 1. generate keypair Upload File
今回のアプリのアーキテクチャ 1. generate keypair 2. create Ethereum account Upload File
今回のアプリのアーキテクチャ 1. generate keypair 3. store H(content) and own account
address 2. create Ethereum account Upload File
今回のアプリのアーキテクチャ 1. generate keypair 4. upload content with signature and
public key 3. store H(content) and own account address 2. create Ethereum account Upload File
今回のアプリのアーキテクチャ 1. generate keypair 4. upload content with signature and
public key 3. store H(content) and own account address 5. verify content by signature 2. create Ethereum account Upload File
今回のアプリのアーキテクチャ 1. generate keypair 4. upload content with signature and
public key 3. store H(content) and own account address 5. verify content by signature 2. create Ethereum account Upload File 6. store the content
今回のアプリのアーキテクチャ Share / Download File 1. generate shared URL
今回のアプリのアーキテクチャ Share / Download File 1. generate shared URL 2.
share the URL https://example.com/{hash}
今回のアプリのアーキテクチャ Share / Download File 1. generate shared URL 2.
share the URL https://example.com/{hash} 3. open the URL
今回のアプリのアーキテクチャ Share / Download File 1. generate shared URL 2.
share the URL https://example.com/{hash} 3. open the URL 4. verify hash and it's owner
今回のアプリのアーキテクチャ Share / Download File 1. generate shared URL 2.
share the URL https://example.com/{hash} 3. open the URL 5. verify hash and it's owner 4. verify hash and it's owner
今回のアプリのアーキテクチャ Share / Download File 1. generate shared URL 2.
share the URL https://example.com/{hash} 3. open the URL 5. verify hash and it's owner 6. return shared content 4. verify hash and it's owner
demo
応用 • KYC (Known Your Customer)
KYC (例: GMO グローバルサイン)