The invention discloses a method for managing dispersed keys based on identities I a wireless sensor network, which comprises the following steps: 1, initializing system parameters, and setting the parameters to obtain master keys and master key pairs of the system parameters and a system; 2, performing two-way authentication on nodes in the system, and after the master keys are adduced by the system and when a node i applies for an encrypted key, acquiring the encrypted key from a node mastering system secret shares, and verifying the validity of the node i first; and 3, setting a key service life to realize the updating of communication group keys, and defining that the node i has a system secret share of sjt' at the beginning of a time period t, and has the system secret share of sjt after the updating. In the process of establishing communication keys, the method adopts a signature two-way authentication process to verify the validity of the node i first, namely to verify whether the node i is a legal node of the network so as to prevent malicious nodes from being added in; besides, for a secrete share sent by a response node j, the node i is also required to verify a signature and detect the validity so as to realize the two-way authentication and effectively improve the security.