Securing Network Program update is essential for many crucial military applications. Present Network Programming protocols proposed by Hailun Tan et al. provides confidentiality and authentication with high computational effort and power consumption. We have developed a confidential network program update protocol for clustered wireless sensor networks. Our scheme has two phases, key computation phase and network program update phase. In key computation phase, we provide an efficient key computation scheme for securing the program image. The key is dynamically computed using broadcast encryption scheme when required without storing neither any keys before deployment, nor communicating directly. Network program update phase follows an approach based on Deluge, an open source code dissemination protocol, and provides confidentiality along with authentication. An immediate and independent authentication is achieved without time synchronization between the base station and the sensor nodes. The scheme is resilient to malicious program image injection by the compromised nodes. Mobile agents are used to know about the node compromise. We implement our scheme in TinyOS and evaluate the performance.