Fog networking supports the internet of things (IoT) concept, in which most of the devices used by humans on a daily basis will be connected to each other. Security issues in fog architecture are still a major research area as the number of security threats increases every day. Identity-based encryption (IBE) has a wide range of new cryptographic schemes and protocols that are particularly found to be suitable for lightweight architecture such as IoT and wireless sensor networks. This chapter focuses on these schemes and protocols in the background of wireless sensor networks. Also, this chapter analyses identity-based encryption schemes and the various attacks they are prone to.