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.1k
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
33
What is Ethereum about tech layer
nakajo2011
0
260
The Ethereum design direction.
nakajo2011
0
42
Report of Devcon5 2019.10.17
nakajo2011
0
490
Compare of Libra and Ethereum
nakajo2011
1
390
What is Move language
nakajo2011
1
800
blockchain-changing-and-issues
nakajo2011
4
500
Thinking Scalability from DEX
nakajo2011
0
85
Truffleの紹介_in_hicon2018.pdf
nakajo2011
3
220
Other Decks in Programming
See All in Programming
TCAとKMPを用いた新規動画配信アプリ 「ABEMA Live」の設計
tomu28
1
110
『Railsオワコン』と言われる時代に、なぜブルーモ証券はRailsを選ぶのか
free_world21
0
250
SIMD Parallel Programming with the Vector API
josepaumard
0
180
Amazon SQSコンシューマー疎結合への旅 - 出張! #DevelopersIO IT技術ブログの中の人が語る勉強会 #3
quiver
0
270
PostmanでAPIの動作確認が楽になった話
h455h1
0
170
二郎系ラーメンのコールで学ぶ AST 解析
memory1994
PRO
7
1.7k
冗長なエラーログを削減し、スタックトレースを手に入れる / Reducing Verbose Error Logs and Obtaining Stack Traces
upamune
0
770
使ってみよう Azure AI Document Intelligence
kosmosebi
2
320
Prepare for Jakarta EE 11 - Performance and Developer Productivity
ivargrimstad
0
810
Elm 0.19.0 Changes
bkuhlmann
0
490
Behind VS Code Extensions for JavaScript / TypeScript Linnting and Formatting
unvalley
5
920
[技育CAMPアカデミア]アイディアを形に!【超入門】スマホアプリ開発〜リリースまでの流れをご紹介
teamlab
PRO
0
380
Featured
See All Featured
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
352
28k
Rebuilding a faster, lazier Slack
samanthasiow
73
8.2k
Building Your Own Lightsaber
phodgson
99
5.7k
How to name files
jennybc
65
93k
Robots, Beer and Maslow
schacon
PRO
155
7.9k
Docker and Python
trallard
34
2.7k
BBQ
matthewcrist
80
8.8k
Git: the NoSQL Database
bkeepers
PRO
422
63k
How to Ace a Technical Interview
jacobian
272
22k
How GitHub Uses GitHub to Build GitHub
holman
468
290k
Adopting Sorbet at Scale
ufuk
68
8.6k
WebSockets: Embracing the real-time Web
robhawkes
59
7k
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/