With the development of network technology, network storage technologies are attracting increasing attention. However, they have a problem that is how to make use of network idle storage resources and organize them into a huge virtual storage space. P2P technology has given the network storage a new chance. In recent years, P2P network has been proposed to build large-scale, high scalability, high reliability and high performance distributed storage systems in a dynamic environment and it has become one of the hot spots.Although P2P storage system has inherent potential for high fault tolerance, each node in the system is dynamic and easy to be attacked by malicious users. So it is a challenge to build a reliable and secure P2P storage system. In such system the data is stored in each node, so if the node temporarily leaves the system or is controlled by a malicious user, the data may be lost and it can make the system unreliable. Therefore, how to provide persistent data storage and overcome these system errors has became the hotpot in this area.In thesis, it is to build a secure and reliable p2p distributed storage system. By analyzing some technologies of P2P storage, a new P2P storage system named KFS is built on the basis of Kademlia overlay network. At first the thesis analyzes the characteristics of the P2P network and focuses on the current well-known P2P overlay network. Meanwhile, it also does some research on the technology of the P2P storage system. Then a hierarchical distributed storage system based on the P2P overlay network is proposed. In the design process, system security and data integrity are ensured by user authentication and encryption respectively. At the same time, files in the system are divided into blocks to realize the load balance and data cache. In order to improve the reliability of the system, two rundancy mechanisms that are erasure coding and replication are used to enhance data availability and fault-tolerant of the system.Through the research and analysis of the system, it is proved that it has strong security and good reliability.The main contribution of the thesis lies in the following three points: 1. To propose a secure P2P storage technology based on CA authentication and data encryption for security mechanism of the P2P storage system. It is useful to the further study of secure P2P storage.2. To improve routing mechanism of the Kademlia overlay network and make it more efficient in location and routing. This can make it more suitable to its upper application.3. To model the system and quantitatively compare the impact of two redundancy mechanisms: replication and erasure coding. The analysis focuses on data availiability and storage requirement per node. |