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

BBc-1 ハンズオン : RFID タグによる物流追跡 / BBc-1 Hands-on :...

BBc-1 ハンズオン : RFID タグによる物流追跡 / BBc-1 Hands-on : Using RFID Tags for Logistics Tracking

BBc-1 の開発中の共通ライブラリと汎用レジストリライブラリ、レッジャーサブシステム、RFID リーダドライバ、および rfid-logistics サンプルアプリケーションを用いたチュートリアルのスライドです。

beyond-blockchain.org

September 10, 2021
Tweet

More Decks by beyond-blockchain.org

Other Decks in Technology

Transcript

  1. BBc-1 BBc-1 ( ) / (1) (2) (3) BBc-1 —

    RFID — 2021-10-27 – p.3/26
  2. #JUDPJO ##D$PSF ϨοδϟʔαϒγεςϜ ΞϓϦέʔγϣϯ ͦ ͷ ଞ ͞ · ͟

    · ͳ Ξ ϓ Ϧ ͷ Մ ೳ ੑ ڞ௨ϥΠϒϥϦ ##D ։ൃ߲໨ ஍ Ҭ ௨ ՟ Ξ ϓ Ϧ ϙ Π ϯ τ Ξ ϓ Ϧ དྷ ྺ ূ ໌ Ξ ϓ Ϧ ʜ ॳظʹ͓͍ͯଘࡏূ໌Λґଘ ΞϯΧϦϯά ֤ϊʔυʹ͓͚Δه࿥ʹ͸ ֤छσʔλϕʔεΛར༻Մೳ TRMJUF.Z42-ͦͷଞ%# BBc-1 σδλϧ௨՟ϥΠϒϥϦ ͦͷଞͷϥΠϒϥϦ CCDMJC 1ZUIPO (P +4 FUD Bitcoin Ethereum ( ) (Proof of Context) ( ) ( ) BBc-1 — RFID — 2021-10-27 – p.4/26
  3. 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 — RFID — 2021-10-27 – p.6/26
  4. ( SQLite3 ) ( ) ( ) ( ) (

    ) BBc-1 — RFID — 2021-10-27 – p.7/26
  5. 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 — RFID — 2021-10-27 – p.8/26
  6. RFID GitHub git clone ( ) $ git clone https://github.com/beyond-blockchain/bbc1-examples.git

    $ cd bbc1-examples/bbc1-rfid-reader tar pip (Python ) $ python setup.py sdist $ pip install dist/bbc1-rfid-reader-0.3.2.tar.gz dist tar pip install bbc_core.py BBc-1 — RFID — 2021-10-27 – p.11/26
  7. RFID CDEX CRU-920MJ USB EPC EPC RFID EPC RFID CDEX

    CRU-920MJ BBc-1 — RFID — 2021-10-27 – p.12/26
  8. RFID Logistics RFID Logistics API & https://arxiv.org/abs/2011.05442 (RFID ) API

    ( ) RFID API / API ( ) ( ) ( ; ) (API ) BBc-1 — RFID — 2021-10-27 – p.14/26
  9. RFID Logistics RFID GitHub git clone $ cd bbc1-examples/rfid-logistics GitHub

    API & index.py BBc-1 $ python index.py ( API ) http://localhost:5000 BBc-1 — RFID — 2021-10-27 – p.15/26
  10. RFID Logistics { "key": 1, "tag": "E283380020000100000201C0", "timestamp": 1631233757, "location":

    { "latitude": "3569.1741N", "longitude": "13977.0859E", "altitude": "5" }, "data": "010C", "algo": 2, "sig": "e312d1fcefd2e5d2de15314de73227d9be7c935e1aa648fff2981f8c38a61e2f3ad50710eb0c2ffc...", "pubkey": "04844e144d23aa63403b22f5f8365a0c9e6e3bfec31a59b90aa561bbd3bf6bfe541a49838a..." } ( ) “proof” Merkle Proof ( ) BBc-1 — RFID — 2021-10-27 – p.16/26
  11. ( ) จ ॻ  จ ॻ  จ ॻ

     จ ॻ  จ ॻ O μΠδΣετ μΠδΣετ μΠδΣετ μΠδΣετ μΠδΣετ μΠδΣετ μΠδΣετ ح਺ͷ৔߹͸ ෳ੡͢Δ ɾจॻ Λಘͨ" ࢯ͸ɺಉ࣌ʹূ໌ཁૉͱͯ͠ɺϒϧʔͰࣔ͞ΕΔμΠδΣετͱ֤ʑ͕ࠨӈͷͲͪΒʹҐஔ͢Δ͔Λड͚औΔɻ ɾ" ࢯ͸จॻ  ͷμΠδΣετ͔Β࢝Ίͯɺ࿈݁͢΂͖Ұ࿈ͷμΠδΣετΛ஌Δ͜ͱʹͳΔͷͰɺϚʔΫϧϧʔτʹࢸΔ·Ͱͷ ɹܭࢉΛ࠶ݱͰ͖ɺಘΒΕͨϚʔΫϧϧʔτ͕ &UIFSFVN εϚʔτίϯτϥΫτʹه࿥͞Ε͍ͯΔ஋ͱҰக͢Δ͜ͱΛ֬ೝͰ͖Δɻ ɾͦͷܭࢉΛ୅ߦ͢Δͷ͕DFSUJGZXFCͷαʔϏε ݪཧͷཧղͱඞཁͳ৘ใ͕͋Ε͹୭Ͱ΋࠶ݱͰ͖Δ  ূ໌͞ΕΔ ɻ ه࿥͢Δ ಡΈग़ͤΔ ূ໌Λ ඞཁͱ͢Δऀʹ ։ࣔ͞ΕΔ৘ใ ˞##D͸ɺ͜ͷߏ଄Λอଘ ɹ͍ͯ͠Δ͕ɺαϒπϦʔΛ ɹূ໌ཁૉԽͯ͠౉ͨ͠ޙ͸ɺ ɹূ໌͢Δ্Ͱ͸##D ͸ෆཁ ެ։͞ΕΔ৘ใ ϚʔΫϧϧʔτ Ϛ ồ Ϋ ϧ ໦  γ ε ς Ϝ ͕ อ ؅ ͠ ֤ Ϣ ồ β ʹ ෦ ෼ త ʹ ఻ ͑ Δ ʜʜ ʜʜ ʜʜ ʜʜ ʜʜ μΠδΣετ μΠδΣετ μΠδΣετ μΠδΣετ μΠδΣετ μΠδΣετ &UIFSFVNϒϩοΫνΣʔϯ ʜ ʜ ##DϥΠϒϥϦ ূ໌ॻΞϓϦͰ࣮ݱ BBc-1 — RFID — 2021-10-27 – p.17/26
  12. { "digest_1": "a90d9c56e9b17c3d8e601f4997d662ab836a0561041be912a170f5e1effc0735", "digest_2": "74fc4ccba4b20e250a545dd86d3111bd57aa707d836219940b67bec4a5c48cf3", "algo": "ecdsa-p256v1", "sig": "e312d1fcefd2e5d2de15314de73227d9be7c935e1aa648fff2981f8c38a61e2f3ad50710eb0c2ffc...", "pubkey":

    "04844e144d23aa63403b22f5f8365a0c9e6e3bfec31a59b90aa561bbd3bf6bfe541a49838a..." } ‘key’ ‘tag’ ‘digest_1’ ‘digest_2’ EPC ( ) ‘digest_1’ BBc-1 — RFID — 2021-10-27 – p.18/26
  13. RFID Logistics { "public_key": "04844e144d23aa63403b22f5f8365a0c9e6e3bfec31a59b90aa561bbd3bf6bfe541a49...", "subject": "foo: a CDEX CRU-920MJ

    reader", "issued_at": 1631233689, "expires_at": 1662769689, "algo": "ecdsa-p256v1", "sig": "c0ff25551931599f47995268416a723093dc3a76f59a178ca49b6c0fc6d13931777f8a6a50c4886f...", "pubkey": "0407c743525244017a0e0d26e75cccb5106f9f8d85feebebd253a9191b5e144f5f27d914564cef..." } RFID BBc-1 — RFID — 2021-10-27 – p.19/26
  14. (1) ( ) (bbc_core.py ) $ curl -X POST http://localhost:5000/evi-api/setup

    domain id (“rfid_logistics_domain” ) 6faa4bfba6d9daed9517d4b71f402ba9d17c4a464144bfa6baadcae71fc8e01a $ curl -X POST http://localhost:5000/rfid-api/setup “./.bbc1_app_support” index.py BBc-1 — RFID — 2021-10-27 – p.20/26
  15. (2) bbc_core.py $ eth_subsystem_tool.py -w ~/.bbc1 -d config_tree 100 60

    100 60 bbc_core.py $ eth_subsystem_tool.py -w ~/.bbc1 -d enable bbc_core.py index.py BBc-1 — RFID — 2021-10-27 – p.21/26
  16. (3) $ python reader_tool.py setup RFID “config.json” ( ) setup

    “config.json” BBc-1 — RFID — 2021-10-27 – p.22/26
  17. (4) RFID CDEX CRU-920MJ USB ( cdexcru920mj simulated ) RFID

    ( ) $ python reader_tool.py new cdexcru920mj $ ls /dev/tty.* USB ( : /dev/tty.usbmodem19K1400111) ( : sim-data.txt) LAPIS Technology RFID $ python reader_tool.py --help BBc-1 — RFID — 2021-10-27 – p.23/26
  18. RFID RFID $ python reader_tool.py run 2 “ .log” (

    : foo foo.log) $ tail -f .log control+C BBc-1 — RFID — 2021-10-27 – p.24/26
  19. URL http://localhost:5000/logi/ EPC ∼ “Verify Readout” proof “Verify Reader Certificate”

    “Verify Signer” proof BBc-1 — RFID — 2021-10-27 – p.25/26