Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up for free
cris (supplementary material)
ktr
January 11, 2018
Programming
0
37
cris (supplementary material)
supplementary material
ktr
January 11, 2018
Tweet
Share
More Decks by ktr
See All by ktr
Designing libraries in Go way
ktr_0731
6
1.3k
Go Modules and Proxy Walkthrough
ktr_0731
8
25k
ソフトウェアの複雑さに立ち向かう技術 / Tackling software complexity
ktr_0731
0
140
Fuzzy finder as a Go library
ktr_0731
3
4.7k
つよくてニューゲーム / NewGame++
ktr_0731
0
800
やはり俺の Go アプリケーション設計はまちがっている。 / My Go Application Design Is Wrong, As I Expected
ktr_0731
13
3.2k
GopherCon2018
ktr_0731
2
1.5k
Evans: more expressive gRPC client
ktr_0731
2
330
自作 CLI ツールのワークフローとそれを支える技術 / the workflow of my CLI tool and technologies which supports it
ktr_0731
0
1.5k
Other Decks in Programming
See All in Programming
10年以上続くプロダクトの フロントエンド刷新プロジェクトのふりかえり
yotahada3
2
340
PHPDocにおける配列の型定義を少し知る
shimabox
1
140
ポケモンで学ぶiOS 16弾丸ツアー 🚅
giginet
PRO
1
620
PHP でガチの電卓を作る
memory1994
PRO
1
120
Writing Greener Java Applications
hollycummins
0
350
ITエンジニア特化型Q&Aサイトteratailを 言語、DB、クラウドなど フルリプレイスした話
leveragestech
0
430
Swift Observation
shiz
4
290
PHPアプリケーションにおけるアーキテクチャメトリクスについて / Architecture Metrics in PHP Applications
isanasan
1
280
T3 Stack and TypeScript ecosystem
quramy
3
780
Findy - エンジニア向け会社紹介 / Findy Letter for Engineers
findyinc
2
42k
jq at the Shortcuts
cockscomb
1
440
How to Fight Production Incidents?
asatarin
0
230
Featured
See All Featured
No one is an island. Learnings from fostering a developers community.
thoeni
12
1.5k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
29
7.9k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
7
580
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
10
1.3k
Fantastic passwords and where to find them - at NoRuKo
philnash
32
1.9k
Infographics Made Easy
chrislema
235
17k
Designing the Hi-DPI Web
ddemaree
273
32k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
657
120k
We Have a Design System, Now What?
morganepeng
37
5.9k
5 minutes of I Can Smell Your CMS
philhawksworth
198
18k
Keith and Marios Guide to Fast Websites
keithpitt
407
21k
For a Future-Friendly Web
brad_frost
166
7.8k
Transcript
Blockchain を 利用したファイル改竄検知
[email protected]
ファイルの完全性の検証 ハッシュアルゴリズムによる検証
ファイルの完全性の検証 ハッシュアルゴリズムによる検証 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 グローバルサイン)