use EVP_CIPHER_CTX_ functions instead of accessing EVP_CIPHER_CTX internals