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
49
What is Ethereum about tech layer
nakajo2011
0
310
The Ethereum design direction.
nakajo2011
0
44
Report of Devcon5 2019.10.17
nakajo2011
0
560
Compare of Libra and Ethereum
nakajo2011
1
430
What is Move language
nakajo2011
1
980
blockchain-changing-and-issues
nakajo2011
4
530
Thinking Scalability from DEX
nakajo2011
0
88
Truffleの紹介_in_hicon2018.pdf
nakajo2011
3
260
Other Decks in Programming
See All in Programming
メンテが命: PHPフレームワークのコンテナ化とアップグレード戦略
shunta27
0
120
Java Webフレームワークの現状 / java web framework at burikaigi
kishida
9
2.2k
1年目の私に伝えたい!テストコードを怖がらなくなるためのヒント/Tips for not being afraid of test code
push_gawa
0
200
バックエンドのためのアプリ内課金入門 (サブスク編)
qnighy
8
1.8k
WebDriver BiDiとは何なのか
yotahada3
1
140
個人アプリを2年ぶりにアプデしたから褒めて / I just updated my personal app, praise me!
lovee
0
350
CSS Linter による Baseline サポートの仕組み
ryo_manba
1
110
AWS Organizations で実現する、 マルチ AWS アカウントのルートユーザー管理からの脱却
atpons
0
150
Boost Performance and Developer Productivity with Jakarta EE 11
ivargrimstad
0
330
dbt Pythonモデルで実現するSnowflake活用術
trsnium
0
170
クリーンアーキテクチャから見る依存の向きの大切さ
shimabox
2
440
color-scheme: light dark; を完全に理解する
uhyo
5
390
Featured
See All Featured
Code Reviewing Like a Champion
maltzj
521
39k
A better future with KSS
kneath
238
17k
Designing for Performance
lara
604
68k
Building Flexible Design Systems
yeseniaperezcruz
328
38k
The Language of Interfaces
destraynor
156
24k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
30
4.6k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
Build The Right Thing And Hit Your Dates
maggiecrowley
34
2.5k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
YesSQL, Process and Tooling at Scale
rocio
172
14k
Producing Creativity
orderedlist
PRO
344
39k
Code Review Best Practice
trishagee
67
18k
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/