Direct encryption support;better key size assertions