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
60
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
39
Designing libraries in Go way
ktr_0731
6
1.5k
Go Modules and Proxy Walkthrough
ktr_0731
8
26k
ソフトウェアの複雑さに立ち向かう技術 / Tackling software complexity
ktr_0731
0
170
Fuzzy finder as a Go library
ktr_0731
3
5.6k
つよくてニューゲーム / NewGame++
ktr_0731
0
920
やはり俺の Go アプリケーション設計はまちがっている。 / My Go Application Design Is Wrong, As I Expected
ktr_0731
13
3.5k
GopherCon2018
ktr_0731
2
1.7k
Evans: more expressive gRPC client
ktr_0731
2
440
Other Decks in Programming
See All in Programming
いつか使える ObjectSpace / Maybe useful ObjectSpace
euglena1215
2
130
Modular Monolith Go Server with GraphQL Federation + gRPC
110y
1
580
あなたのアプリ、ログはでてますか?あるいはログをだしてますか? (Funabashi.dev用 軽量版)
uzulla
2
120
Developer Joy == Developer Productivity (really!)
hollycummins
1
180
Method Swizzlingを行うライブラリにおけるマルチモジュール設計
yoshikma
0
120
マルチモジュールにおけるテスト最適化
fxwx23
0
210
Prolog入門
qnighy
4
1k
KSPの導入・移行を前向きに検討しよう!
shxun6934
PRO
0
220
Google Sign-inの移行から始めるCredential Manager活用
clockvoid
0
220
サーバーレスで負荷試験!Step Functions + Lambdaを使ったk6の分散実行
shuntakahashi
6
1.5k
Go Code Generation at newmo / 2024-08-27 #newmo_layerx_go
genkey6
0
560
Amazon Neptuneで始める初めてのグラフDB ー グラフDBを使う意味を考える ー
satoshi256kbyte
2
260
Featured
See All Featured
Visualization
eitanlees
142
15k
What's new in Ruby 2.0
geeforr
340
31k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
246
1.3M
Infographics Made Easy
chrislema
239
18k
Adopting Sorbet at Scale
ufuk
73
8.9k
Design by the Numbers
sachag
277
19k
Happy Clients
brianwarren
96
6.6k
Build your cross-platform service in a week with App Engine
jlugia
228
18k
RailsConf 2023
tenderlove
28
810
Pencils Down: Stop Designing & Start Developing
hursman
119
11k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.2k
Web development in the modern age
philhawksworth
204
10k
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 グローバルサイン)