In order to reach ubiquitous perception in Internet of things, which confusion of network deployment can’t generate when information collection, some security problems are considered in IOT, such as key management, privacy protection and data processing. A key management scheme based on Homomorphics Encryption and China Remainder Theorem is proposed, in which a layer network model based on node location is given to deploy network infrastructure. Double key pools is introduced for key management and distribution, which save network overhead and node resource consumption. According to the use of homomorphic encryption for the note privacy information to protect users’ privacy and keep the data processing safe. A security network model and pair-key discover probability simulation is given, which shows this scheme have good connectivity and security.