Added checks for Encryption and MAC key lengths