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

cris (supplementary material)

ktr
January 11, 2018

cris (supplementary material)

supplementary material

ktr

January 11, 2018
Tweet

More Decks by ktr

Other Decks in Programming

Transcript

  1. ファイルの完全性の検証 ハッシュアルゴリズムによる検証 hash := H(content) md5('hello') = b1946ac92492d2347c6235b4d2611184 'bad hello'

    b1946ac92492d2347c6235b4d2611184 hash := H(received_content) md5('hello') = b1946ac92492d2347c6235b4d2611184
  2. ファイルの完全性の検証 ハッシュアルゴリズムによる検証 hash := H(content) md5('hello') = b1946ac92492d2347c6235b4d2611184 'bad hello'

    b1946ac92492d2347c6235b4d2611184 hash := H(received_content) md5('bad hello') = 842dc2b34384799a1f1a3a1315ab1f5b
  3. ファイルの完全性の検証 署名 + ハッシュアルゴリズムによる検証 hash := H(content) signature := SignByPrivateKey(hash)

    content public key signature expectedHash := decodeByPublicKey(signature) actualHash := H(content) check expectedHash == actualHash
  4. ファイルの完全性の検証 ファイル自体が改竄されると検出できない hash := H(badContent) signature := SignByPrivateKey(hash) content public

    key signature expectedHash := decodeByPublicKey(signature) actualHash := H(content) check expectedHash == actualHash
  5. 今回のアプリのアーキテクチャ 1. generate keypair 4. upload content with signature and

    public key 3. store H(content) and own account address 2. create Ethereum account Upload File
  6. 今回のアプリのアーキテクチャ 1. generate keypair 4. upload content with signature and

    public key 3. store H(content) and own account address 5. verify content by signature 2. create Ethereum account Upload File
  7. 今回のアプリのアーキテクチャ 1. generate keypair 4. upload content with signature and

    public key 3. store H(content) and own account address 5. verify content by signature 2. create Ethereum account Upload File 6. store the content
  8. 今回のアプリのアーキテクチャ Share / Download File 1. generate shared URL 2.

    share the URL https://example.com/{hash} 3. open the URL 4. verify hash and it's owner
  9. 今回のアプリのアーキテクチャ Share / Download File 1. generate shared URL 2.

    share the URL https://example.com/{hash} 3. open the URL 5. verify hash and it's owner 4. verify hash and it's owner
  10. 今回のアプリのアーキテクチャ Share / Download File 1. generate shared URL 2.

    share the URL https://example.com/{hash} 3. open the URL 5. verify hash and it's owner 6. return shared content 4. verify hash and it's owner