The IoT devices to be provisioned need to obtain a network secret and then use this secret to connect to a wireless network. In existing solutions, a network secret is sent in clear text or encrypted by certain methods such as AES from the configurator. In this paper, a new simplified lattice based encryption method is proposed to protect the network secret during the provisioning. In addition, when new IoT devices join or existing IoT devices leave the network, a network secret shall be updated. To avoid the repeated secret inputting and protect the secret during the network device change, a hash chain based method is proposed to solve the network secret management. From the security and performance analysis, the two methods proposed are secure, efficient and suitable for IoT devices with limited resources.