├── Bitcoin Ethereum Cryptography.md ├── Bitcoin Ethereum Cryptography.pdf ├── README.md └── images ├── eth-encrypt.png └── export.png /Bitcoin Ethereum Cryptography.md: -------------------------------------------------------------------------------- 1 | autoscale: true 2 | theme: Courier, 6 3 | footer: 比特币、以太坊的加密技术 4 | slidenumbers: true 5 | slidecount: true 6 | 7 | 8 | [.hide-footer] 9 | [.slidenumbers: false] 10 | # [fit] 比特币、以太坊的加密技术 11 | 12 | ## [fit] Cryptography for Bitcoin/Ethereum 13 | 14 | 15 |







16 | 17 | 陈建明 (@ashchan) 18 | 2017-05-21 @ 亿咖啡 19 | 20 | --- 21 | 22 | ## 数字加密货币 23 | 24 | > `CryptoCurrency` 25 | 26 | Bitcoin, Ethereum, ... 27 | 28 | 加密技术是数字加密货币(区块链技术)的基石。 29 | 30 | 31 | ^ 没有这些加密技术的支持,区块链技术将会崩坏。 32 | 33 | --- 34 | 35 | ## 何谓加解密? 36 | 37 | 简单的说,**加密**:将**明文**(plaintext)转换成**密文**(ciphertext)的过程。**解密**:将密文转换回明文的过程。 38 | 39 | $$ 40 | 加密(plaintext) = ciphertext 41 | $$ 42 | 43 | ### 组成部分 44 | 45 | * 算法 46 | * 密钥 47 | 48 | --- 49 | 50 | [.build-lists: true] 51 | ## 加密技术的主要关注点 52 | 53 | * 信息(明文)的保密 54 | * 信息完整性验证 55 | * 信息发布的不可抵赖性(数字签名) 56 | 57 | 58 | ^ 信息完整性验证: 传递过程中不丢信息(失真) 59 | 60 | ^ 信息发布的不可抵赖性:接收方可以验证发送方身份 61 | 62 | --- 63 | 64 | ### 加密技术分类 65 | 66 | * **对称加密** 67 | - 双方共享**密钥(码)**(secret key,あんごう),加密传输基于密钥安全而非算法安全。 68 | - 加密与解密使用同一算法。 69 | - 破解难度主要取决于密钥复杂度。 70 | * **非对称加密**(公开密钥加密) 71 | - 使用密钥对(公钥 publickey、私钥 privatekey)。 72 | - 不传递**私钥**。 73 | - 加解密可能使用多种规则和算法。 74 | - 安全性既不依赖算法的保密,也不依赖于传递密钥的途径。 75 | 76 | 77 | ^ 对称加密的密钥,确切的说是密码,它并不一定要是密钥格式的。 78 | 79 | --- 80 | 81 | ## 加密技术:对称加密 82 | 83 | * 加解密使用相同的密钥。 84 | * 双方需要知道密钥,密钥传递不方便,容易泄露。 85 | * 多方之间交换信息,需要多个密钥。 86 | 87 | 假设明文为 p = Hello,密钥为 s = secret, 密文为 c = a^%$#@!。 88 | 89 | $$ 90 | 加密(p, s) = c 91 | $$ 92 | 93 | $$ 94 | 解密(c, s) = p 95 | $$ 96 | 97 | --- 98 | 99 | ## 加密技术:非对称加密 100 | 101 | * 公钥可以向任何人公布。 102 | * 仅自己持有私钥。 103 | * 私钥签名的密文可以用公钥验证;公钥加密的密文可以用私钥解密。 104 | * **不可能**从公钥逆向推算出私钥。 105 | 106 | ### Example 107 | 108 | **SSH**,RSA 算法,基于两个大素数的乘积。上传 publickey 至服务器。 109 | 110 | --- 111 | 112 | ## 加密技术:非对称加密 113 | 114 | ### 柯克霍夫原則(Kerckhoffs' principle) 115 | 116 | > A cryptosystem should be secure even if everything about the system, except the key, is public knowledge. 117 | -- Auguste Kerckhoffs 118 | 119 | 密码系统就算被所有人知道其运作步骤,(只要私钥不泄漏,)仍然是安全的。 120 | 121 | 122 | ^ 破解难度取决于私钥长度。以RSA算法为例,目前几乎无法对稍微长点的私钥加密的内容进行暴力破解。 123 | 124 | --- 125 | 126 | ## 比特币和以太坊加密技术 127 | 大量使用对称加密和非对称加密,以及相关技术。 128 | 129 | * 加密、解密(如上述) 130 | * Hash、Message digest(哈希,SHA256, RIPEMD160) 131 | * Checksum(校验和) 132 | * 编码(Base64,Base58) 133 | 134 | 135 | ^ Hash: 摘要,对不定长度的数据进行换算,计算出固定长度的不容易冲突的结果。 136 | 137 | ^ Checksum:校验和,对数据进行冗余校验和完整性检查。 138 | 139 | ^ 编码:将二进制数据转化为普通字符,更易于阅读和判别。 140 | 141 | --- 142 | 143 | ## 比特币及其加密技术 144 | 145 | * 私钥:32字节 146 | * 公钥:65字节,由私钥计算得来 147 | * 地址(**`13yfsYAzjvH4kCR13rwTrq2iigYKJeiHFw`**) (Base 58,长度34个字符,其实就是公钥的摘要) 148 | * 钱包(保存、管理私钥,签名交易,发送接受转账;相当于银行账号) 149 | 150 | --- 151 | 152 | ## 比特币私钥 153 | 154 | `18E14A7B6A307F426A94F8114701E7C8E774E7F9A47E2C2035DB29A206321725` 155 | 156 | * 32字节(unsigned 256 bit) 157 | * 随机数 158 | * 重要!重要!重要!数字资产,保密。 159 | 160 | 161 | ^ 私钥或助记词,无密码保护的原始数据。失去私钥,就失去了一切。 162 | 163 | ^ 自己管理私钥(钱包),国家无法禁止你转账(提币)。 164 | 165 | --- 166 | 167 | ## 比特币公钥 168 | 169 | * 压缩形式,33位,前缀为`0x02`或`0x03` (`0x02` + x) 170 | * 未压缩形式,65位,前缀位 `0x04` (`0x04` + x + y) 171 | 172 | **04**50863AD64A87AE8A2FE83C1AF1A8403CB53F53E486D8511DAD8A04887E5B2352**2CD470243453A299FA9E77237716103ABC11A1DF38855ED6F2EE187E9C582BA6** 173 | 174 | ### 计算摘要 175 | 176 | ```swift 177 | let hash = SHA256(publickey) // 32字节 178 | // => 600FFE422B4E00731A59557A5CCA46CC183944191006324A447BDB2D98D4B408 179 | let data = RIPEMD160(hash) // 公钥 Hash160,20字节,减少数据传输量 180 | // => 010966776006953D5567439E5E39F86A0D273BEE 181 | ``` 182 | 183 | --- 184 | 185 | ## 比特币地址 186 | 187 | * `13yfsYAzjvH4kCR13rwTrq2iigYKJeiHFw`,1 开头 188 | * `3J98t1WpEZ73CNmQviecrnyiWrnqRhWNLy`,3 开头,Multi-signature,由多个私钥生成 189 | 190 | 注:以下都用1开头的老地址为例 191 | 192 | --- 193 | 194 | ## 比特币地址 195 | 196 | ![inline](https://en.bitcoin.it/w/images/en/thumb/9/9b/PubKeyToAddr.png/790px-PubKeyToAddr.png) 197 | 198 | Source: https://en.bitcoin.it/wiki/File:PubKeyToAddr.png 199 | 200 | --- 201 | 202 | ## 比特币地址 203 | 204 | 由公钥推导而来。 205 | 206 | ```swift, [.highlight: 1-2] 207 | let prefix = "00" // 版本,0x00 for Main Network 208 | let data = "0109667760069..." // 公钥 Hash160 摘要 209 | let hash = SHA256(SHA256(prefix + data)) 210 | let checksum = hash.prefix(4字节) // => D61967F6 211 | let address = Base56(prefix + data + checksum) 212 | // => 16UwLL9Risc3QfPqBUvKofHmBQ7wMtjvM 213 | ``` 214 | --- 215 | 216 | ## 比特币地址 217 | 218 | ```swift, [.highlight: 3-4] 219 | let prefix = "00" // 版本,0x00 for Main Network 220 | let data = "0109667760069..." // 公钥 Hash160 摘要 221 | let hash = SHA256(SHA256(prefix + data)) 222 | let checksum = hash.prefix(4字节) // => D61967F6 223 | let address = Base56(prefix + data + checksum) 224 | // => 16UwLL9Risc3QfPqBUvKofHmBQ7wMtjvM 225 | ``` 226 | --- 227 | 228 | ## 比特币地址 229 | 230 | ```swift, [.highlight: 5-6] 231 | let prefix = "00" // 版本,0x00 for Main Network 232 | let data = "0109667760069..." // 公钥 Hash160 摘要 233 | let hash = SHA256(SHA256(prefix + data)) 234 | let checksum = hash.prefix(4字节) // => D61967F6 235 | let address = Base56(prefix + data + checksum) 236 | // => 16UwLL9Risc3QfPqBUvKofHmBQ7wMtjvM 237 | ``` 238 | 239 | --- 240 | 241 | ## 以太坊及其加密技术 242 | 243 | 站在巨人 Bitcoin 肩膀上,使用了 Bitcoin 的许多相关加密算法和技术。 244 | 245 | * 私钥(及助记词 Mnemonic) 246 | * 公钥 247 | * 地址 248 | * **`0x8E552aE4Edd69832d98d7AAeC6611Cc0a90c4C55`** 249 | * 十六进制, 不包含0x长度40 250 | * 钱包(deterministic wallets) 251 | 252 | --- 253 | 254 | ## 以太坊加密算法 255 | 256 | ![right 90%](images/eth-encrypt.png) 257 | 258 | * 前述 Bitcoin 使用的大部分算法 259 | * PBKDF2 260 | * Scrypt 261 | * Secp256k1 262 | * Keccak256 263 | * AES128 264 | 265 | --- 266 | 267 | ## 以太坊私钥及助记词 268 | 269 | ### 助记词(mnemonic) 270 | 271 | * 12个(或更多个)英文(或其他语言)单词 272 | * Seed: 种子,经 SHA256 Hash 运算后,以它为 index 从词典里随机取出12个单词即为助记词 273 | * 助记词推导 Seed:配合一个用户指定的密码,使用 PBKDF2 和 HMAC-SHA512 算法计算出种子 274 | * Bitcoin 提案 BIP39,BIP32 275 | 276 | See https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki & https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki 277 | 278 | --- 279 | 280 | [.build-lists: true] 281 | ## 👉豆知识:保护以太坊资产 282 | 283 | ![right 50%](images/export.png) 284 | 285 | 采用以下一种或多种措施 286 | 287 | * 记录并保护好**私钥** 288 | * 记录并保护好**助记词** 289 | * 导出钱包文件(**keystore**)并牢记密码 290 | * 注:大部分钱包软件包括 imToken 在内不支持导出私钥。 291 | 292 | 293 | ^ 助记词与私钥等价,都没有任何保护。 294 | 295 | ^ 私钥不容易记录,助记词很好的解决了这个问题。 296 | 297 | ^ 钱包文件的密码一定不能忘记。 298 | 299 | --- 300 | 301 | ## 以太坊私钱包 302 | 303 | * `HD` (Hierarchical deterministic wallets) 304 | * `V3` (官方格式第3版) 305 | * 包含数据: 306 | * 指定(对称)加密算法 307 | * 加密参数 308 | * 私钥的密文 309 | * 地址(可以不包含) 310 | 311 | 简单解析一下 V3 格式 312 | 313 | --- 314 | 315 | ### 以太坊 V3 钱包 316 | 317 | ```javascript, [.highlight: 19] 318 | { 319 | "crypto" : { 320 | "cipher" : "aes-128-ctr", 321 | "cipherparams" : { 322 | "iv" : "6087dab2f9fdbbfaddc31a909735c1e6" 323 | }, 324 | "ciphertext" : "5318b4d5bcd28de64ee5559e671353e16f075ecae9f99c7a79a38af5f869aa46", 325 | "kdf" : "pbkdf2", 326 | "kdfparams" : { 327 | "c" : 262144, 328 | "dklen" : 32, 329 | "prf" : "hmac-sha256", 330 | "salt" : "ae3cd4e7013836a3df6bd7241b12db061dbe2c6785853cce422d148a624ce0bd" 331 | }, 332 | "mac" : "517ead924a9d0dc3124507e3393d175ce3ff7c1e96529c6c555ce9e51205e9b2" 333 | }, 334 | "id" : "3198bc9c-6672-5ab3-d995-4942343ae5b6", 335 | "address" : 8e552ae4edd69832d98d7aaec6611cc0a90c4c55, 336 | "version" : 3 337 | } 338 | ``` 339 | --- 340 | 341 | ### 以太坊 V3 钱包 342 | 343 | ```javascript, [.highlight: 8] 344 | { 345 | "crypto" : { 346 | "cipher" : "aes-128-ctr", 347 | "cipherparams" : { 348 | "iv" : "6087dab2f9fdbbfaddc31a909735c1e6" 349 | }, 350 | "ciphertext" : "5318b4d5bcd28de64ee5559e671353e16f075ecae9f99c7a79a38af5f869aa46", 351 | "kdf" : "pbkdf2", // pbkdf2 或 scrypt 352 | "kdfparams" : { 353 | "c" : 262144, 354 | "dklen" : 32, 355 | "prf" : "hmac-sha256", 356 | "salt" : "ae3cd4e7013836a3df6bd7241b12db061dbe2c6785853cce422d148a624ce0bd" 357 | }, 358 | "mac" : "517ead924a9d0dc3124507e3393d175ce3ff7c1e96529c6c555ce9e51205e9b2" 359 | }, 360 | "id" : "3198bc9c-6672-5ab3-d995-4942343ae5b6", 361 | "address" : 8e552ae4edd69832d98d7aaec6611cc0a90c4c55, 362 | "version" : 3 363 | } 364 | ``` 365 | --- 366 | 367 | ### 以太坊 V3 钱包加密密码 368 | 369 | * `Derived key`: 根据密码、kdf 算法、kdf 参数(包含 salt)计算出。这个key 用于加解密私钥。 370 | * `kdf`: key derivation function,pbkdf2 或 scrypt 371 | * `kdfparams`: KDF-dependent static and dynamic parameters to the KDF function 372 | 373 | --- 374 | 375 | ### 以太坊 V3 钱包 (PBKDF2) 376 | 377 | ```javascript 378 | { 379 | "crypto" : { 380 | "cipher" : "aes-128-ctr", 381 | "cipherparams" : { 382 | "iv" : "6087dab2f9fdbbfaddc31a909735c1e6" 383 | }, 384 | "ciphertext" : "5318b4d5bcd28de64ee5559e671353e16f075ecae9f99c7a79a38af5f869aa46", 385 | "kdf" : "pbkdf2", 386 | "kdfparams" : { 387 | "c" : 262144, 388 | "dklen" : 32, 389 | "prf" : "hmac-sha256", 390 | "salt" : "ae3cd4e7013836a3df6bd7241b12db061dbe2c6785853cce422d148a624ce0bd" 391 | }, 392 | "mac" : "517ead924a9d0dc3124507e3393d175ce3ff7c1e96529c6c555ce9e51205e9b2" 393 | }, 394 | "id" : "3198bc9c-6672-5ab3-d995-4942343ae5b6", 395 | "address" : 8e552ae4edd69832d98d7aaec6611cc0a90c4c55, 396 | "version" : 3 397 | } 398 | ``` 399 | 400 | 401 | ^ PBKDF2: Password-Based Key Derivation Function 2。重复多次计算,增加破解难度。 402 | 403 | --- 404 | 405 | ### 以太坊 V3 钱包 (PBKDF2) 406 | 407 | ```javascript, [.highlight: 8-14] 408 | { 409 | "crypto" : { 410 | "cipher" : "aes-128-ctr", 411 | "cipherparams" : { 412 | "iv" : "6087dab2f9fdbbfaddc31a909735c1e6" 413 | }, 414 | "ciphertext" : "5318b4d5bcd28de64ee5559e671353e16f075ecae9f99c7a79a38af5f869aa46", 415 | "kdf" : "pbkdf2", 416 | "kdfparams" : { 417 | "c" : 262144, // Number of iterations 418 | "dklen" : 32, // Length for the derived key. Must be >= 32. 419 | "prf" : "hmac-sha256", // Must be hmac-sha256 420 | "salt" : "ae3cd4e7013836a3df6bd7241b12db061dbe2c6785853cce422d148a624ce0bd" 421 | }, 422 | "mac" : "517ead924a9d0dc3124507e3393d175ce3ff7c1e96529c6c555ce9e51205e9b2" 423 | }, 424 | "id" : "3198bc9c-6672-5ab3-d995-4942343ae5b6", 425 | "address" : 8e552ae4edd69832d98d7aaec6611cc0a90c4c55, 426 | "version" : 3 427 | } 428 | ``` 429 | 430 | --- 431 | 432 | ### 以太坊 V3 钱包 (scrypt) 433 | 434 | ```javascript 435 | { 436 | "crypto" : { 437 | "cipher" : "aes-128-ctr", 438 | "cipherparams" : { 439 | "iv" : "83dbcc02d8ccb40e466191a123791e0e" 440 | }, 441 | "ciphertext" : "d172bf743a674da9cdad04534d56926ef8358534d458fffccd4e6ad2fbde479c", 442 | "kdf" : "scrypt", 443 | "kdfparams" : { 444 | "dklen" : 32, 445 | "n" : 262144, 446 | "r" : 1, 447 | "p" : 8, 448 | "salt" : "ab0c7876052600dd703518d6fc3fe8984592145b591fc8fb5c6d43190334ba19" 449 | }, 450 | "mac" : "2103ac29920d71da29f15d75b4a16dbe95cfd7ff8faea1056c33131d846e3097" 451 | }, 452 | "id" : "3198bc9c-6672-5ab3-d995-4942343ae5b6", 453 | "address" : 8e552ae4edd69832d98d7aaec6611cc0a90c4c55, 454 | "version" : 3 455 | } 456 | ``` 457 | --- 458 | 459 | ### 以太坊 V3 钱包 (scrypt) 460 | 461 | ```javascript, [.highlight: 8-15] 462 | { 463 | "crypto" : { 464 | "cipher" : "aes-128-ctr", 465 | "cipherparams" : { 466 | "iv" : "83dbcc02d8ccb40e466191a123791e0e" 467 | }, 468 | "ciphertext" : "d172bf743a674da9cdad04534d56926ef8358534d458fffccd4e6ad2fbde479c", 469 | "kdf" : "scrypt", 470 | "kdfparams" : { 471 | "dklen" : 32, 472 | "n" : 262144, // Hashing rounds 473 | "r" : 1, 474 | "p" : 8, 475 | "salt" : "ab0c7876052600dd703518d6fc3fe8984592145b591fc8fb5c6d43190334ba19" 476 | }, 477 | "mac" : "2103ac29920d71da29f15d75b4a16dbe95cfd7ff8faea1056c33131d846e3097" 478 | }, 479 | "id" : "3198bc9c-6672-5ab3-d995-4942343ae5b6", 480 | "address" : 8e552ae4edd69832d98d7aaec6611cc0a90c4c55, 481 | "version" : 3 482 | } 483 | ``` 484 | 485 | 486 | ^ script: 特点是使用高内存,增加破解难度。 487 | 488 | --- 489 | 490 | ### 以太坊 V3 钱包创建过程 491 | 492 | 1. 设置用户密码(passphrase) 493 | 2. 生成随机私钥、salt、iv 494 | 3. 选择 KDF 算法(pbkdf2 或 scrypt) 495 | 4. 计算 ciphertext(`AES-128-CBC` 或 `AES-128-CTR`)、 mac 和 地址 496 | 5. 保存为 JSON 文件 497 | 498 | 注:私钥使用 AES 单向加密为 cipher text。 499 | 500 | #### See 501 | 502 | * V1 Spec: https://github.com/ethereum/go-ethereum/wiki/Passphrase-protected-key-store-spec 503 | * V3 Spec: https://github.com/ethereum/wiki/wiki/Web3-Secret-Storage-Definition 504 | 505 | --- 506 | 507 | ### 👉豆知识:术语 508 | 509 | * `passphrase`: 密码 510 | * `salt`: 盐?😅 随机数据,防止针对 hash 算法的彩虹攻击 511 | * `iv`: initialization vector 512 | * `mac`: message authentication code 513 | * `hmac`: hash-based message authentication code 514 | 515 | --- 516 | 517 | ### 以太坊 V3 钱包加解密 518 | 519 | ```swift 520 | // 加密(创建钱包) 521 | let private_key = generate_privatekey() // 随机生成 522 | let derived_key = kdf(passphrase, kdfprams) 523 | let cipher_text = aes_encrypt(derived_key.first_16_bytes, iv, private_key) 524 | // cipher: The key for the cipher is the leftmost 16 bytes of the derived key 525 | let mac = sha3(derived_key.last_16_bytes, cipher_text) 526 | // mac: SHA3 (keccak-256) of the concatenation of the last 16 bytes of 527 | // the derived key together with the full ciphertext 528 | 529 | // 解密(使用、导出钱包,转账等) 530 | let derived_key = kdf(passphrase, kdfprams) 531 | let private_key = aes_decrypt(derived_key.first_16_bytes, iv, cipher_text) 532 | let mac = sha3(derived_key.last_16_bytes, cipher_text) 533 | verify(mac) // 比较 JSON 中的 mac 值与计算出的值 534 | ``` 535 | 536 | --- 537 | 538 | 539 | ### 以太坊 V3 钱包 cipher 540 | 541 | ```javascript, [.highlight: 2-7, 16-17] 542 | { 543 | "crypto" : { 544 | "cipher" : "aes-128-ctr", // 对称加密算法。老版本仅使用 AES-128-CBC,V3 使用 AES-128-CTR 或更强算法 545 | "cipherparams" : { 546 | "iv" : "83dbcc02d8ccb40e466191a123791e0e" // 128-bit initialisation vector for the cipher. 547 | }, 548 | "ciphertext" : "d172bf743a674da9cdad04534d56926ef8358534d458fffccd4e6ad2fbde479c", 549 | "kdf" : "scrypt", 550 | "kdfparams" : { 551 | "dklen" : 32, 552 | "n" : 262144, 553 | "r" : 1, 554 | "p" : 8, 555 | "salt" : "ab0c7876052600dd703518d6fc3fe8984592145b591fc8fb5c6d43190334ba19" 556 | }, 557 | "mac" : "2103ac29920d71da29f15d75b4a16dbe95cfd7ff8faea1056c33131d846e3097" 558 | // SHA3 (keccak-256) of the concatenation of the last 16 bytes of the derived key together with the full ciphertext 559 | }, 560 | "id" : "3198bc9c-6672-5ab3-d995-4942343ae5b6", 561 | "address" : 8e552ae4edd69832d98d7aaec6611cc0a90c4c55, 562 | "version" : 3 563 | } 564 | ``` 565 | 566 | --- 567 | 568 | ### 以太坊 V3 钱包 cipher 569 | 570 | ```javascript, [.highlight: 2-7, 16-17] 571 | { 572 | "crypto" : { 573 | "cipher" : "aes-128-ctr", // 对称加密算法。老版本仅使用 AES-128-CBC,V3 使用 AES-128-CTR 或更强算法 574 | "cipherparams" : { 575 | "iv" : "83dbcc02d8ccb40e466191a123791e0e" // 128-bit initialisation vector for the cipher. 576 | }, 577 | "ciphertext" : "d172bf743a674da9cdad04534d56926ef8358534d458fffccd4e6ad2fbde479c", 578 | "kdf" : "scrypt", 579 | "kdfparams" : { 580 | "dklen" : 32, 581 | "n" : 262144, 582 | "r" : 1, 583 | "p" : 8, 584 | "salt" : "ab0c7876052600dd703518d6fc3fe8984592145b591fc8fb5c6d43190334ba19" 585 | }, 586 | "mac" : "2103ac29920d71da29f15d75b4a16dbe95cfd7ff8faea1056c33131d846e3097" 587 | // SHA3 (keccak-256) of the concatenation of the last 16 bytes of the derived key together with the full ciphertext 588 | }, 589 | "id" : "3198bc9c-6672-5ab3-d995-4942343ae5b6", 590 | "address" : 8e552ae4edd69832d98d7aaec6611cc0a90c4c55, 591 | "version" : 3 592 | } 593 | ``` 594 | 595 | --- 596 | 597 | ## 👉豆知识:保护以太坊资产(续) 598 | 599 | * 妥善保存私钥或助记词 600 | * 妥善备份钱包文件(keystore)并牢记密码 601 | * 私钥或助记词可以用来在任何时候导入成为钱包 602 | * 钱包文件密码丢失便**无法**使用和恢复 603 | 604 | --- 605 | 606 | ## [fit] ありがとう 607 | ### Q&A -------------------------------------------------------------------------------- /Bitcoin Ethereum Cryptography.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashchan/bitcoin-ethereum-cryptography/6359d87543df6463fffe2a2085d5f3fa22e9961f/Bitcoin Ethereum Cryptography.pdf -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 比特币、以太坊加密技术 2 | 3 | 2017年5月21日在东京[亿咖啡](http://ecafe.tokyo)做的一个关于比特币、以太坊区块链加密技术的分享。 4 | 5 | 主要面向开发人员,不过也包含一些钱包格式、私钥保护等方面的内容。 6 | 7 | ## Slide 工具 8 | 9 | 演讲材料使用 Markdown 格式编写,用 Deckset 播放。已导出的 [PDF 格式文件](https://github.com/ashchan/bitcoin-ethereum-cryptography/blob/master/Bitcoin%20Ethereum%20Cryptography.pdf)在同一目录下。 10 | 11 | 12 | [The MIT License](https://jameschen.mit-license.org/license.html) 13 | 14 | Copyright (c) 2017 [James Chen](https://ashchan.com/) ([@ashchan](https://twitter.com/ashchan)) 15 | -------------------------------------------------------------------------------- /images/eth-encrypt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashchan/bitcoin-ethereum-cryptography/6359d87543df6463fffe2a2085d5f3fa22e9961f/images/eth-encrypt.png -------------------------------------------------------------------------------- /images/export.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashchan/bitcoin-ethereum-cryptography/6359d87543df6463fffe2a2085d5f3fa22e9961f/images/export.png --------------------------------------------------------------------------------