Top Banner
A Seminar Report On Submitted in Partial fulfillment of award of degree of Bachelor of Technology in Information Technology from Rajasthan Technical University,Kota SUBMITTED BY Cheena Agarwal(07EGJIT-010) FREENET DEPARTMENT OF INFORMATION TECHNOLOGY GLOBAL INSTITUTE OF TECHNOLOGY, JAIPUR [2010-2011]
36

Freenet Revised

Mar 04, 2015

Download

Documents

lovecheena20
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Freenet Revised

A

Seminar Report

On

Submitted in

Partial fulfillment of award of

degree of

Bachelor of Technology

in

Information Technology

from

Rajasthan Technical University,Kota

SUBMITTED BY

Cheena Agarwal(07EGJIT-010)

FREENET

DEPARTMENT OF INFORMATION TECHNOLOGY

GLOBAL INSTITUTE OF TECHNOLOGY, JAIPUR[2010-2011]

Page 2: Freenet Revised
Page 3: Freenet Revised

Freenet

Introduction

Current systems afford little privacy to their users, and typically store any given data item in only one or a few fixed places, creating a central point of failure. Because of a continued desire among individuals to protect the privacy of their authorship or readership of various types of sensitive information, and the undesirability of central points of failure which can be attacked by opponents wishing to remove data from the system or simply overloaded by too much interest, systems offering greater security and reliability are needed. Freenet allows efficient distribution of information over the Internet with no fear of censorship. Freenet is completely decentralized: there is no entity in control of, or essential to, Freenet so there's no central point that would collapse the entire system if attacked. It is hard to remove single pieces of information from Freenet, since it's difficult to determine which computer is storing any given piece of information. Trying to determine where information is stored results in that information spreading to other nodes within Freenet (usually the opposite of what you want to happen). Both authors and readers of information on Freenet can remain anonymous if they wish .Freenet also employs intelligent routing and caching, meaning that it learns to route requests more efficiently, automatically mirrors popular data, makes network flooding almost impossible, and moves data to where it is in greatest demand.

"I worry about my child and the Internet all the time, even though she's too young to have logged on yet. Here's what I worry about. I worry that 10 or 15 years from now, she will come to me and say 'Daddy, where were you when they took freedom of the press away from the Internet?'" --Mike Godwin, Electronic Frontier Foundation

Freenet is a decentralized, censorship-resistant distributed data store originally designed by Ian Clarke. Freenet is free software which lets you anonymously share files, browse and publish "freesites" (web sites accessible only through Freenet) and chat on forums, without fear of censorship. Freenet is decentralised to make it less vulnerable to attack, and if used in "darknet" mode, where users only connect to their friends, is very difficult to detect.

Communications by Freenet nodes are encrypted and are routed through other nodes to make it extremely difficult to determine who is requesting the information and what its content is.

Users contribute to the network by giving bandwidth and a portion of their hard drive (called the "data store") for storing files. Files are automatically kept or

Page 4: Freenet Revised

deleted depending on how popular they are, with the least popular being discarded to make way for newer or more popular content. Files are encrypted, so generally the user cannot easily discover what is in his datastore, and hopefully can't be held accountable for it. Chat forums, websites, and search functionality, are all built on top of this distributed data store.

Freenet has been downloaded over 2 million times since the project started, and used for the distribution of censored information all over the world including countries such as China and the Middle East. Ideas and concepts pioneered in Freenet have had a significant impact in the academic world. Our 2000 paper "Freenet: A Distributed Anonymous Information Storage and Retrieval System" was the most cited computer science paper of 2000 according to Citeseer, and Freenet has also inspired papers in the worlds of law and philosophy. Ian Clarke, Freenet's creator and project coordinator, was selected as one of the top 100 innovators of 2003 by MIT's Technology Review magazine.

An important recent development, which very few other networks have, is the "darknet": By only connecting to people they trust, users can greatly reduce their vulnerability, and yet still connect to a global network through their friends' friends' friends and so on. This enables people to use Freenet even in places where Freenet may be illegal, makes it very difficult for governments to block it, and does not rely on tunneling to the "free world".

Page 5: Freenet Revised

Why is Freenet interesting?

Freenet does not have any form of centralized control or administration. It will be virtually impossible to forcibly remove a piece of information from Freenet . Both authors and readers of information stored on this system may remain anonymous if they wish. Information will be distributed throughout the Freenet network in such a way that it is difficult to determine where information is being stored. Anyone can publish information. They don't need to buy a domain name or even a permanent Internet connection. Availability of information will increase in proportion to the demand for that information. Information will move from parts of the Internet where it is in low demand to areas where demand is greater.

Page 6: Freenet Revised

FEATURES

Freenet stores files. Each file is identified by a key. Whenever you want to retrieve a file, you give Freenet the key, and Freenet will hopefully give you the file contents. Keys are currently not updatable, that is, you cannot change the contents of the file once it's been inserted. Since the Freenet key-space storage mechanism does not focus on any one content type, including what is legally considered intellectual property, any sort of information can be stored in the system - images, movies, HTML, and so on The current Freenet implementation is Java based and runs on Windows, Linux, Macintosh, and Solaris. Compared to the majority of peer-to-peer applications,Freenet is very robust but can sometimes be intimidating to the average user.

Freenet is also versatile enough to support many other applications running through it. Frost (Frost is a well-maintained and popular message board system for Freenet. It is very popular in the area of file sharing and is the most widely used Freenet messaging application. Frost is written in Java and FMB are two messaging and file sharing solutions, supporting anonymous communications .

While Freenet provides an HTTP interface for browsing freesites, it is not a proxy for the World Wide Web; Freenet can only be used to access content that has been previously inserted into the Freenet network. In this way, it is more similar to filesharing applications than to proxy software like Tor.

Freenet is substantially different than other P2P applications since users do not simply share and download files. Freenet attempts to protect the anonymity of both people inserting data into the network (uploading) and those retrieving data from the network (downloading). Unlike file sharing systems, there is no need for the uploader to remain on the network after uploading a file or group of files. Instead,during the upload process, the files are broken into chunks and stored on a variety of other computers on the network. When downloading, those chunks are found and reassembled. Every node on the Freenet network contributes storage space to hold files, and bandwidth that it uses to route requests from its peers.

With freenet files are routed through random users producing a hive of downloads.Freenet attempts to give a sending node plausible deniability by hiding the true contents of a file from the sending node. Freenet nodes may also drop pieces of information that are least-requested - ensuring that the most popular documents stay on the network.

Page 7: Freenet Revised

ARCHITECTURE

Freenet has a modular structure: the core application focuses on connecting to the network, and acts as a "proxy", providing an open application interface named FCP (Freenet Client Protocol) for other programs to use. Those additional applications use the API to implement services like message boards, file sharing, or online chat. Additional functionality can also be added with plugins; several plugins are distributed with Freenet to handle tasks such as UPnP support and IP address detection.

On the broadest level Freenet works by allocating a portion of computer’s hard disk space to the network. Then when another computer asks the computer for some data that is stored in the computer it will transmit the file. If your computer does not have the data it will look at all the computers it connects to, and ask the one that it thinks is most likely to have the requested data. Inserting data works in essentially the same way. Each node looks at a hash of the data and passes it along to another computer that is the best match for that hash. The hash is used because all data in the network is encrypted, and any given node doesn’t know the decryption key .

This means no computer can tell what data it is storing or fetching, nor can anyone tell where a particular piece of data is located on the network. No computer on the network knows where the data originally came from or where it went. This is because if you request a file and another computer gets the request,it has no way of telling if you are the originator of that request, or if you are just passing on the request from another computer. Then when the data is returned youhave no way of telling if the sending computer had the data in its datastore, or if it got it from another computer.In order to bootstrap a connection into the Freenet network, it must discover theaddress of at least one other node through some non-Freenet means. Once we have an initial connection our node will automatically start to learn about other nodes that initial neighbor knows about, which will then tell about other nodes and so on. Freenet 0.4 upwards has a node announcement mechanism that allows nodes to find each other through a list of seed nodes.

Page 8: Freenet Revised

Technical Aspect

The Freenet file sharing network stores documents and allows them to be retrieved later by an associated key, as is now possible with protocols such as HTTP. The network is designed to be highly survivable, with all internal processes completely anonymized and decentralized across the network. The system has no central servers and is not subject to the control of any one individual or organization, including the designers of Freenet. Information stored on Freenet is distributed around the network and stored on several different nodes. Encryption of data and relaying of requests makes it difficult to determine who inserted content into Freenet, who requested that content, or where the content was stored. This protects the anonymity of participants, and also makes it very difficult to censor specific content. Content is stored encrypted, making it difficult for even the operator of a node to determine what is stored on that node. This provides plausible deniability, and in combination with the request relaying means that safe harbor laws that protect service providers also protect Freenet node operators.

Distributed storage and caching of data

Unlike other P2P networks, Freenet not only transmits data between nodes but actually stores them, working as a huge distributed cache. To achieve this, each node allocates some amount of disk space to store data; this is configurable by the node operator, but is typically several GB (or more).

Files on Freenet are typically split into multiple small blocks, with additional blocks added to provide redundancy. Each block is handled independently, meaning that a single file may have parts stored on many different nodes.

Information flow in Freenet is different from networks like eMule or BitTorrent:

1. A user wishing to share a file or update a freesite "inserts" the file "to the network"

Page 9: Freenet Revised

2. After "insertion" is finished, the publisher is free to shut down his node, since the file is stored in the network. It will remain available for other users whether the original publishing node is online or not. No one node is responsible for the content; instead, it is replicated to several different nodes.

Two advantages of this design are high reliability and anonymity. Information remains available even if the publisher node goes offline, and is anonymously spread over many hosting nodes as encrypted blocks, not entire files. Freenet is also not affected by the typical BitTorrent problem, a lack of "seeds", or full copies of a file or torrent.

The key disadvantage of the storage method is that no one node is responsible for any chunk of data. If a piece of data is not retrieved for some time, and a node keeps getting new data, it will drop the old data sometime when its allocated disk space is fully used. Therefore Freenet tends to 'forget' data which is not retrieved regularly.

While users can insert data into the network, there is no way to delete data. Due to the anonymity, no node knows who is the 'owner' of a piece of data. The only way data can be removed is if users don't request the data.

Page 10: Freenet Revised

Network

The network consists of a number of nodes that pass messages among themselves. Typically, a host computer on the network runs the software that acts as a node, and it connects to other hosts running that same software to form a large distributed network of peer nodes. Some nodes are end user nodes, from which documents are requested and presented to human users. Other nodes serve only to route data. All nodes communicate with each other identically — there are no dedicated "clients" or "servers". It is not possible for a node to rate another node except by its capacity to insert and fetch data associated with a key. This is unlike most other P2P networks where node administrators can employ a ratio system, where users have to share a certain amount of content before they can download.

Freenet may also be considered a small world network.

The Freenet protocol is intended to be used on a network of complex topology, such as the Internet (Internet Protocol). Each node knows only about some number of other nodes that it can reach directly (its conceptual "neighbors"), but any node can be a neighbor to any other; no hierarchy or other structure is intended. Each message is routed through the network by passing from neighbor to neighbor until it reaches its destination. As each node passes a message to a neighbor, it does not know or care whether the neighbor will forward the message to another node, or is the final destination or original source of the message. This is intended to protect the anonymity of users and publishers.

Each node maintains a data store containing documents associated with keys, and a routing table associating nodes with records of their performance in retrieving different keys.

Page 11: Freenet Revised

Protocol

A typical request sequence. The request moves through the network from node to node, backing out of a dead-end (step 3) and a loop (step 7) before locating the desired file.

The Freenet protocol uses a key-based routing protocol, similar to distributed hash tables. The routing algorithm changed significantly in version 0.7. Prior to version 0.7, Freenet used a heuristic routing algorithm where each node had no fixed location, and routing was based on which node had served a key closest to the key being fetched (in version 0.3) or which is estimated to serve it faster (in version 0.5). In either case, new connections were sometimes added to downstream nodes (i.e. the node that answered the request) when requests succeeded, and old nodes were discarded in least recently used order (or something close to it). Oskar Sandberg's research (during the development of version 0.7) shows that this "path folding" is critical, and that a very simple routing algorithm will suffice provided there is path folding.

The disadvantage of this is that it is very easy for an attacker to find Freenet nodes, and connect to them, because every node is continually attempting to find new connections. In version 0.7, Freenet supports both 'Opennet' (similar to the old algorithms, but simpler), and 'Darknet' (all node connections are set up manually, so only your friends know your node's IP address). Darknet is less convenient, but much more secure against a distant attacker.

This change required major changes in the routing algorithm. Every node has a location, which is a number between 0 and 1. When a key is requested, first the node checks the local data store. If it's not found, the key's hash is turned into another number in the same range, and the request is routed to the node whose location is closest to the key. This goes on until some number of hops is exceeded, there are no more nodes to search, or the data is found. If the data is

Page 12: Freenet Revised

found, it is cached on each node along the path. So there is no one source node for a key, and attempting to find where it is currently stored will result in it being cached more widely. Essentially the same process is used to insert a document into the network: the data is routed according to the key until it runs out of hops, and if no existing document is found with the same key, it is stored on each node. If older data is found, the older data is propagated and returned to the originator, and the insert "collides".

But this only works if the locations are clustered in the right way. Freenet assumes that the Darknet (a subset of the global social network) is a small-world network, and nodes constantly attempt to swap locations (using the Metropolis–Hastings algorithm) in order to minimize their distance to their neighbors. If the network actually is a small-world network, Freenet should find

data reasonably quickly; ideally on the order of   hops. However, it does not guarantee that data will be found at all.

Eventually, either the document is found or the hop limit is exceeded. The terminal node sends a reply that makes its way back to the originator along the route specified by the intermediate nodes' records of pending requests. The intermediate nodes may choose to cache the document along the way. Besides saving bandwidth, this also makes documents harder to censor as there is no one "source node."

Page 13: Freenet Revised

Effect

Initially, the locations are distributed randomly (whether on Opennet or Darknet). This means that routing of requests is essentially random. But since different nodes have different randomness, they will disagree about where to send a request, given a key. So the data in a newly started Freenet will be distributed somewhat randomly.

As location swapping (on Darknet) and path folding (on Opennet) progress, nodes which are close to one another will increasingly have close locations, and nodes which are far away will have distant locations. Data with similar keys will be stored on the same node.

The result is that the network will self-organize into a distributed, clustered structure where nodes tend to hold data items that are close together in key space. There will probably be multiple such clusters throughout the network, any given document being replicated numerous times, depending on how much it is used. This is a kind of "spontaneous symmetry breaking", in which an initially symmetric state (all nodes being the same, with random initial keys for each other) leads to a highly asymmetric situation, with nodes coming to specialize in data that has closely related keys.

There are forces which tend to cause clustering (shared closeness data spreads throughout the network), and forces that tend to break up clusters (local caching of commonly used data). These forces will be different depending on how often data is used, so that seldom-used data will tend to be on just a few nodes which specialize in providing that data, and frequently used items will be spread widely throughout the network. This automatic mirroring counteracts the times when web traffic becomes overloaded, and due to a mature network's intelligent routing, a network of size n should only require log(n) time to retrieve a document on average.

Page 14: Freenet Revised

Scalability

A network is said to be scalable if its performance does not deteriorate even if the network is very large. The scalability of Freenet is being evaluated, but similar architectures have been shown to scale logarithmically. This work indicates that Freenet can find data in O(log2n) hops on a small-world network (which includes both opennet and darknet style Freenet networks). However, this scalability is difficult to test without a very large network. Furthermore, the security features inherent to Freenet make detailed performance analysis (including things as simple as determining the size of the network) difficult to do accurately. As a result, the real-world scalability of Freenet has not been thoroughly tested.

Page 15: Freenet Revised

Darknet versus Opennet

As of version 0.7, Freenet supports both "darknet" and "opennet" connections. Opennet connections are made automatically by nodes with opennet enabled, while darknet connections are manually established between users that know and trust each other. Opennet connections are easy to use, but darknet connections are more secure against attackers on the network, and can make it difficult for an attacker (such as an oppressive government) to even determine that a user is running Freenet in the first place. For users in such places, the darknet option may be a requirement in order to avoid prosecution by such a government.

The core innovation in Freenet 0.7 is to allow a globally scalable darknet, capable (at least in theory) of supporting millions of users. Previous darknets, such asWASTE, have been limited to relatively small disconnected networks. This scalability is made possible by the fact that human relationships tend to form small-world networks, a property that can be exploited to find short paths between any two people. The work is based on a speech given at DEF CON 13 by Ian Clarke and Swedish mathematician Oskar Sandberg. Furthermore, the routing algorithm is capable of routing over a mixture of opennet and darknet connections, allowing people who have only a few friends using the network to get the performance from having sufficient connections while still receiving some of the security benefits of darknet connections. This also means that small darknets where some users also have opennet connections are fully integrated into the whole Freenet network, allowing all users access to all content, whether they run opennet, darknet, or a hybrid of the two.

Page 16: Freenet Revised

Current development

The Freenet 0.7 darknet peers list.

Freenet 0.7, released on the 8th of May 2008, is a major re-write incorporating a number of fundamental changes. The most fundamental change is support for darknet operation, described above. Other modifications include switching fromTCP to UDP, which allows UDP hole punching along with faster transmission of messages between peers in the network.

Freenet 0.7.5, released on June 12, 2009, offers a variety of improvements over 0.7. These include reduced memory usage, faster insert and retrieval of content, significant improvements to the FProxy web interface used for browsing freesites, and a large number of smaller bugfixes, performance enhancements, and usability improvements. Version 0.7.5 also shipped with a new version of the Windows installer.

As of build 1226, released on July 30, 2009, features that have been written and will be included in version 0.8 include significant security improvements against both attackers acting on the network and physical seizure of the computer running the node. Like version 0.7.5, version 0.8 will be based on the 0.7 code. Other features likely to be included in version 0.8 are continued improvements to both performance and security, as well as usability enhancements and bug fixes.

Page 17: Freenet Revised

ADVANTAGES

1. The way Freenet's architecture is designed makes it inherently good at some things, and inherently bad at others. However, Freenet’s design has a few inherent advantages over other networks. Because the data is inserted, it will be spread over a large number of hosts.

2. Each node has a datastore, all nodes are contributing to the speed of downloads even if the node operator is not publishing any content. Freenet also requires nodes to have higher uptimes than most networks, so data is more likely to be available. This means that you can download from many computers even if the file is unpopular, and the total bandwidth is not directly limited by the numberof people downloading it or sharing it.

3. The Freenet design has the potential to outperform the venerable Bit Torrent. When you request a file it downloads it in many chunks, each of which will likely come from a different computer, it can allow very fast downloads for big (710MB+) files.

Page 18: Freenet Revised

DISADVANTAGES (Criticism of Freenet)

1. Freenet has inherently high latency. This means it will never be suitable for playing real-time games or instant messaging.

2. Apart from the Controversy regarding the content on Freenet, there has also been criticism on the handling of the Freenet project. Most notably, this is the case for the development process as well as for human resource management, which has lead to countless delays and, poor development decisions.

3. The security features inherent to Freenet make detailed performance analysis (including things as simple as determining the size of the network) difficult to do accurately. As a result, the real-world scalability of Freenet has not been thoroughly tested.

4. A poor effort in pooling human resources, especially of the part of the founder, has little to do with the novelty. Bad decisions, according to the criticism, involve areas of financial transparency, refusal of implementing user-friendly tools (like a client-sided search engine), the neglect of creating updatable persistent keys, the poor handling of interested parties (especially if they are non-coders) who want to help with the project, the refusal to adopt parts of other anonymous networks, code, or layers the decision to go for (and to stick with) a poorly performing routingmechanism in the 0.5 version (NGR), the decision in the latest version to go for a darknet (and the privacy and load-balancing consequences), etc.

5. Some also have a criticism towards the used programming language (Java) because of the fact it is not a real FOSS language (Suns' Java), or because Java has the reputation to slow down the computer.

Page 19: Freenet Revised

CONCLUSION

This scheme keeps information anonymous and is highly scalable. Provides effective means of storage and retrieval. More rigorous tests with many more nodes and improvements to the basic protocol are required.New files tend to end up near files with similar keys enabling efficiency.New nodes can inform the network of their existence.An attacker trying to insert a corrupted or empty file under the same key will actually spread the real file further The FreeNet was designed to evade censorship for good, and to allow stories to be told from beneath any tyranny that does not totally prohibit computer systems and the internet. FreeNet is truly decentralized, offering total anonymity and relative untraceability. Properly developed, FreeNet could become the bane of most governments on the planet - a system that truly cannot be controlled or subverted.FreeNet on the other hand, would be a far more difficult fastness to assail. Its popularity would increase greatly- but right now, it has a serious image problem and leaves a bad impression.

Page 20: Freenet Revised

REFERENCES

[1] www.freenetproject.org[2] "Freenet: A Distributed Anonymous Information Storage and RetrievalSystem.“http://www.doc.ic.ac.uk/~twh1/academic/papers/icsi-revised.pdf.[3] Protecting Free Expression Online with Freenethttp://www.infoanarchy.org/en/Freenet[4] http://wikiserver.freenethelp.org:14741[5] www.freenetrochester.com

Page 21: Freenet Revised

ACKNOWLEDGEMENT

The beatitude, bliss and euphoria that accompany the successful completion of any task would not be completed without the expression of appreciation of simple virtues to the people who made it possible. So, with reverence, veneration honor I acknowledge all those whose guidance and encouragement has made me successful in winding up this.

I sincerely thank Mr. Prakash Ramani, H.O.D. of the IT/CS Department Global Institute of Technology for helping me to build this project and for his valuable guidance, help and encouragement in all aspects during my whole Report.

I am also thankful to Mrs. Veena Yadav, Guide IT/CS Department Global Institute of Technology for their help and support during each phase of development of Report. He motivated me to build this report.

Last but not least, I pay my sincere thanks and gratitude to all the Teachers for helping me in report and give valuable suggestion. I am also thankful to all my colleagues for their co-operation and support.

Page 22: Freenet Revised

CERTIFICATE

This is to certify that the Project entitled “Freenet” has been submitted to the Rajasthan Technical University, Kota in partial fulfillment of the requirements for the award of the degree of Bachelor of Technology in “Information Technology” by the following student of final year B.Tech. 8th Sem.

Cheena Agarwal

Roll No: (IT07-10)

Veena Yadav Prakash Ramani

Guide & Lecturer H.O.D.

Department of CS/ IT Engg. Department of CS/ IT Engg.

Page 23: Freenet Revised

CONTENTS

1. Introduction2. Why is freenet interesting?3. Features4. Architecture5. Technical Aspects

Distributed storage and caching of data Network Protocol

6. Effects7. Scalability8. Darknet V/S Opennet9. Current Development

10. Advantages11. Disadvantages12. Conclusion13. References

Page 24: Freenet Revised

ABSTRACT

The service useful for communication where a right to free speech is not guaranteed, and for privacy nuts and conspiracy theorists in countries where free speech is supposed to be a universal right, but may not be. Freenet is a tool that lets users publish pretty much anything online "without fear of censorship." The software stores your data on a decentralized, anonymous network of nodes made up of other Freenet users' computers. Freenet communications are encrypted and routed through those nodes, making it difficult for anyone to trace what you're doing.Current systems afford little privacy to their users, and typically store any given data item in only one or a few fixed places, creating a central point of failure. Because of a continued desire among individuals to protect the privacy of their authorship or readership of various types of sensitive information, and the undesirability of central points of failure which can be attacked by opponents wishing to remove data from the system or simply overloaded by too much interest, systems offering greater security and reliability are needed. Freenet allows efficient distribution of information over the Internet with no fear of censorship. Freenet is completely decentralized: there is no entity in control of, or essential to, Freenet so there's no central point that would collapse the entire system if attacked. It is hard to remove single pieces of information from Freenet, since it's difficult to determine which computer is storing any givenpiece of information. Trying to determine where information is stored results in that information spreading to other nodes within Freenet (usually the opposite of what you want to happen). Both authors and readers of information on Freenet can remain anonymous if they wish. Freenet also employs intelligent routing and caching, meaning that it learns to route requests more efficiently, automatically mirrors popular data, makes network flooding almost impossible, and moves data to where it is in greatest demand.

Page 25: Freenet Revised