Expose - Masterthesis - Carsten Porth.tex 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. \documentclass[10pt,
  2. article,
  3. type=msc,
  4. colorbacktitle,
  5. instlogo,
  6. accentcolor=tud1c,
  7. %twoside
  8. ]{tudreport}
  9. \usepackage[ngerman]{babel}
  10. \usepackage[utf8]{inputenc}
  11. \usepackage{subfig}
  12. \usepackage{hyperref}
  13. \usepackage{url}
  14. \usepackage[section]{placeins}
  15. \usepackage{booktabs}
  16. \usepackage{listings}
  17. \usepackage[normalem]{ulem}
  18. \useunder{\uline}{\ul}{}
  19. \begin{document}
  20. \title{HybridOSN}
  21. \subtitle{Carsten Porth, carsten.porth@stud.tu-darmstadt.de, 1804629}
  22. \maketitle
  23. \section*{Meta data}
  24. \begin{tabular}{l l}
  25. \textbf{Name:} & Carsten Porth \\
  26. \textbf{Student number:} & 1804629 \\
  27. \textbf{Department:} & Computer Science - Prüfungsordnung 2015 \\
  28. \textbf{Allocation Date:} & xx.xx.2018 \\
  29. \textbf{Supervisor:} & Jörg Daubert \\
  30. \textbf{Second Supervisor:} & Aidmar Wainakh \\
  31. \textbf{Category for Digilib:} & S \\
  32. \end{tabular}
  33. \section{Motivation}
  34. The work will be done as part of the project "Privacy and Trust for Mobile Users". The ongoing penetration of computers in everyday life is used by a large part of the population for their own benefit. Emerging disadvantages, such as the increasing transparency and monitorability of a user with simultaneous lack of transparency of the entire network, are accepted. The aim of this interdisciplinary project is to reverse these trends and adapt privacy to personal interests. Economic interests on the one hand and social interests on the other should be reconciled.
  35. With Web 2.0, the use and perception of the Internet changed. Instead of just consuming content as before, web applications were created that allowed users to place content on the Internet themselves. The big social media networks such as Facebook (2 billion monthly active users\footnote{\url{https://www.heise.de/newsticker/meldung/Facebook-meldet-2-Milliarden-aktive-User-3757367.html}}) or Twitter (330 million monthly active users\footnote{\url{https://www.heise.de/newsticker/meldung/Twitter-schafft-ersten-Gewinn-Nutzerzahl-stagniert-3963390.html}}) have become particularly popular.
  36. With the evolution of the mobile phone to the smartphone, a range of functions preciously known only by computers has been made accessible mobile. The ability to install any application and to use the device for a variety of purposes opened up new possibilities. The development of the hardware and new sensors make it possible to comprehensively capture the environment. This technology is not only used in smartphones, more and more tracking devices and smart watches are conquering the market. For the user, these changes initially bring advantages. What happens to the collected data and what may be unconsciously shared with servers all over the world and possibly further processed there is in most cases opaque.
  37. Especially in social networks, a lot of data is collected by the respective app. If the user wants to use a certain network, he usually has no choice but to divulge the data. However, recent and older data scandals have shown that the users should be careful about what data they reveal. Often there are no opportunities to determine this yourself.
  38. % related work (Twitterize, Diaspora, Man.., Akas...)
  39. % There have been aproaches in the past to tackle these issues. Several social networks have been developed and most of them have already failed or ...
  40. %In this thesis, the goal is to develop a client app for an online social network which runs on Android. Using this client app, the user should be able to use the social network with it's whole functionality commonly but additional has the possibility to exchange data with other users using the same app via a P2P network closed for the provider. Regarding the P2P network, nothing new should be created, an existing P2P network should be used for storing the private user data. Main requirement for the online social network is the offering of an API for almost all functionalities to make development easy. For this reason, Twitter is perfectly qualified to be used in the thesis.
  41. This raises the question of how the user's data can be better protected and at the same time the network with its full functionality can be used, so the user does not have to make any compromises. Data exchange between users would have to take place via another channel. In such a hybrid solution, another network would be set up between the users and the data stored decentrally.
  42. This work will examine what such a solution might look like and what difficulties need to be overcome. Which requirements apply to the social network, which to the network between users and which to the client application? How can authenticity be guaranteed in the private network? The results of the research are to be implemented in a prototype and thus the quality of the solutions are validated.
  43. \section{Related Work/Background}
  44. The criticism on how personal data is handled by the large online social networks like Twitter and Facebook is not new. Therefore, there have been some attempts to build networks that focus on privacy. Safebook, for example, remained purely academic and Open-Book tried to collect 100,000 € via kickstarter and received only 45,000 €. Unfortunately, these attempts were unsuccessful and did not reach critical mass to exist permanently. And although criticism continues and scandals have become public again and again, the majority of users remained loyal to large networks. As a consequence of this circumstance, the protection of personal data with further use of the corresponding networks with all their functions is an interesting topic. One way to better protect privacy is to use a hybrid client app. This hybrid app allows the user to use the network with all its features in a conventional way. But beyond that, it allows the user to share data with other users who are not saved on the servers of the network operator. For this a peer 2 peer network is used and the data is stored decentrally.
  45. \subsection{Hybrid Online Social Network App}
  46. The idea behind a hybrid online social network app is that the user can continue to use the network without compromise, with all his contacts and full functionality. Furthermore, it is still possible for other users to communicate in a conventional manner with the users of the app. However, in addition to the data exchange via the server of the provider, there is also the possibility of exchanging data via a peer 2 peer network. The data exchange in this way should be displayed in the app automatically in the right places. In this case users must use the app.
  47. To implement such an app, some requirements must be met:
  48. \begin{itemize}
  49. \item First, the social network used must provide interfaces that allow it to legally retrieve data. It is common that such APIs can be used via REST interfaces.
  50. \item A peer 2 peer network is needed to connect the users among each other and exchange data between them. Communication with the network via an interface needs to be implemented.
  51. \item Personal data needs to be protected. Therefore it's important to ensure the data is encrypted and can only be read by authorized people.
  52. \end{itemize}
  53. \subsection{Facebook}
  54. In March 2018, it was revealed that the data of 87 million Facebook users was harvested by another company running an app on Facebook. The British company Cambridge Analytica had collected data via an app on Facebook and processed it for their own use. Both companies suffered immense damage after it became known. Facebook suffered a major damage to its image, Cambridge Analytica had to file for bankruptcy and ceased operations.
  55. Improving privacy and protecting the personal data of Facebook users would be of particular interest against this background. However, the strong limitations of the Facebook API (Graph API) do not allow it to develop your own Facebook client. For example, it is not possible to query a user’s news stream or to like a post.
  56. With apps like \textit{Friendly for Facebook} or \textit{Metal} there are alternative Facebook clients in the Google Play Store. Since the official Facebook API may not have been used due to the restrictions, two approaches are conceivable:
  57. \begin{enumerate}
  58. \item A WebView is used to display the website offered for mobile devices (\url{https://m.facebook.com/}). Thus, the app only serves as a wrapper around the mobile website. However, the different design indicates that the pages are modified by the Android app. This is technically possible by injecting JavaScript code into the page. Disadvantage is that changes on the mobile website lead to the injected JavaScript code suddenly no longer having the desired effect.
  59. \item The apps crawl the Facebook website and extract the content. The display of the data can therefore be freely designed. The disadvantage of this method is its dependence on the HTML structure of the Facebook web pages. Even small changes to the website could prevent the content from being extracted. Furthermore, requests to the Facebook servers would have to pass through the security precautions on Facebook, for example the presence of any tokens.
  60. \end{enumerate}
  61. Due to the limitations of the Facebook Graph API and the unstable and inconsistent workarounds, the idea of using Facebook as social network for a hybrid app was neglected for this project.
  62. \subsection{Twitter}
  63. Besides Facebook, also Twitter was in press in April 2018 because of selling user data to Cambridge Analytica. Indeed, it was only containing data which was publicly posted on Twitter, but nevertheless the data left the social network on way which was not intended by the user.
  64. In difference to Facebook, Twitter offers an API for developers covering nearly the whole functionality of Twitter. Therefore, it is easily possible to develop own Twitter clients. Unfortunately, over the years Twitter also made restrictions to the API and it is likely that this process will continue. But right now, these restrictions are not affecting the goals of the thesis. So all in all, Twitter is a good candidate to develop a hybrid client for.
  65. \section{Approach/Goal}
  66. Main goal for this thesis is to develop a concept for a hybrid client app for an online social network. To this, requirements for the social network and the peer 2 peer network and their interfaces need to be investigated. The results should be validated with a prototype. Regarding the prototype, Twitter should be used as social network and due to the limited time the following functionality should be implemented:
  67. \begin{itemize}
  68. \item Fetch the users home feed containing tweets from the Twitter server and related tweets from the P2P network.
  69. \item Display user profiles and user feeds again containing both types of tweets.
  70. \item Write tweets in text form and \textbf{decide on which network they are stored}. Same for liking and retweeting.
  71. \item Search public Twitter for users and tweets for a given keyword.
  72. \item Configuration of the key pair for encryption and decryption.
  73. \end{itemize}
  74. As a result, the following Twitter functionalities are not implemented in the context of this thesis:
  75. \begin{itemize}
  76. \item The notification system
  77. \item The direct message system
  78. \item Changing settings
  79. \item Update the user's profile
  80. \item Writing tweets containing any multimedia attachment like videos and pictures
  81. \end{itemize}
  82. \noindent
  83. The tweets exchanged via the peer 2 peer network are serialized into a JSON or XML format and then exchanged among the clients via the P2P network.
  84. \section{Schedule}
  85. The following schedule should only give a rough outline. Where appropriate, individual phases may also overlap and change slightly over time. In addition, regular meetings are scheduled with the supervisors to discuss progress and possible problems.
  86. %\begin{tabular}{|l|l|p{9cm}|}
  87. % Please add the following required packages to your document preamble:
  88. % \usepackage[normalem]{ulem}
  89. % \useunder{\uline}{\ul}{}
  90. \begin{table}[]
  91. \begin{tabular}{|l|l|p{11cm}|}
  92. \hline
  93. \textbf{Week} & \textbf{Task} & \textbf{Description} \\ \hline
  94. 1 & Start & Get familiar with the task and the goals. Check related projects and get a feeling for what was tried before and where are possible problems. \\ \hline
  95. 2 & OSN analysis & Analysis of several OSN for their suitability for this thesis. Check their public APIs for the usage in this project. Focus on Facebook and Twitter. \\ \hline
  96. 3 & P2P network analysis & Get familiar with peer 2 peer networks and how they are used nowadays. Understand the theory and check how they can be used to build a hybrid OSN. \\ \hline
  97. 4 & P2P network setup test & Test how to build up a own P2P network, identifiy obstacles and find helpful libraries/services. \\ \hline
  98. 5 & Existing P2P networks & Check if existing P2P networks can be used to realize the goals. Compare these networks and identify their strengths and weaknesses. Again, check for useful libraries. \\ \hline
  99. 6 & Check out Dapps & Decentralized application (Dapp) using Ethereum blockchain and IPFS to store data should be investigated for the suitability for this project. \\ \hline
  100. 7 & Android Apps & Compare different possibilities on how to build an Android app. Taking the prior research results on P2P networks and OSN into account and find the best way to easily build an app. Possible candidates are classic Android app development using Java and usage of web technologies (HTML, CSS, JavaScrip) with Ionic framework. \\ \hline
  101. 8 & Start development & Start with the development of the HybridOSN app. First step: Login with Twitter account \\ \hline
  102. 9 & Connect to the Twitter API & Send requests to the Twitter API containing the auth tokens and display the results (home feed, user profile) \\ \hline
  103. 10 & Implement basic actions & Implement the actions a user can perform (tweeting; liking; follow, block and mute users) \\ \hline
  104. 11 & Research security & Research how the user's data can be exchanged via the P2P network and stays private. \\ \hline
  105. 12 & Connect to P2P network & Establish connection to the P2P network and store data there. \\ \hline
  106. 13 & Interact with P2P network & Read and write data to the P2P network. Establish a format to store information which is easy to extend. \\ \hline
  107. 14 & Implement security & Implement mechanisms to ensure that data is only readable by authorized users. \\ \hline
  108. 15 & Testing & Write tests to validate the correct and error-free functionality of the app. \\ \hline
  109. 16 & Release prototype & A fully functional prototype should be finished. In a two week test phase, bugs and problems should be identified. Furthermore, the usability of the app should me monitored in an everyday life context. \\ \hline
  110. 18 & End of testing phase & Collect feedback concerning the testing phase of the app from the users. Use the feedback to improve the app. \\ \hline
  111. 19 & Writing & Writing of the thesis.
  112. \\ \hline
  113. 24 & Final presentation & Finale presentation of the results and the HybridOSN app. \\ \hline
  114. \end{tabular}
  115. \end{table}
  116. \end{document}