Upload
others
View
2
Download
0
Embed Size (px)
Citation preview
PreviousName:D3
FourthEstateAsecure,decentralizednewsdatastoringandsharingsolutionforjournalists
AaronChong|ReminiYip
InternationalStudentBlockchainCompetition’sPresentation 1
Newssiteswithtraditionaldatabase/cloud:Vulnerabletosinglepointoffailurerisk
Problem OurOffers UseCases KeyTerms Roles&Resp.2
Mechanism CostEval.Demo. Conclusion
CentralserverorDBdown,contentsbecomeunavailable
ProblemContentavailabilityisnotguaranteed
Problem(Cont.)Contentavailabilityisnotguaranteed
Problem OurOffers UseCases KeyTerms Roles&Resp.3
Mechanism CostEval.Demo. Conclusion
Contentmodificationsordeletionsbymalicioususersorsiteowners
Newssiteswithtraditionaldatabase/cloud:Vulnerabletosinglepointoffailurerisk
OurOffers
4
• SizedoesNOTmatter
• Samecostsforuploadinga5KBdocumentanda5MBvideo
ChargePerFile• Possibletogetcontentsevenwhen
theoriginaluploaderisdown.
• Immutablecontents.Censorship-free
DecentralizedStorage• Support3usecases
• Fullaccesscontrol.Onlytheintendedrecipientcanreadthecontent,e.g.
yoursubscriber
SecureSharing
1 2 3
Problem OurOffers UseCases KeyTerms Roles&Resp. Mechanism CostEval.Demo. Conclusion
UseCases
5
PublicSharing+UnencryptedContent• Anyonecanreadthecontent
• Example:Newsarticles/Relateddata(pictures,videos,tapes,etc.)accessiblebythepublic
PrivateSharing+UnencryptedContent• Onlythespecifiedrecipientscanreadthecontent
• Example:Analyses/Relateddataaccessiblebythesubscribers
PrivateSharing+EncryptedContent• Forasinglerecipientorasmallgroupofrecipients
• Example:Drafts/Informationexchangebetweenjournalists
Problem OurOffers UseCases KeyTerms Roles&Resp. Mechanism CostEval.Demo. Conclusion
KeyTerms
6
• Distributedcomputingplatform• Storedatareferences&controldataaccess• SmartContract:aprogramonEthereum.
• EthereumNode:acomputerconnectedtotheEthereumnetwork.
Ethereum
• Distributedfilesystem• Storedata(infileformat)• IPFSNode:acomputerconnectedtotheIPFSnetwork.
InterPlanetaryFileSystem
Problem OurOffers UseCases KeyTerms Roles&Resp. Mechanism CostEval.Demo. Conclusion
KeyTerms(Cont.)
7
• Splitamessageintonpieces• Requireatleasttpiecestoreconstructthemessage,wheret≤ n
ShamirSecretSharing
• Thesenderencryptsamessagewiththereceiver’spublickey• Thereceiverdecryptsthemessagewithhisprivatekey
PublicKeyCryptography
• Thesendercalculatesthe*hashofamessage,thenencryptsthehashwithhisprivatekey• Thesendersendstheencryptedhashandthemessagetothereceiver• Thereceiverdecryptsthehashwiththesender’spublickey.Healsocalculatesthehashofthemessage
• Thehashfromthedecryptionshould=thehashfromthecalculation
DigitalSignature
*hash=anumericvaluethatuniquelyidentifiesthemessage
Problem OurOffers UseCases KeyTerms Roles&Resp. Mechanism CostEval.Demo. Conclusion
Roles&Responsibilities
8
Owner Recipient Supervisor
Responsibilities• Retrievecontents
Responsibilities• Storecontents(-$)• Controlcontentaccess(-$)
Problem OurOffers UseCases KeyTerms Roles&Resp.
Example:Altruisticnetizen/Mediacompany/PressAssoc.
Example:Public/Subscriber/Journalist
Example:Journalist
Mechanism CostEval.Demo. Conclusion
Responsibilities• Provideverificationservicesonrequest• Providedecryptionservicesonrequest
9
Owner
3.QuerythecontractonEthereumforthepublickeysofthesupervisors
4.Smartcontractreturnsnpublickeys
IPFSNode
SmartContract
EthereumNode
1.AddthefileonIPFS
2.IPFSreturnsahash(filelocation)
5.Splitthehash(filelocation)intonpieces&encrypteachwithapublickey
QmWm…r581Vz
Mechanism–Storage
[PrivateSharing]
6.StoretheencryptedpiecesonEthereum
Problem OurOffers UseCases KeyTerms Roles&Resp. Mechanism CostEval.Demo. Conclusion
QmWm…r581Vz
10
Mechanism–Retrieval
[PrivateSharing]
1.Submitsarequesttoallsupervisorsforafile,withtherecipient'sdigitalsignature
2.Verifiestheidentityoftherecipient
3.Querythesmartcontractfortheencryptedpieces
IPFSNode
SmartContract
EthereumNode
API
4.Trytodecryptthepieceswithhisprivatekey.
5.Ifsucceed,returnsthedecryptedpiece
…
…
…
…
Recipient
Supervisor
API
API
API
API
Problem OurOffers UseCases KeyTerms Roles&Resp. Mechanism CostEval.Demo. Conclusion
DemonstrationScreenshots
11
12
Loginas“0x817Dd…”AccountBal:$21.729ETH
1
14
Awindowpopsupfortransactionconfirmation(transactionreferstofileuploadhere)
3
• GasLimit:Max.amountofenergyyouarewillingtospendonthistransaction• GasPrice:Amountofmoneyyouarewillingtopayforaunitofgas• MaxTransactionFee:GasLimit× GasPrice
15
Increasethegaspriceforfasterprocessing
4
16
Transactionissubmitted.Require20~50sforprocessing(Transactionreferstofileuploadhere)
5
17
Spent257,721gasforthistransaction(transactionreferstofileuploadhere)
6
18
Theuploadedfileisshownonthe“Manage”page
7
19
AccountBal:21.727Wepaid0.002ETH=$1.58USD
8
21
CopytheIDforfileretrievallater
10
23
PastethefileIDonthe“Download”page
12
24
Retrievedthefilesuccessfully
13
CostEvaluation
27
Action GasConsumption(May21,2018)
TransactionCost inUSD(May21,2018)
Addafilewith0recipient 257,785 $1.82515
Removeafilewith0 recipient 44,900 $0.31789
Addarecipient 76,749 $0.54399
Removearecipient 69,692 $0.49341
Set visibility,e.g.publicà private 34,995 $0.2478
Problem OurOffers UseCases KeyTerms Roles&Resp. Mechanism CostEval.Demo. Conclusion
BasedonETHGasStationwiththefollowingsettings,• ShamirSecretSharingsplitsthehash(filelocation)into5pieces,thatisn=5• Gaspriceis10gwei
Conclusion
28
FourthEstate Publishing Sites/Blogs,e.g.Sina,Medium,etc. Personal Sites
Zerodowntime,e.g.defendDDoSAttack ✓ ✗ ✗
Preservecontentintegrity,e.g.NOTmodifiedbyhackers ✓ ✗ ✗
CensorshipFree,e.g.NOTremovedbysiteowners ✓ ✗ ✓
SupportAccessControl,e.g. privatesharing ✓ ✓ Dependson howyoubuiltit
Problem OurOffers UseCases KeyTerms Roles&Resp. Mechanism CostEval.Demo. Conclusion
TherearealsotechnicaladvantagesofferedbytheunderlyingIPFS architecture,e.g.de-duplication,cachingetc.
Thankyou!
AaronChong|ReminiYip
InternationalStudentBlockchainCompetition’sPresentation 14
Appendix1– BusinessModel
30Problems OurOffers UseCases KeyTerms Roles&Resp. Mechanism CostEval.Demo. Comparison
TransactionCost
NonProfitBusinessModel(Current)• Wedon’tearnanyrevenues
• Fileupload/changeofaccessincurstransactioncost• Transactioncost’spayer:Owner
• Transactioncost’spayee:Ethereumminer
ProfitBusinessModel• Wechargeadministrationcostpertransaction
• Admin.cost’spayer:Owner• Admin.cost’spayee:FourthEstate
Admin.Cost
TransactionCost
Owner Miner Owner Miner
FourthEstate
Appendix2– MoreKeyTerms
31
• Chrome’splugin• Providewalletmanagement,e.g.checkyouruploadcost• ConnectyoutotheEthereumnetwork
(soyoudon’tneedtorunanEthereumnodeonyourPC)
MetaMask
Infura• GatewaytotheEthereumnetwork• RunEthereumnodesforpublicuse• MetaMaskroutesyourtransactiontothesepublicEthereumnodes
Appendix3– Infrastructure
32
EthereumNode
EthereumNode
EthereumNode
EthereumNetwork
IPFSNode
IPFSNode
IPFSNode
IPFSNetwork
Express
web3.js
Node.js
IPFSNode
WebInterface
HTTPClientwithMetaMask
EthereumNode
Infura
Case1:HTTPClientwithMetaMask• Clientdoesn’trunanEthereumnodeonhisPC• MetaMaskrouteshistransaction(e.g.addingafile)toInfura
• ClientcanconfirmthecostviaMetaMask
Appendix3– Infrastructure(Cont.)
33
EthereumNode
EthereumNode
EthereumNode
EthereumNetwork
IPFSNode
IPFSNode
IPFSNode
IPFSNetwork
Express
web3.js
Node.js
IPFSNode
HTTPClient
EthereumNodeCase2:HTTPClientwithEthereumnode
• ClientrunsanEthereumnodeonhisPC• Clientcanconfirmthecostviaconsole,etherscan,etc.
WebInterface
Appendix3– Infrastructure(Cont.)
34
EthereumNode
EthereumNode
EthereumNode
EthereumNetwork
IPFSNode
IPFSNode
IPFSNode
IPFSNetwork
Express
web3.js
Node.js
IPFSNode
Case3:HTTPClient• FORDEMONSTRATIONPURPOSEONLY• Wehardcodedourwalletkeyintheprototype.Youcanupload
filesandcontrolaccessforfree.Wepayforyou;)
HTTPClient
EthereumNode
Infura
WebInterface
35
QmWm…r581Vz
Appendix4–StorageDetails
SmartContractQmWm…r581Vz
4.Smartcontractreturnsnpublickeys
1.AddthefileonIPFS
5.Splitthehash(filelocation)intonpieces&encrypteachwithapublickey
IPFSNode
EthereumNode
Problems OurOffers UseCases KeyTerms Roles&Resp. Storage Demo.Retrieval CostEval.
Owner
3.QuerythecontractonEthereumforthepublickeysofthesupervisors
2.IPFSreturnsahash(filelocation)
6.StoretheencryptedpiecesonEthereum
36
Appendix4–StorageDetails
(Cont.)
EncryptedFile
Un-encrypted
File
(OR)
IPFSNode
1.AddtheORIGINAL fileonIPFS
2.IPFSreturnsahash(originalfilelocation)
QmPg…s219By
3.Createametafile
4.AddtheMETA fileonIPFS
4.IPFSreturnsahash(metafilelocation)
Filename:MayReportFiletype:pdfSize:1MbOriginalfilehash:
QmPg…s219By
QmWm…r581Vz
Problems OurOffers UseCases KeyTerms Roles&Resp. Storage Demo.Retrieval CostEval.