Mobile ad hoc network (MANET) is formed by collaboration of nodes characterized by having the same capabilities whereas neither central infrastructure nor central coordination is required. Notwithstanding the communication between nodes in MANET requires each node to have a unique identity (IP-address), many critical networks require some level of security in which all security principles require the node to have a security key. A tree-based dynamic address autoconfiguration protocol (TDAAP) is found to be one of the best protocols for address assignment based on network throughput and delay. MANET security ideally takes place during the design phase of the routing module. In this paper, we propose a novel scheme that merges the process of assigning IP addresses and security keys to the nodes in MANET using one protocol such that as soon as a node enters the network, it will be assigned an IP address and security key. To the best of our knowledge, no single protocol provides both IP addresses and security keys for MANET nodes. The results of the proposed method, which is based on T-DAAP, show significant reductions in the control packets and packet delay. Additionally, it provides not only efficient security to the nodes from the first moment they join the network, but also secure delivery of IP addresses and security keys to the network nodes.