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-2 ハンズオン さまざまな証明書の登録とその検証 / BBc-2 Hands-on R...
Search
beyond-blockchain.org
September 06, 2023
Technology
0
98
BBc-2 ハンズオン さまざまな証明書の登録とその検証 / BBc-2 Hands-on Registration and Verification of Certificates
BBc-2 の開発中のライブラリ・API、レッジャーサブシステム、および certify サンプルアプリケーションを用いたチュートリアルのスライドです。
beyond-blockchain.org
September 06, 2023
Tweet
Share
More Decks by beyond-blockchain.org
See All by beyond-blockchain.org
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 (on Web)
beyondblockchain
0
170
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
UI State設計とテスト方針
rmakiyama
2
620
フロントエンド設計にモブ設計を導入してみた / 20241212_cloudsign_TechFrontMeetup
bengo4com
0
1.9k
1等無人航空機操縦士一発試験 合格までの道のり ドローンミートアップ@大阪 2024/12/18
excdinc
0
160
How to be an AWS Community Builder | 君もAWS Community Builderになろう!〜2024 冬 CB募集直前対策編?!〜
coosuke
PRO
2
2.8k
ずっと昔に Star をつけたはずの思い出せない GitHub リポジトリを見つけたい!
rokuosan
0
150
成果を出しながら成長する、アウトプット駆動のキャッチアップ術 / Output-driven catch-up techniques to grow while producing results
aiandrox
0
350
ゼロから創る横断SREチーム 挑戦と進化の軌跡
rvirus0817
2
270
プロダクト開発を加速させるためのQA文化の築き方 / How to build QA culture to accelerate product development
mii3king
1
270
統計データで2024年の クラウド・インフラ動向を眺める
ysknsid25
2
850
バクラクのドキュメント解析技術と実データにおける課題 / layerx-ccc-winter-2024
shimacos
2
1.1k
ガバメントクラウドのセキュリティ対策事例について
fujisawaryohei
0
560
Storage Browser for Amazon S3
miu_crescent
1
220
Featured
See All Featured
Large-scale JavaScript Application Architecture
addyosmani
510
110k
Designing for Performance
lara
604
68k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
Done Done
chrislema
181
16k
Product Roadmaps are Hard
iamctodd
PRO
49
11k
Producing Creativity
orderedlist
PRO
341
39k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
The World Runs on Bad Software
bkeepers
PRO
65
11k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
229
52k
Agile that works and the tools we love
rasmusluckow
328
21k
Transcript
BBc-2
[email protected]
https://speakerdeck.com/beyondblockchain BBc-2 — — 2023-11-15 – p.1/26
BBc-2 API ( ) BBc-2 BBc-2 — — 2023-11-15 –
p.2/26
BBc-2 BBc-2 BBc-1 ( ) / ⇒ / BBc-2 —
— 2023-11-15 – p.3/26
( ) τʔΫϯ ସ՟ฎ εϚʔτίϯτϥΫτ ݕূՄೳͳঢ়ଶϚγϯ ϓϩϏφϯε དྷྺূ໌ ସՄೳ
ঈؐෆೳ ସՄೳ ঈؐՄೳ ସෆೳ ঈؐՄೳ ସෆೳ ঈؐෆೳ ূ໌͢Δ ಉఆ͢Δ ࢧ͍ ࠷ॳͷԠ༻ *%Χʔυ ηΩϡϦςΟ τʔΫϯ ূ݊ ηϯαʔ ྲྀɾ Ҩݴॻ อݥਃ ͢Δ ײ͢Δ தԝۜߦ σδλϧ௨՟ ҭήʔϜ ൿີ伴Λ͑Δ͔Βຊਓʁ ෛ࠴ Ξηοτͷ දݱΛҠసͰ͖Δʁ ొ͞Εͨίʔυͱ ͦͷ࣮ߦϩάͱ݁Ռͷ ਅਖ਼ੑΛ୲อͰ͖Δʁ ݖҖ͕ Կ͔ͷ༰Λূ໌͢Δʁ ࣋ଓ͢Δଘࡏʹ͍ͭͯ هΛΞοϓσʔτՄʁ ओମ͕͍ͳ͘ͳͬͯ աڈͷσʔλ༗ޮʁ /'5 Ұൠతͳ ೝࣝ ػೳͷ ੳ݁Ռ BBc-2 — — 2023-11-15 – p.4/26
Python3 bbc2 : https://speakerdeck.com/beyondblockchain/bbc-2-hands-on-basic-installation BBc-2 — — 2023-11-15 – p.5/26
Certify Certify BBc-2 — — 2023-11-15 – p.6/26
Certify Certify BBc-2 BBc-2 Certify API Certifiy API JSON (
) XML ( ) (= ) Certify API ( ) (API ) BBc-2 — — 2023-11-15 – p.7/26
Certify Web GitHub git clone $ git clone -b develop
https://github.com/beyond-blockchain/bbc2-examples.git $ cd bbc2-examples/certify GitHub index.py BBc-2 $ python index.py ( ) http://localhost:5000 BBc-2 — — 2023-11-15 – p.8/26
Certify / (1) Certify JSON { "id": "AR-1838B", "title": "I
Am the Walrus", "artist": "The Beatles", "writer": "Lennon-McCartney", "year": "1967" } “proof” Merkle Proof ( ) BBc-2 — — 2023-11-15 – p.9/26
( ) จ ॻ จ ॻ จ ॻ
จ ॻ จ ॻ O μΠδΣετ μΠδΣετ μΠδΣετ μΠδΣετ μΠδΣετ μΠδΣετ μΠδΣετ حͷ߹ ෳ͢Δ ɾจॻ Λಘͨ" ࢯɺಉ࣌ʹূ໌ཁૉͱͯ͠ɺϒϧʔͰࣔ͞ΕΔμΠδΣετͱ֤ʑ͕ࠨӈͷͲͪΒʹҐஔ͢Δ͔Λड͚औΔɻ ɾ" ࢯจॻ ͷμΠδΣετ͔Β࢝Ίͯɺ࿈͖݁͢Ұ࿈ͷμΠδΣετΛΔ͜ͱʹͳΔͷͰɺϚʔΫϧϧʔτʹࢸΔ·Ͱͷ ɹܭࢉΛ࠶ݱͰ͖ɺಘΒΕͨϚʔΫϧϧʔτ͕ &UIFSFVN εϚʔτίϯτϥΫτʹه͞Ε͍ͯΔͱҰக͢Δ͜ͱΛ֬ೝͰ͖Δɻ ɾͦͷܭࢉΛߦ͢Δͷ͕DFSUJGZͷαʔϏε ݪཧͷཧղͱඞཁͳใ͕͋Ε୭Ͱ࠶ݱͰ͖Δ ূ໌͞ΕΔ ɻ ه͢Δ ಡΈग़ͤΔ ূ໌Λ ඞཁͱ͢Δऀʹ ։ࣔ͞ΕΔใ ˞##Dɺ͜ͷߏΛอଘ ɹ͍ͯ͠Δ͕ɺαϒπϦʔΛ ɹূ໌ཁૉԽͯͨ͠͠ޙɺ ɹূ໌͢Δ্Ͱ##D ෆཁ ެ։͞ΕΔใ ϚʔΫϧϧʔτ Ϛ ồ Ϋ ϧ γ ε ς Ϝ ͕ อ ͠ ֤ Ϣ ồ β ʹ ෦ త ʹ ͑ Δ ʜʜ ʜʜ ʜʜ ʜʜ ʜʜ μΠδΣετ μΠδΣετ μΠδΣετ μΠδΣετ μΠδΣετ μΠδΣετ &UIFSFVNϒϩοΫνΣʔϯ ʜ ʜ ##DϥΠϒϥϦɾ"1* ূ໌ॻΞϓϦͰ࣮ݱ BBc-2 — — 2023-11-15 – p.10/26
Certify / (2) JSON “id”: (bbc2.lib.document_lib ) “digest”: SHA-256 SHA-256
/certify-api/digest API “_docs”: ( ; ) “proof”: ( ) Merkle Proof “privkey”: ( ) ( ) - /certify-api/keypair API ( ) “pubkey”: ( ) “sig”: (pubkey ) “algo”: algo, sig, pubkey /certify-api/sign API ( ) BBc-2 — — 2023-11-15 – p.11/26
Certify / (3) “proof” "proof": { "spec": { "subsystem": "ethereum",
"network": "goerli", "contract": "BBcAnchor", "contract_address": "0x8c6DB26Ab0eAaDcB46438DDEEE7baD2271e2df71", "block": 9098749 }, "subtree": [ { "position": "left", "digest": "6578c8c585be7aa25e5619cedfbc02820c223d667a2561b92c9de9656fded793" }, : # ] } BBc-2 — — 2023-11-15 – p.12/26
(1) ( ) (bbc_serv.py ) $ curl -X POST http://localhost:5000/cert/setup
domain id (“certify_web_domain” ) 7bc5dc8c1f3c4dc16e165beac165d73e4cb60530ac0b11bc433f6fba517d67b7 BBc-2 — — 2023-11-15 – p.13/26
(2) bbc_serv.py $ bbc_eth_tool.py -w ~/.bbc2 -d config_tree 100 30
100 30 API/ bbc_serv.py $ bbc_eth_tool.py -w ~/.bbc2 -d enable bbc_serv.py index.py BBc-2 — — 2023-11-15 – p.14/26
URL http://localhost:5000/cert/ (API : /certify-api/register [POST]) (API : /certify-api/proof [GET])
(API : /certify-api/verify [GET]) (API : /certify-api/verify [GET]) “i-am-the-walrus-cert.json” “ishindenshin-cert.json” ( ) “i-am-the-walrus-cert.json” → Verify Certificate API Ethereum 1 ( ) BBc-2 — — 2023-11-15 – p.15/26
(BBc-1 ) API JSON BBc-2 — — 2023-11-15 – p.16/26
(1) “beatles-singles-doc.json” → Register Document 30 Ethereum ( ) 1
→ Get Certificate “Download Certificate” proof JSON → Verify Certificate BBc-2 — — 2023-11-15 – p.17/26
(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-2 — — 2023-11-15 – p.18/26
(1) ( ) “ishindenshin-cert.json” { "id": "YLR-709A", "title": " ",
"artist": "YMO", "writer": [ {"name": " "}, {"name": " "}, {"name": " "}, {"name": " "} ], "year": "1983", : } BBc-2 — — 2023-11-15 – p.19/26
(2) ( ) Get Digest { "writer": [ {"name": "
"}, {"name": " "}, {"name": " "}, {"name": " "} ] } { "name": " " } “digest” “writer” “name” BBc-2 — — 2023-11-15 – p.20/26
(3) ( ) { "id": "YLR-709A", "title": " ", "artist":
"YMO", "digest": "bca7d161ae5fce25a55e888e4704f506282b402846132fa9b38d2fb6b72dc405", "year": "1983", : } “writer” BBc-2 — — 2023-11-15 – p.21/26
(4) ( ) { "id": "YLR-709A", "title": " ", "artist":
"YMO", "writer": [ {"digest": "5413e837a58878d2b077d14358f7769c8ae791f9deb0475d58d53ff8de1b8973"}, {"name": " "}, : } . . . ( ) ( ) ( ) BBc-2 — — 2023-11-15 – p.22/26
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-2 — — 2023-11-15 – p.23/26
*%Χʔυจॻ 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-2 — — 2023-11-15 – p.24/26
JSON ( ) https://doi.org/10.1016/j.icte.2021.08.012 BBc-2 — — 2023-11-15 – p.25/26
API ( ) ID BBc-2 certify certify-api document_lib BBc-2 —
— 2023-11-15 – p.26/26