Theoretical and practical efficiency of cryptographic primitives