Cryptographic Fundamentals for IoT Security Engineering