The Internet of Things (IoT) is growing exponentially, with 25 billion devices expected to be deployed by 2030. However, the more devices that are installed and connected to the Internet without adequate security measures, the greater the number of cyber attacks will be. Therefore, new cryptographic algorithms and protocols need to be designed and developed for IoT devices and ecosystems that typically use cloud technology. In our research, we address, among others, secure pseudorandom number generation in resource-constrained environments. We have also developed the WebAssembly-based CryptID package, which provides identity-based encryption and digital signature solutions for microcontrollers. We are also exploring mutual entity authentication protocols for IoT ecosystems and cloud environments, taking into account the distributed nature of the service. We apply provable security methods to verify whether a cryptographic protocol has a security requirement. We also use technologies based on computational and formal methods.