| Cryptocurrencies like bitcoin have developed rapidly in recent years.Blockchain,which is a core technology of cryptocurrencies,is a splendid innovation.With more and more attention from people,blockchain starts to expose its defects on securities.There are more and more accidents of blockchain that privacies of users are leaked in recent years.So it is obvious that the security problem is the primary factor constricting the development of blockchain.This paper has studied resource optimization,attack detection and information encryption of blockchain,and came up with related solutions.According to the block withholding attacks in bitcoin,this paper built a game theory model regarding a mining pool as a study unit,and came up with a strategy called Setting Strategy.Not only could the strategy ensure the safety of blockchain system by reducing the possibility of block withholding attacks between mining pools,but it could also enhance the performance of blockchain by increasing the income of the whole network.Aiming at countering the eclipse attacks with increasing frequency recently,this paper came up with a detection model based on HMM.With this detection model,users could obtain the probability distribution of the hidden states from every node according to the connection states of every node in the whole network so that they could find which node was attacked to eliminate the potential risk.To make for the security holes of traditional digital signature of blockchain system,this paper proposed an improved digital signature called EDR signature based on ECC,DH algorithm and RSA algorithm.This signature performed better against hackers' attacks compared to traditional signatures and made the information of users harder to be changed.So it provided more reliable authentication and enhanced the security of cryptocurrencies. |