Upgrade to Pro — share decks privately, control downloads, hide ads and more …

blockchain.tokyo#18-2019-03-26

 blockchain.tokyo#18-2019-03-26

55c65de66a523fad9f41b21e70dcfa29?s=128

Tomokazu Kozuma

March 26, 2019
Tweet

Transcript

  1. 01@$0%&Λ࢖ͬͨ#$)ͱ#47 ͷεϓϦοτํ๏ʹ͍ͭͯ Tomokazu Kozuma 2019 / 03 / 26 /

    TUE blockchain.tokyo #18
  2. A B O U T M Y S E L

    F ࣗݾ঺հ Tomokazu Kozuma @Tomokazu106 ౦ژ޻ۀେֶେֶӃଔۀޙɺαΠόʔΤʔδΣϯτͰεϚϗήʔϜͷαʔόɺΠϯ ϑϥશൠΛ୲౰ɻԾ૝௨՟ʹ͍ٕͭͯज़ϒϩάΛॻ͍ͯΔ͏ͪʹ຅಄͠ɺຊ৬ͱ ͯ͠஫ྗ͢ΔͨΊʹ(JODPʹೖࣾɻ(JODPͰ͸ϒϩοΫνΣʔϯͷϊʔυӡ༻ɺϋʔ υϑΥʔΫରԠɺόοΫΤϯυͳͲ޿ൣғΛ୲౰ɻ
  3. ·ͱΊͯͻͱͭʹ BITCOIN Blockchain BITCOIN CASH Blockchain LITECOIN Blockchain XRP(Ripple) Blockchain

    ETHEREUM CLASSIC Blockchain ETHEREUM Blockchain
  4. ෳ਺ͷԾ૝௨՟Λ·ͱΊͯ؅ཧ

  5. (JODPʹ͓͚Δ#47ରԠʹ͍ͭͯ • ࡢ೥຤ʹ#47Λ(JODPͰରԠ͢Δͷ͸ܾ·ͬͯͨ • ͔͠͠ɺ๏తʹ#47ϊʔυ͕ݐͯΒΕͳ͍ͱ͍͏͜ͱ Ͱਖ਼ࣜରԠͰ͖ͳ͔ͬͨ • #$)Λ҆શʹૹۚͰ͖ΔΑ͏ʹεϓϦοτػೳΛ࣮૷

  6. ֓ཁ • #$)ͱ#47ͷಛ௃ͱ໰୊఺ • ͭͷεϓϦοτํ๏ • 01@$)&$,%"5"4*(Λ࢖ͬͨεϓϦοτ A g e

    n d a
  7. #$)ͱ#47ͷಛ௃ͱ໰୊఺ P A R T 1

  8. #$)ͱ#47ͷಛ௃ • #$)͸#5$͔Β)'ʢ೥݄೔ʣ • #47͸#$)͔Β)'ʢ೥݄೔ʣ • ͲͪΒ΋ϒϩοΫαΠζΛେ͖͘͠ɺΦϯνΣʔϯͰ εέʔϥϏϦςΟ໰୊Λղܾ͢Δ͜ͱΛ໨ࢦ͍ͯ͠Δ T I

    T L E T E X T
  9. #$)ͱ#47ͷಛ௃ • 01@$0%&ͷ෮ݩɿ
 01@.6-ɺ01@-4)*'5ɺ01@34)*'5ɺ01@*/7&35 • εΫϦϓτ͋ͨΓ01@$0%&ͷ੍ݶΛऔΓআ͘ • ࠷େϒϩοΫαΠζΛ.#·Ͱ֦େ F e

    a t u r e o f B C H a n d B S V • ৽ن01@$0%&ɿ01@$)&$,%"5"4*( 7&3*':  • $BOPOJDBM5SBOTBDUJPO0SEFSJOHʢ$503ʣͷಋೖ B C H ɿ B i t c o i n A B C B S V ɿ n C h a i n
  10. #$)ͱ#47ͷ໰୊఺ • ϦϓϨΠϓϩςΫγϣϯػೳ͕ͳ͍ʢ#$)ʹ݄ಋೖ༧ఆʣ P r o b l e m

    • #$)Λૹۚ͢Δͱ#47΋ૹۚ͞Ε
 ˠτϥϯβΫγϣϯϦϓϨΠ͕ൃੜ • ͓٬༷͕ࢿ࢈Λ҆શʹ؅ཧͰ͖ΔΑ͏ʹ͢Δඞཁ͕͋Δ
 ˠεϓϦοτػೳΛ࣮૷
  11. ͭͷεϓϦοτํ๏ P A R T 2

  12. 5 5 S p l i t %VTU5SBOTBDUJPO O-PDL5JNF 01@$0%&

    ͭͷεϓϦοτํ๏
  13. %VTU5SBOTBDUJPO • ख਺ྉͱͯ͠औΓࠐ·Εͳ͍࠷௿ֹۚʢTBUʣͷ 6590Λ࢖༻ A b o u t D

    u s t T r a n s a c t i o n ? • #$)ʹ͔͠ଘࡏ͠ͳ͍%VTU5YΛΠϯϓοτʹؚΊͯ ૹۚ͢Δ • #47ͷνΣʔϯʹ͸ଘࡏ͠ͳ͍6590͕Πϯϓοτʹ ؚ·Ε͍ͯΔͨΊঝೝ͞Εͳ͍
  14. O-PDL5JNF • τϥϯβΫγϣϯʹࢦఆͰ͖Δύϥϝʔλ A b o u t n L

    o c k T i m e • ࢦఆͨ͠ϒϩοΫߴɺ6OJY5JNF·ͰϒϩοΫʹ औΓࠐ·Εͳ͍ • #$)ͱ#47ͷ࠷৽ϒϩοΫߴͷࠩΛར༻ͯ͠ εϓϦοτ͢Δํ๏
  15. εϓϦοτͷൺֱ εϓϦοτํ๏ ϝϦοτ σϝϦοτ %VTU5SBOTBDUJPO ࣮૷͕͍Βͳ͍ ༰қʹ࣮ߦͰ͖Δ εϓϦοτ͢Δʹ͸෼཭ࡁͷ6590͕ඞཁ શͯͷ΢ΥϨοτʹରͯ͠ૹۚ͢Δඞཁ͕͋Δ O-PDL5JNF

    ࣮૷΄΅͕͍Βͳ͍ #$)ͱ#47ͷϒϩοΫߴ͕཭Ε͍ͯΔඞཁ͕͋Δ ஌͕ࣝͳ͍ͱૹۚλΠϛϯά͕Θ͔Βͳ͍ 01@$0%& 01@$)&$,%"5"4*( ͍ͭͰ΋ԿճͰ΋ εϓϦοτͰ͖Δ ௐࠪͱ࣮૷͕গ͠େม
  16. 01@$0%&Λ࠾༻ͨ͠ཧ༝ • ೚ҙͷλΠϛϯάͰԿճ΋εϓϦοτͰ͖Δ
 ˠ̍ճ͋ͨΓԁ͘Β͍ • ஌͕ࣝͳͯ͘΋؆୯ʹ࣮ߦͰ͖Δ • ࣄۀऀଆͷίετෛ୲͕ͳ͍ R e

    a s o n t o U s e O P _ C O D E
  17. 01@$)&$,%"5"4*(Λ ࢖ͬͨεϓϦοτ P A R T 3

  18. 01@$)&$,%"5"4*(ͱ͸ʁ • ϒϩοΫνΣʔϯ֎ͷσʔλʢΦϥΫϧʣͷॺ໊ݕূΛߦ͑Δ A b o u t O P

    _ C H E C K D A T A S I G <signature> <message> <pubkey> OP_CHECKDATASIG S c r i p t • ΦϥΫϧ͕࢖͑ΔͷͰΞτϛοΫεϫοϓ΁ͷԠ༻ʹظ଴
  19. 5 S p l i t U s i n

    g P 2 P K H a n d P 2 S H εϓϦοτͷखॱ 3FEFFN4DSJQUͷߏஙͱղআ 01@$)&$,%"5"4*(Λ࢖ͬͨεϓϦοτํ๏
  20. εϓϦοτͷखॱ • εϓϦοτ͸ࣗ෼΁શֹૹۚΛճߦ͏ F l o w o f S

    p l i t • ճ໨͸01@$)&$,%"5"4*(Λ3FEFFN4DSJQUʹ ؚΉΞυϨεʹૹۚ͢Δ͜ͱ͕໨త • ճ໨ͷૹۚ͸01@$)&$,%"5"4*(ΛؚΉ6590Λ ղআͯ͠11,)ʹૹۚ͢Δ͜ͱ͕໨త
  21. ճ໨ͷશֹૹۚ • 01@$)&$,%"5"4*(ΛؚΉ14)ΞυϨεʹTBUૹۚ *OQVU 0VUQVU #$)#47 #$)#47 #$)#47 TBU #$)#47

    ͓௼Γ 14)"EESFTT 11,)"EESFTT • #47Ͱ͸14)ͷ6590͕࢖͑ͳ͍ͷͰ࠷௿ֹۚʹ͓ͯ͘͠
  22. ճ໨ͷશֹૹۚ • 01@$)&$,%"5"4*(Ͱ࡞ΒΕͨ6590ΛؚΜͩૹۚΛ͢Δ͜ ͱͰ෼཭Ͱ͖Δ *OQVU 0VUQVU શֹ#$) TBU #$)#47 ͓௼Γ

    14)"EESFTT 11,)"EESFTT 11,)"EESFTT • #47Ͱ࢖͑Δͷ͸ճ໨ͷૹۚͰ͓௼Γͱͯ͠ૹͬͨ෼͚ͩ
  23. 3FEFFN4DSJQUͷߏங • 3FEFFN4DSJQU಺Ͱॺ໊ݕূ͕׬݁͢ΔΑ͏ߏங B u i l d i n

    g R e d e e m S c r i p t <signature> <message> <pubkey> OP_CHECKDATASIGVERIFY R e d e e m S c r i p t • ͜Εͩͱ୭Ͱ΋ղআͯ͠࢖༻͢Δ͜ͱ͕Ͱ͖ͯ͠·͏ͷͰɺ 3FEFFN4DSJQUʹࣗ෼ͷެ։伴Λ૊ΈࠐΉ
  24. • 11,)Λ3FEFFN4DSJQUʹ૊ΈࠐΉ <signature> <message> <pubkey> OP_CHECKDATASIGVERIFY OP_DUP OP_HASH160 <20-bytes-pubkey-hash> OP_EQUALVERIFY

    OP_CHECKSIG R e d e e m S c r i p t 3FEFFN4DSJQUͷߏங B u i l d i n g R e d e e m S c r i p t
  25. 3FEFFN4DSJQUͷղআ • 3FEFFN4DSJQUͷαΠζ͕#ZUFTΛ௒͑ΔͷͰ 01@164)%"5"Λ࢖͏ L o c k i n

    g S c r i p t OP_HASH160 <20-bytes-redeem-script—hash> OP_EQUAL U n l o c k i n g S c r i p t <signature> <pubkey> OP_PUSHDATA1 redeem-script
  26. ·ͱΊ • ϦϓϨΠϓϩςΫγϣϯ͕ϓϩτίϧʹ૊Έࠐ·Ε͍ͯͳͯ͘΋ ࢓༷ʹΑͬͯ͸ରԠͰ͖Δ • 01@$0%&Λ࢖͏ͱϢʔβͷ೚ҙͷλΠϛϯάͰεϓϦοτͰ͖ɺ ίετ͕΄΅͔͔Βͳ͍ S u m

    m a r y