Added a sanity check on the ciphertext length