| With the popularity of computer network and the development of technology, Web-based applications are paid more attention. Internet trading in goods and services become more and more important Due to the increasing application, more and more research focuses on designing secure on-line transction used on Internet. Fair exchange is the central issue, and that is how to exchange of goods through the network in a fair way, in which fair exchange protocol is the key. People did a lot of work on fair exchange in e-commerce and proposed many valuable fair exchange protocols. Because the realization in the network has important practical significance, in recent years it was been widely studied.In the first part of the thesis, it introduces the relative work on fair exchange protocols and summarizes some protocols in the area. Then it gives some analysis of three classical protocols, which are off-line TTP(Trusted Third Party) protocol, STTP(Semi-Trusted Third Party) protocol and off-line STTP protocol. On the basis of current study fruits, it proposes an optimistic off-line STTP fair exchange protocol. This protocol introduces an off-line third party to reduce the traffic on the network, besides the third party needn't be online constantly nor can obtain the exchange secret. Technically speaking, the protocol reduces the request of network bandwidth; hence it is more practical and secure.In the second part of the thesis, it implements an optimistic fair exchange protocol in an e-commerce platform. The platform deals with digital commodity security and fair exchange on Internet. The key work of thesis is to design a secure, efficient, practical fair exchange protocol, and put it as a function module in an e-commerce platform.In this thesis, the main consideration of the e-commerce platform is security, fairness, privacy of user information, integrity of the exchange process legitimate user's identity, as well as practical. Due to it is difficulty to deal with the problem in real network condition, such as publish and search of information, user authentication and dispute arbitration etc, the platform adopt centralization server to provide user authentication, dispute arbitration, information publication and search. The transaction process is complete independently by the users, in this way it reduces the communication costs, thus it is practical. The thesis introduces the original fair exchange protocol implemented in the e-commerce platform, and gives improvements of it. Then describes the data structures, message formats and classes of the platform, and analyzes its security. Finally, gives a test instance to show how this fair exchange works. |