Confidentiality and authentication are crucial to wireless sensor networks when sensors are deployed in hostile environments, e.g., battle fields and antiterrorist operations. In this paper, we come up with (1) a group key distribution protocol for a base station to distribute a group key to sensors and (2) a broadcast authentication protocol for sensors to authenticate messages broadcasted by a base station. Security and performance analysis show that both protocols are secure and efficient. In addition, our group key distribution protocol supports dynamic wireless sensor network which allows new sensors to be added in and compromised sensors to be forced to leave.