With the development of information technology, electronic data exchange to some extent takes the place of the traditional transaction based on paper contract, which challenged the legal system and the information security system while facilitating the transaction. This paper studied the typical procedures of signing e-commerce contract, found that there are some problems on legal and operation levels, especially on the trusted third party system, and this paper proposes improved ecommerce certification security using contract protocol based on RSA and DSA algorithm.