Extending the web-frontend for the cothority-framework
DEDIS - June 2017
Student: Gaylor Bosson Supervisor: Linus Gasser
1
Extending the web-frontend for the cothority-framework DEDIS - June - - PowerPoint PPT Presentation
Extending the web-frontend for the cothority-framework DEDIS - June 2017 Student: Gaylor Bosson Supervisor: Linus Gasser 1 Outline Goals Cothority Technologies Architecture Website Inliner Conclusion 2
DEDIS - June 2017
1
2
a. Keep all the previous features b. Use new services (skip-chain)
a. Crypto b. Protobuf
3
4
5
6
message SignatureRequest { required bytes message = 1; required Roster roster = 2; } message SignatureResponse { required bytes hash = 1; required bytes signature = 2; }
{ "filename": "7378e468ad6e24925f61560829ca1205.jpg", "signature": "134f07469307fc3e4...", "hash": "38ab97d8e44...", "genesisID": "32bf04100...", "blockID": "32bf04100...", "offlineServers": [ "192.33.210.8:7005" ] }
7
...
8
9
❖ Create React App ❖ React Router ❖ Font Awesome ❖ Moment ❖ Reactstrap ❖ Jest + Enzyme + Faker
10
11
Cothority Crypto Cothority Protobuf Websocket Status Skip-chain Genesis IFrame Module random Module signature sign Module signature verify Module HTML Module skip-chain Servers-Status HTML IFrame
12
Cothority Crypto Cothority Protobuf Websocket Status Skip-chain Genesis IFrame Module random Module signature sign Module signature verify Module HTML Module skip-chain Servers-Status HTML IFrame
○ Hash ○ Public and Private Keys (i.e. aggregate) ○ Signature ○ Skip-chain
13
14
Cothority Crypto Cothority Protobuf Websocket Status Skip-chain Genesis IFrame Module random Module signature sign Module signature verify Module HTML Module skip-chain Servers-Status HTML IFrame
○ Data types (e.g buffer)
○ We cannot create a bundle with external .proto files
15
16
Cothority Crypto Cothority Protobuf Websocket Status Skip-chain Genesis IFrame Module random Module signature sign Module signature verify Module HTML Module skip-chain Servers-Status HTML IFrame
17
18
Cothority Crypto Cothority Protobuf Websocket Status Skip-chain Genesis IFrame Module random Module signature sign Module signature verify Module HTML Module skip-chain Servers-Status HTML IFrame
○ Main role is to verify the integrity of the blocks !
19
20
Cothority Crypto Cothority Protobuf Websocket Status Skip-chain Genesis IFrame Module random Module signature sign Module signature verify Module HTML Module skip-chain Servers-Status HTML IFrame
○ Available skip-chains ○ Current active skip-chain ○ Events for active chain ○ Get a block given a skip-chain ID + block ID
21
https://skipchain.dedis.ch { "Blocks": [{ "GenesisID": "0b8d24c8d3...", "Servers": [ "192.33.210.8:7002", "192.33.210.8:7004", "192.33.210.8:7006" ], "Data": "3c1b8rA7XN66xq/fn3jvQQoA" }] }
22
Cothority Crypto Cothority Protobuf Websocket Status Skip-chain Genesis IFrame Module random Module signature sign Module signature verify Module HTML Module skip-chain Servers-Status HTML IFrame
○ Roster of the active skip-chain ○ Events
○ Important for the signature ! (at least ⅔)
23
24
Cothority Crypto Cothority Protobuf Websocket Status Skip-chain Genesis IFrame Module random Module signature sign Module signature verify Module HTML Module skip-chain Servers-Status HTML IFrame
○ Events (e.g. open and back) ○ Given a skip-chain ID
○ Provide it in the open event
25
26
Cothority Crypto Cothority Protobuf Websocket Status Skip-chain Genesis IFrame Module random Module signature sign Module signature verify Module HTML Module skip-chain Servers-Status HTML IFrame
○ Refresh itself every 30 seconds ○ Makes a request to the random service of a given node (wss://pulsar.dedis.ch:9000)
27
28
Cothority Crypto Cothority Protobuf Websocket Status Skip-chain Genesis IFrame Module random Module signature sign Module signature verify Module HTML Module skip-chain Servers-Status HTML IFrame
○ Highlight the active one
○ … by clicking
29
30
Cothority Crypto Cothority Protobuf Websocket Status Skip-chain Genesis IFrame Module random Module signature sign Module signature verify Module HTML Module skip-chain Servers-Status HTML IFrame
○ but a table of the nodes
○ Name, IP, Port, Up-time, Traffic, Services and Version ○
31
32
Cothority Crypto Cothority Protobuf Websocket Status Skip-chain Genesis IFrame Module random Module signature sign Module signature verify Module HTML Module skip-chain Servers-Status HTML IFrame
a. Dropzone to upload a file b. Confirmation to sign
33
{ "filename": "7378e468ad6e24925f61560829ca1205.jpg", "signature": "134f07469307fc3e4...", "hash": "38ab97d8e44...", "genesisID": "32bf04100...", "blockID": "32bf04100...", "offlineServers": [ "192.33.210.8:7005" ] }
34
Cothority Crypto Cothority Protobuf Websocket Status Skip-chain Genesis IFrame Module random Module signature sign Module signature verify Module HTML Module skip-chain Servers-Status HTML IFrame
a. Dropzone to upload a file b. Dropzone to upload the signature file
35
{ "filename": "7378e468ad6e24925f61560829ca1205.jpg", "signature": "134f07469307fc3e4...", "hash": "38ab97d8e44...", "genesisID": "32bf04100...", "blockID": "32bf04100...", "offlineServers": [ "192.33.210.8:7005" ] }
36
Cothority Crypto Cothority Protobuf Websocket Status Skip-chain Genesis IFrame Module random Module signature sign Module signature verify Module HTML Module skip-chain Servers-Status HTML IFrame
a. Add an iframe to the html b. Populate the iframe with the base64 of the HTML content
a. Remove the iframe
37
<a href="javascript:void 0" onclick="window.parent.postMessage('skipchain://0b8d24c8d3d1c323f6eaed455a55b7949cbde5370f32a64c6f9bb3b961fa6d6d', '*')">CoSi Binary </a>
38
Cothority Crypto Cothority Protobuf Websocket Status Skip-chain Genesis IFrame Module random Module signature sign Module signature verify Module HTML Module skip-chain Servers-Status HTML IFrame
○ Genesis blocks with data field starting with “http://” or “https://” ○ Only the index of websites
○ Ask the IFrame service to fetch the last block
39
40
○ One per page ○ Last block of the chain is the latest content ○ Use a public.toml file for the roster
○ You can provide the the skip-chain ID to update
41
42
{ "https://dedis.ch": "ab38ab...", "https://dedis.ch/post/software-engineer/": "19fe7a...", "https://dedis.ch/post/cothority-v1/": "cb6493..." } Data: “config://dedis.ch”
…
43
"data:text/html;base64,PCFET0NUWVBFIGh0bWw+IDxod..." Data: “https://dedis.ch”
<html> <head>...</head> <body>...</body> </html>
…
44
○ we can change it !
45
46
Cothority Crypto Cothority Protobuf Websocket Status Skip-chain Genesis IFrame Module random Module signature sign Module signature verify Module HTML Module skip-chain Servers-Status HTML IFrame