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
61
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
110
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.5k
GopherCon2018
ktr_0731
2
1.8k
Evans: more expressive gRPC client
ktr_0731
2
470
Other Decks in Programming
See All in Programming
How mixi2 Uses TiDB for SNS Scalability and Performance
kanmo
37
14k
Amazon Q Developer Proで効率化するAPI開発入門
seike460
PRO
0
110
負債になりにくいCSSをデザイナとつくるには?
fsubal
9
2.4k
Spring gRPC について / About Spring gRPC
mackey0225
0
220
『テスト書いた方が開発が早いじゃん』を解き明かす #phpcon_nagoya
o0h
PRO
2
220
Formの複雑さに立ち向かう
bmthd
1
850
Multi Step Form, Decentralized Autonomous Organization
pumpkiinbell
1
740
昭和の職場からアジャイルの世界へ
kumagoro95
1
380
Rails アプリ地図考 Flush Cut
makicamel
1
120
Unity Android XR入門
sakutama_11
0
160
Immutable ActiveRecord
megane42
0
140
PHPのバージョンアップ時にも役立ったAST
matsuo_atsushi
0
110
Featured
See All Featured
Fashionably flexible responsive web design (full day workshop)
malarkey
406
66k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
2.1k
Building Better People: How to give real-time feedback that sticks.
wjessup
367
19k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.4k
Automating Front-end Workflow
addyosmani
1368
200k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
Six Lessons from altMBA
skipperchong
27
3.6k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
27
1.9k
The Cult of Friendly URLs
andyhume
78
6.2k
A better future with KSS
kneath
238
17k
Unsuck your backbone
ammeep
669
57k
How to Ace a Technical Interview
jacobian
276
23k
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 グローバルサイン)