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
Developerが陥りやすい3つの罠
Search
nakajo2011
April 14, 2018
Programming
4
4.2k
Developerが陥りやすい3つの罠
Hi-Ether #2 LT発表資料
nakajo2011
April 14, 2018
Tweet
Share
More Decks by nakajo2011
See All by nakajo2011
Plasma_Overview_gbec20180928.pdf
nakajo2011
0
55
What is Ethereum about tech layer
nakajo2011
0
340
The Ethereum design direction.
nakajo2011
0
57
Report of Devcon5 2019.10.17
nakajo2011
0
580
Compare of Libra and Ethereum
nakajo2011
1
440
What is Move language
nakajo2011
1
1k
blockchain-changing-and-issues
nakajo2011
4
550
Thinking Scalability from DEX
nakajo2011
0
91
Truffleの紹介_in_hicon2018.pdf
nakajo2011
3
280
Other Decks in Programming
See All in Programming
ASP.NETアプリケーションのモダナイズ インフラ編
tomokusaba
1
400
ドメインモデリングにおける抽象の役割、tagless-finalによるDSL構築、そして型安全な最適化
knih
11
2k
[初登壇@jAZUG]アプリ開発者が気になるGoogleCloud/Azure+wasm/wasi
asaringo
0
130
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
44
29k
データの民主化を支える、透明性のあるデータ利活用への挑戦 2025-06-25 Database Engineering Meetup#7
y_ken
0
290
C++20 射影変換
faithandbrave
0
500
Team topologies and the microservice architecture: a synergistic relationship
cer
PRO
0
960
技術同人誌をMCP Serverにしてみた
74th
0
160
関数型まつりレポート for JuliaTokai #22
antimon2
0
140
AWS CDKの推しポイント 〜CloudFormationと比較してみた〜
akihisaikeda
3
300
What Spring Developers Should Know About Jakarta EE
ivargrimstad
0
150
イベントストーミングから始めるドメイン駆動設計
jgeem
4
870
Featured
See All Featured
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
281
13k
Build The Right Thing And Hit Your Dates
maggiecrowley
36
2.8k
Practical Orchestrator
shlominoach
188
11k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
35
2.3k
Speed Design
sergeychernyshev
31
1k
Designing for humans not robots
tammielis
253
25k
The Cult of Friendly URLs
andyhume
79
6.4k
How to Ace a Technical Interview
jacobian
277
23k
For a Future-Friendly Web
brad_frost
179
9.8k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
228
22k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
2.8k
Transcript
Copyright © 2018 HAW International Inc. All rights reserved. Developerが陥りやすい3つの罠
SmartContract以外のセキュリティーにも気をつけてい ますか?
Copyright © 2018 HAW International Inc. All rights reserved. 自己紹介
中城 元臣(Yukishige Nakajo) twitter: @nakajo github: nakajo2011 ・福岡の飯塚市でBlockchainの研究開発やってます。 ・HAW International所属 ・ethereumは2017/11から始めました。
Copyright © 2018 HAW International Inc. All rights reserved. 今日話すこと
SmartContract以外のセキュリティーにも気をつけてい ますか? 1. checksum利用してますか? 2. リプレイアタック意識してますか? 3. truffle-hdwallet-providerに潜む罠
checksum利用してますか?
Copyright © 2018 HAW International Inc. All rights reserved. 1.checksum利用してますか?
Copyright © 2018 HAW International Inc. All rights reserved. 1.checksum利用してますか?
• EIP-55で定義 • addressのhashをとる • hash値が8 >= 0を大文字にする
Copyright © 2018 HAW International Inc. All rights reserved. 1.checksum利用してますか?
Copyright © 2018 HAW International Inc. All rights reserved. 1.checksum利用してますか?
・Walletではchecksumを利用してる。 ・Dappsでは?利用してない人が実は多いのでは? ・ethereum-util.jsなどを使えば簡単にチェック可能 ・Dappsでもaddressを各必要のある場所は(たとえ静的なデータ だとしても)checksumを活用しよう。 ・ICAPというフォーマットも提案されているけどまだ主流じゃな い。。。
リプレイアタック意識していますか?
Copyright © 2018 HAW International Inc. All rights reserved. 2.リプレイアタック意識していますか?
・EIP-155以前では同一のaddresから生成されたtransactionは mainnetとtestnetなど区別なく利用可能
Copyright © 2018 HAW International Inc. All rights reserved. 2.リプレイアタック意識していますか?
・EIP-155でsignature生成時にchain idを含めるようにしてリプレ イアタックをできなくした。 ・でも下位互換を持たせるためchain id = 0のtransactionは相変 わらずリプレイアタックの対象となる
Copyright © 2018 HAW International Inc. All rights reserved. 2.リプレイアタック意識していますか?
Geth
Copyright © 2018 HAW International Inc. All rights reserved. 2.リプレイアタック意識していますか?
• EIP-155で解決された。でも下位互換として残ってる。 • nodeにsignを依頼する場合は多分大丈夫。ethereumjs-txや ganache-cliなどで生成されたtransactionは確認した方がよ い。 • meta-transactionなど、代替支払いの仕組みを作る場合は特 に注意が必要になると思う。
truffle-hdwallet-providerに 潜む罠
Copyright © 2018 HAW International Inc. All rights reserved. 3.truffle-hdwallet-providerに潜む罠
infura.io利用する時はtruffle-hdwallet-provider使うことが多い
Copyright © 2018 HAW International Inc. All rights reserved. 3.truffle-hdwallet-providerに潜む罠
Copyright © 2018 HAW International Inc. All rights reserved. 3.truffle-hdwallet-providerに潜む罠
https://ropsten.etherscan.io/address/0x959fd7ef9089b7142b6b908dc3a8af7aa8ff0fa1
Copyright © 2018 HAW International Inc. All rights reserved. 3.truffle-hdwallet-providerに潜む罠
・mnemonicのvalidationをしていない ・空文字でも動いちゃう ・PR #10を出してるのでそっちを使ってね https://github.com/trufflesuite/truffle-hdwallet-provider/pull/10
Copyright © 2018 HAW International Inc. All rights reserved. おわり
ブログも宜しく http://y-nakajo.hatenablog.com/