Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
BIP39について
Search
Yasuhiro Shimizu
June 03, 2019
Programming
230
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
BIP39について
Yasuhiro Shimizu
June 03, 2019
More Decks by Yasuhiro Shimizu
See All by Yasuhiro Shimizu
Jetpack Composeから始める、頑張らないVRT
yshrsmz
0
1.3k
Kotlin Multiplatform Projectを導入してみて
yshrsmz
1
1.2k
Android Fireside Chatまとめ
yshrsmz
3
2.4k
RxJava1からRxJava2へ
yshrsmz
0
120
Other Decks in Programming
See All in Programming
Kubernetes祭り #2 OP/ED
bells17
0
110
wkhtmltopdfの次どうするか問題2026
willnet
2
1.9k
自サークルのIdPからログアウトできるようになるまで
taiseiue
1
130
更なる可用性を求めて、5年間運用したKotlinのアプリケーションをGoでリプレイスする話
ken_tunc
0
460
モデルのリファクタリングが難しいと思ったら、そもそも複雑だったのはビジネス仕様だった ? / is-the-business-domain-the-real-complexity
hatsu38
0
450
Atomic Design, Enforced: Scaling Mobile Design Systems (next.app devCon / droidCon Berlin 2026)
steliosf
PRO
0
160
Compiling a real-world CLI tool to native with Static Hermes
tmikov2023
0
100
Agentic Software Factoryに、すごく賢いIF文を。 / super smart IF statement into the Agentic Software Factory.
rkaga
8
2k
mrbgem 三角測量 開発
ogom
0
220
AI が書く Go コードの品質を劇的に向上させる Linter: “declscope”
mpyw
0
490
見えないものを探る要求要件定義に必要な基本的思考 / invisible-requirement-thinking
minodriven
15
8.1k
IBM Bob でAI駆動開発『QC-Playbook』
ichirokano2
0
100
Featured
See All Featured
30 Presentation Tips
portentint
PRO
1
420
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
1
450
Utilizing Notion as your number one productivity tool
mfonobong
4
610
What's in a price? How to price your products and services
michaelherold
247
13k
Six Lessons from altMBA
skipperchong
29
4.5k
Color Theory Basics | Prateek | Gurzu
gurzu
1
480
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
320
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.6k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.8k
A designer walks into a library…
pauljervisheath
211
25k
Building Adaptive Systems
keathley
44
3.2k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.9k
Transcript
BIP39について 秘密鍵を安全に保管する
BIP39(Mnemonic Code)とは - 秘密鍵を簡単に覚えられる単語の組み合わせで表現する - 決定性ウォレット(deterministic wallet)のシード値の保存によく 使われる alarm boost
mom torch couple owner myself gift sugar tell ticket panther 27d28fc240b66cff0eb7bb89d9aa99f4dddc43954db4565c25b1226347e0b2a59 dd5281b6ce384606bc30479e3ab0f41702e27fd3442269b7b187f86601e8db1
対応言語 - 英語 - 日本語 - 韓国語 - 中国語(簡体字) -
中国語(繁体字) - フランス語 - イタリア語 ただ、Unicodeのnormalizationが必要な言語も多いので、英語が用いられることが多そ う(個人の感想です)
BIP39のステップ 1. Mnemonic Codeを生成 2. バイナリのシード値に変換
Mnemonic Codeの生成 1. 初期エントロピー(ENT)を取得(暗号学的にランダムな値。 32bits区切りで128-256bits) 2. エントロピーのSHA256ハッシュをとり、その結果の最初の (ENT/32)bitsをチェックサムとする(128bitのENTなら、ハッシュ の最初の4bits) 3.
チェックサムをENTの末尾に連結 4. 11bitsごとに区切る 5. 11bitsの数字をインデックスとして、ワードリストから単語を取得 する
None
Mnemonic Codeからシード値を得る 1. Mnemonic Codeとパスフレーズ(任意) 2. Mnemonic Codeと`mnemonic${パスフレーズ}`を PBKDF2(HMAC-SHA512)でハッシュ化。BIP39では2048回 ハッシュ化を行う(Key
Stretching)い、512bitsのシード値を得 る。 → あとはBIP32とかでよしなに
None
BIP39の派生 そもそもBIP39はElectrumというWalletのmnemonic code生成手 法をベースに、trezorの製造元によって提案された。 Electrumの作者はBIP39には欠点があるとして認めていない
Electrum Seed V1 - BIP39の元になった仕様 - ワードリストは1626(BIP39は2048) - シードとMnemonic Codeを相互変換可能
Electrum Seed V2〜 - BIP39の問題点を改善した実装 - ワードリストはBIP39と同じ - ワードリストなしに入力されたMnemonic Codeの間違いが検
出できる - Mnemonic Codeから生成に使われた仕様のバージョンを取 得できる
Electrum Seed V2でMnemonic Code取得 1. エントロピーの取得(暗号学的にランダムな値) 2. エントロピーとnonce(0から始まる正の整数)からmnemonic codeを取得 3.
mnemonic codeを`hmac_sha_512(b”Seed Version”, mnemonic)`して、バージョン コードが含まれているか確認。 4. 含まれていたら終了。含まれていなかったらnonceをインクリメントして、2-3を繰り 返す。