I have OpenSSL-fips-1.1.1 and OpenSSL-0.9.7m built on a linux system according to the guides.
Now consider the following simple test script: #!/bin/bash openssl aes-256-cbc -e -in a -out a.nofips -k 'abcdefghijk' export OPENSSL_FIPS=1 openssl aes-256-cbc -e -in a -out a.fips -k 'abcdefghijk' unset OPENSSL_FIPS echo "FIPS MODE is off" echo "Decrypting a.nofips" openssl aes-256-cbc -d -in a.nofips -out b.nofips -k 'abcdefghijk' echo "Decrypting a.fips" openssl aes-256-cbc -d -in a.fips -out b.fips -k 'abcdefghijk' export OPENSSL_FIPS=1 echo "FIPS MODE is on" echo "Decrypting a.nofips" openssl aes-256-cbc -d -in a.nofips -out c.nofips -k 'abcdefghijk' echo "Decrypting a.fips" openssl aes-256-cbc -d -in a.fips -out c.fips -k 'abcdefghijk' unset OPENSSL_FIPS # end of script When this script is executed, the following is observed: FIPS MODE is off Decrypting a.nofips Decrypting a.fips bad decrypt 20048:error:06065064:digital envelope routines:EVP_DecryptFinal:bad decrypt:evp_enc.c:509: FIPS MODE is on Decrypting a.nofips bad decrypt 20049:error:06065064:digital envelope routines:EVP_DecryptFinal:bad decrypt:evp_enc.c:509: Decrypting a.fips So a file encrypted in FIPS mode must be decrypted in FIPS mode and a file encrypted in non-FIPS mode must be decrypted in non-FIPS mode. One might expect that aes-256-cbc would operate the same regardless of whether it is FIPS mode or not. Am I missing something here? Bill