Security Analysis of Lightweight Cryptographic Primitives