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.3k
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
64
What is Ethereum about tech layer
nakajo2011
0
360
The Ethereum design direction.
nakajo2011
0
66
Report of Devcon5 2019.10.17
nakajo2011
0
600
Compare of Libra and Ethereum
nakajo2011
1
440
What is Move language
nakajo2011
1
1.1k
blockchain-changing-and-issues
nakajo2011
4
560
Thinking Scalability from DEX
nakajo2011
0
97
Truffleの紹介_in_hicon2018.pdf
nakajo2011
3
290
Other Decks in Programming
See All in Programming
プログラミングどうやる? ~テスト駆動開発から学ぶ達人の型~
a_okui
0
190
気づいて!アプリからのSOS 〜App Store Connect APIで始めるパフォーマンス健康診断〜
waka12
0
250
AIで開発生産性を上げる個人とチームの取り組み
taniigo
0
120
Server Less Code More - コードを書かない時代に生きるサーバーレスデザイン / server-less-code-more
gawa
5
1.9k
どの様にAIエージェントと 協業すべきだったのか?
takefumiyoshii
1
520
実践AIチャットボットUI実装入門
syumai
7
2.3k
AIを活用したレシート読み取り機能の開発から得られた実践知 / AI Receipt Scan Practice
rockname
2
1.5k
開発者への寄付をアプリ内課金として実装する時の気の使いどころ
ski
0
320
私はどうやって技術力を上げたのか
yusukebe
41
16k
VisionFrameworkで実現する - プライバシーに配慮した「顔ぼかし」機能 / Face blurring with Vision Framework
imaizume
0
180
麻雀点数計算問題生成タスクから学ぶ Single Agentの限界と Agentic Workflowの底力
po3rin
5
2k
Go Conference 2025: Goで体感するMultipath TCP ― Go 1.24 時代の MPTCP Listener を理解する
takehaya
7
1.4k
Featured
See All Featured
Balancing Empowerment & Direction
lara
4
660
Build The Right Thing And Hit Your Dates
maggiecrowley
37
2.9k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
45
2.5k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.5k
Embracing the Ebb and Flow
colly
88
4.8k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
8
950
Designing for humans not robots
tammielis
254
25k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
140
34k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4k
Visualization
eitanlees
148
16k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
34
6.1k
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/