According to the OpenSSL source, it will generate keys from a user input. https://github.com/openssl/openssl/blob/master/crypto/aes/aes_core.c#L631 And even will expand keys that are not using all of the bytes. https://github.com/openssl/openssl/blob/master/crypto/aes/aes_core.c#L599 This behavior is not reflected in the library