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
BBc-1 ハンズオン : さまざまな証明書の登録とその検証(ウェブ版) / BBc-1 Ha...
Search
beyond-blockchain.org
December 02, 2020
Technology
0
170
BBc-1 ハンズオン : さまざまな証明書の登録とその検証(ウェブ版) / BBc-1 Hands on: Registry for Certificates and Verification (on Web)
BBc-1 の開発中の共通ライブラリと汎用レジストリライブラリ、レッジャーサブシステム、および certify-web サンプルアプリケーションを用いたチュートリアルのスライドです。
beyond-blockchain.org
December 02, 2020
Tweet
Share
More Decks by beyond-blockchain.org
See All by beyond-blockchain.org
BBc-2 ハンズオン さまざまな証明書の登録とその検証 / BBc-2 Hands-on Registration and Verification of Certificates
beyondblockchain
0
98
BBc-2 ハンズオン 基本インストール / BBc-2 hands-on Basic Installation
beyondblockchain
0
56
BBc-1 ハンズオン : RFID タグによる物流追跡 / BBc-1 Hands-on : Using RFID Tags for Logistics Tracking
beyondblockchain
0
65
BBc-1 ハンズオン : さまざまな証明書の登録とその検証 / BBc-1 Hands on: Registry for Certificates and Verification
beyondblockchain
1
230
BBc-1 ハンズオン : デジタル通貨の送金とスワップを通して学ぶBBc-1 トランザクション / BBc-1 Hands on: Digital Currency Transfer and Swap
beyondblockchain
2
390
BBc-1 ハンズオン : インストールとファイル内容証明 / BBc-1 Hands-on : Installation and File-content Proof
beyondblockchain
2
1.3k
BBc-1 ハンズオン : Ethereum によるレッジャーサブシステム / BBc-1 Hands-on : Ledger Subsystem with Ethereum
beyondblockchain
1
660
BBc トラスト / BBc Trust
beyondblockchain
1
150
BBc-1 設計文書 / BBc-1 (Beyond Blockchain One) Design Paper
beyondblockchain
0
140
Other Decks in Technology
See All in Technology
大幅アップデートされたRagas v0.2をキャッチアップ
os1ma
2
540
OpenAIの蒸留機能(Model Distillation)を使用して運用中のLLMのコストを削減する取り組み
pharma_x_tech
4
570
Oracle Cloud Infrastructure:2024年12月度サービス・アップデート
oracle4engineer
PRO
0
210
多領域インシデントマネジメントへの挑戦:ハードウェアとソフトウェアの融合が生む課題/Challenge to multidisciplinary incident management: Issues created by the fusion of hardware and software
bitkey
PRO
2
110
ガバメントクラウドのセキュリティ対策事例について
fujisawaryohei
0
560
PHP ユーザのための OpenTelemetry 入門 / phpcon2024-opentelemetry
shin1x1
1
360
KubeCon NA 2024 Recap / Running WebAssembly (Wasm) Workloads Side-by-Side with Container Workloads
z63d
1
250
社内イベント管理システムを1週間でAKSからACAに移行した話し
shingo_kawahara
0
190
Amazon Kendra GenAI Index 登場でどう変わる? 評価から学ぶ最適なRAG構成
naoki_0531
0
120
Fanstaの1年を大解剖! 一人SREはどこまでできるのか!?
syossan27
2
170
宇宙ベンチャーにおける最近の情シス取り組みについて
axelmizu
0
110
権威ドキュメントで振り返る2024 #年忘れセキュリティ2024
hirotomotaguchi
2
760
Featured
See All Featured
Facilitating Awesome Meetings
lara
50
6.1k
Why Our Code Smells
bkeepers
PRO
335
57k
StorybookのUI Testing Handbookを読んだ
zakiyama
27
5.3k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Become a Pro
speakerdeck
PRO
26
5k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
665
120k
Into the Great Unknown - MozCon
thekraken
33
1.5k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
520
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
132
33k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5.1k
Transcript
BBc-1 ( )
[email protected]
https://speakerdeck.com/beyondblockchain BBc-1 — ( ) —
2021-11-20 – p.1/30
BBc-1 ( ) BBc-1 BBc-1 — ( ) — 2021-11-20
– p.2/30
BBc-1 BBc-1 ( ) / (1) (2) (3) BBc-1 —
( ) — 2021-11-20 – p.3/30
#JUDPJO ##D$PSF ϨοδϟʔαϒγεςϜ ΞϓϦέʔγϣϯ ͦ ͷ ଞ ͞ · ͟
· ͳ Ξ ϓ Ϧ ͷ Մ ೳ ੑ ڞ௨ϥΠϒϥϦ ##D ։ൃ߲ Ҭ ௨ ՟ Ξ ϓ Ϧ ϙ Π ϯ τ Ξ ϓ Ϧ དྷ ྺ ূ ໌ Ξ ϓ Ϧ ʜ ॳظʹ͓͍ͯଘࡏূ໌Λґଘ ΞϯΧϦϯά ֤ϊʔυʹ͓͚Δهʹ ֤छσʔλϕʔεΛར༻Մೳ TRMJUF.Z42-ͦͷଞ%# BBc-1 σδλϧ௨՟ϥΠϒϥϦ ͦͷଞͷϥΠϒϥϦ CCDMJC 1ZUIPO (P +4 FUD Bitcoin Ethereum ( ) (Proof of Context) ( ) ( ) BBc-1 — ( ) — 2021-11-20 – p.4/30
Python3 bbc1 : https://speakerdeck.com/beyondblockchain/bbc-1-hands-on-installation-and-file-content-proof : https://speakerdeck.com/beyondblockchain/bbc-1-hands-on-ledger-subsystem-with-ethereum bbc1-lib-std ( ) bbc1-lib-registry
( ) BBc-1 — ( ) — 2021-11-20 – p.5/30
GitHub git clone $ git clone -b develop https://github.com/beyond-blockchain/bbc1-lib-std.git $
cd bbc1-lib-std tar pip (Python ) $ python setup.py sdist $ pip install dist/bbc1-lib-std-0.19.tar.gz dist tar pip install BBc-1 — ( ) — 2021-11-20 – p.6/30
( SQLite3 ) ( ) ( ) ( ) (
) BBc-1 — ( ) — 2021-11-20 – p.7/30
GitHub git clone ( ) $ git clone -b develop
https://github.com/beyond-blockchain/bbc1-lib-registry.git $ cd bbc1-lib-registry tar pip (Python ) $ python setup.py sdist $ pip install dist/bbc1-lib-registry-0.8.tar.gz dist tar pip install bbc_core.py BBc-1 — ( ) — 2021-11-20 – p.8/30
(registry) XML XML , etc. BBc-1 — ( ) —
2021-11-20 – p.9/30
Certify Web API & Certify Web BBc-1 — ( )
— 2021-11-20 – p.10/30
Certify Web Certify Web bbc1-lib-registry API & bbc-lib-std API JSON
( ) XML ( ) (= ) Certify Web API (API ) BBc-1 — ( ) — 2021-11-20 – p.11/30
Certify Web GitHub git clone $ git clone https://github.com/beyond-blockchain/examples.git $
cd examples/certify-web GitHub API & index.py BBc-1 $ python index.py (API ) http://localhost:5000 BBc-1 — ( ) — 2021-11-20 – p.12/30
Certify Web / (1) Certify Web JSON { "id": "AR-1838B",
"title": "I Am the Walrus", "artist": "The Beatles", "writer": "Lennon-McCartney", "year": "1967" } “proof” Merkle Proof ( ) BBc-1 — ( ) — 2021-11-20 – p.13/30
( ) จ ॻ จ ॻ จ ॻ
จ ॻ จ ॻ O μΠδΣετ μΠδΣετ μΠδΣετ μΠδΣετ μΠδΣετ μΠδΣετ μΠδΣετ حͷ߹ ෳ͢Δ ɾจॻ Λಘͨ" ࢯɺಉ࣌ʹূ໌ཁૉͱͯ͠ɺϒϧʔͰࣔ͞ΕΔμΠδΣετͱ֤ʑ͕ࠨӈͷͲͪΒʹҐஔ͢Δ͔Λड͚औΔɻ ɾ" ࢯจॻ ͷμΠδΣετ͔Β࢝Ίͯɺ࿈͖݁͢Ұ࿈ͷμΠδΣετΛΔ͜ͱʹͳΔͷͰɺϚʔΫϧϧʔτʹࢸΔ·Ͱͷ ɹܭࢉΛ࠶ݱͰ͖ɺಘΒΕͨϚʔΫϧϧʔτ͕ &UIFSFVN εϚʔτίϯτϥΫτʹه͞Ε͍ͯΔͱҰக͢Δ͜ͱΛ֬ೝͰ͖Δɻ ɾͦͷܭࢉΛߦ͢Δͷ͕DFSUJGZXFCͷαʔϏε ݪཧͷཧղͱඞཁͳใ͕͋Ε୭Ͱ࠶ݱͰ͖Δ ূ໌͞ΕΔ ɻ ه͢Δ ಡΈग़ͤΔ ূ໌Λ ඞཁͱ͢Δऀʹ ։ࣔ͞ΕΔใ ˞##Dɺ͜ͷߏΛอଘ ɹ͍ͯ͠Δ͕ɺαϒπϦʔΛ ɹূ໌ཁૉԽͯͨ͠͠ޙɺ ɹূ໌͢Δ্Ͱ##D ෆཁ ެ։͞ΕΔใ ϚʔΫϧϧʔτ Ϛ ồ Ϋ ϧ γ ε ς Ϝ ͕ อ ͠ ֤ Ϣ ồ β ʹ ෦ త ʹ ͑ Δ ʜʜ ʜʜ ʜʜ ʜʜ ʜʜ μΠδΣετ μΠδΣετ μΠδΣετ μΠδΣετ μΠδΣετ μΠδΣετ &UIFSFVNϒϩοΫνΣʔϯ ʜ ʜ ##DϥΠϒϥϦ ূ໌ॻΞϓϦͰ࣮ݱ BBc-1 — ( ) — 2021-11-20 – p.14/30
Certify Web / (2) JSON “id”: (bbc1-lib-registry ) “digest”: SHA-256
SHA-256 /api/digest API “_docs”: ( ; ) “proof”: ( ) Merkle Proof “privkey”: ( ) ( ) - /api/keypair API ( ) “pubkey”: ( ) “sig”: (pubkey ) “algo”: algo, sig, pubkey /api/sign API ( ) BBc-1 — ( ) — 2021-11-20 – p.15/30
Certify Web / (3) “proof” "proof": { "spec": { "subsystem":
"ethereum", "network": "goerli", "contract": "BBcAnchor", "contract_address": "0x8c6DB26Ab0eAaDcB46438DDEEE7baD2271e2df71", "block": 9098749 }, "subtree": [ { "position": "left", "digest": "6578c8c585be7aa25e5619cedfbc02820c223d667a2561b92c9de9656fded793" }, : # ] } BBc-1 — ( ) — 2021-11-20 – p.16/30
(1) ( ) (bbc_core.py ) $ curl -X POST http://localhost:5000/api/setup
domain id (“certify_web_domain” ) 7bc5dc8c1f3c4dc16e165beac165d73e4cb60530ac0b11bc433f6fba517d67b7 “./.bbc1_app_support” index.py bbc1-lib-registry BBc-1 — ( ) — 2021-11-20 – p.17/30
(2) bbc_core.py $ eth_subsystem_tool.py -w ~/.bbc1 -d config_tree 100 30
100 30 API/ bbc_core.py $ eth_subsystem_tool.py -w ~/.bbc1 -d enable bbc_core.py index.py BBc-1 — ( ) — 2021-11-20 – p.18/30
URL http://localhost:5000/cert/ (API : /api/register [POST]) (API : /api/proof [GET])
(API : /api/verify [GET]) (API : /api/verify [GET]) “i-am-the-walrus-cert.json” “ishindenshin-cert.json” ( ) “i-am-the-walrus-cert.json” → Verify Certificate API Ethereum 1 ( ) BBc-1 — ( ) — 2021-11-20 – p.19/30
API JSON BBc-1 — ( ) — 2021-11-20 – p.20/30
(1) “beatles-singles-doc.json” → Register Document 30 Ethereum ( ) 1
→ Get Certificate “Download Certificate” proof JSON → Verify Certificate BBc-1 — ( ) — 2021-11-20 – p.21/30
(2) JSON { "id": "5099920311971", "title": "Penny Lane", "artist": "The
Beatles", "writer": "Lennon-McCartney", "year": "1967" } ( ) Generate Key Pair API Return Values “privkey” ( “pubkey” ) JSON “year” ( ) “privkey” Sign Document API Return Values “algo” “sig” “pubkey” 3 “privkey” 3 (“privkey” ) BBc-1 — ( ) — 2021-11-20 – p.22/30
(1) ( ) “ishindenshin-cert.json” { "id": "YLR-709A", "title": " ",
"artist": "YMO", "writer": [ {"name": " "}, {"name": " "}, {"name": " "}, {"name": " "} ], "year": "1983", : } BBc-1 — ( ) — 2021-11-20 – p.23/30
(2) ( ) Get Digest { "writer": [ {"name": "
"}, {"name": " "}, {"name": " "}, {"name": " "} ] } { "name": " " } “digest” “writer” “name” BBc-1 — ( ) — 2021-11-20 – p.24/30
(3) ( ) { "id": "YLR-709A", "title": " ", "artist":
"YMO", "digest": "bca7d161ae5fce25a55e888e4704f506282b402846132fa9b38d2fb6b72dc405", "year": "1983", : } “writer” BBc-1 — ( ) — 2021-11-20 – p.25/30
(4) ( ) { "id": "YLR-709A", "title": " ", "artist":
"YMO", "writer": [ {"digest": "5413e837a58878d2b077d14358f7769c8ae791f9deb0475d58d53ff8de1b8973"}, {"name": " "}, : } . . . ( ) ( ) ( ) BBc-1 — ( ) — 2021-11-20 – p.26/30
ID { "id": "4445 4558 1689", "name": "Wednesday Addams", "born":
"1980-02-12", "address": "0001 Cemetery Lane", "public-key": "04d49e0786a37efce8552d6fd1566d7cfd86f110d4d95f1...4edb", "algo": "ecdsa-p256v1", "sig": "609b390f9486110d1ba39fc59cc46f1c2aa31ae8e40d3454c05a42...48e2", "pubkey": "0479c6676de61b41b7d0291b338f3279671d649f0a71bbb495...4bd1", } (Merkle) Ethereum ID BBc-1 — ( ) — 2021-11-20 – p.27/30
*%Χʔυจॻ JEJE OBNF8FEOFTEBZ"EEBNTOBNF 8FEOFTEBZ"EEBNT ͷͷ ࣏ࣗମͷͷ CPSOCPSO BEESFTT$FNFUFSZ-BOFBEESFTT QVCMJDLFZEFDFECQVCMJDLFZ *%
Χʔυจॻ ͷμΠδΣετ ॺ໊͖ *% Χʔυจॻ ͷμΠδΣετ ࿈͔݁ͯ͠Β ܭࢉ͢Δ ॺ໊Λݕূ͠ɺ ޭͨ͠Β ࿈͔݁ͯ͠Β ܭࢉ͢Δ EJHFTU EJHFTU EJHFTU BMHPSJUIN TJHOBUVSF QVCMJDLFZ EJHFTU EJHFTU EJHFTU EJHFTU +40/ σʔλߏɺ෦ॲཧͰ 9.- ʹม͞Ε·͢ ͱͱ 9.- ༻ʹ࡞ͬͯ͋ΔϥΠϒϥϦΛ༻͍ͯ͠·͢ ɻ ෦తʹӅ͞Ε͍ͯͯূ໌Ͱ͖ΔΑ͏ʹɺηΫγϣϯ͝ͱʹμΠδΣετΛܭࢉ͍ͯ͠·͢ɻ ྫ͑ɺ*% ΧʔυͰྸॅॴɺ͋Δ͍ެ։伴Λ֬ೝ͢Δ͚ͩͰ͋Εɺ*% ൪߸ΛݟΔ͜ͱ͕๏Ͱېࢭ͞Ε͍ͯΔͷ߹ɺ *% ൪߸ΛӅͯ͠ ͦͷ෦ΛରԠ͢ΔμΠδΣετͰஔ͖͑ͯ ఏࣔͯ͠࠷ऴతʹॺ໊͖ *% Χʔυจॻͷಉ͡μΠδΣετΛܭࢉͰ͖ΔͷͰɺଘࡏূ໌͕Ͱ͖·͢ɻ ʮμΠδΣετʯͱɺ҉߸ֶతϋογϡؔʢࠓճ 4)"ʣʹΑͬͯܭࢉ͞Εͨͷ͜ͱͰ͢ɻ Θ͔ͣ ϏοτͰݩͷσʔλ͕ҟͳΔͱɺฦͬͯ͘Δ͕શ͘ҟͳΓɺμΠδΣετ͔ΒݩͷσʔλΛ ਪଌ͢Δ͜ͱͰ͖·ͤΜɻ BBc-1 — ( ) — 2021-11-20 – p.28/30
JSON ( ) https://doi.org/10.1016/j.icte.2021.08.012 BBc-1 — ( ) — 2021-11-20
– p.29/30
( ) ID BBc-1 certify-web bbc1-lib-registry bbc1-lib-std BBc-1 — (
) — 2021-11-20 – p.30/30