Article 5E19V Cannot decrypt the same hash on another host with different OpenSSL version.

Cannot decrypt the same hash on another host with different OpenSSL version.

by
czezz
from LinuxQuestions.org on (#5E19V)
On HOST-1 following OpenSSL version is installed.
1. I encrypt string, using SSL and the hash is given as: VBIyVmy7wKFlFg==
2. Decrypt gives expected string
Code:OpenSSL> version
OpenSSL 1.1.1 11 Sep 2018

$ echo 'password1' | openssl enc -base64 -e -aes-256-cfb -nosalt -pass pass:secret
VBIyVmy7wKFlFg==

$ echo 'VBIyVmy7wKFlFg==' | openssl enc -base64 -d -aes-256-cfb -nosalt -pass pass:secret
password1BUT on another system - HOST2 - with another OpenSSL version installed, the same hash cannot be decrypted. It gives a rubbish. Why?

Code:OpenSSL> version
OpenSSL 1.0.2k-fips 26 Jan 2017
echo 'VBIyVmy7wKFlFg==' | openssl enc -base64 -d -aes-256-cfb -nosalt -pass pass:secret
F}h&
Note! By encrypting the same string on HOST-2, i get different hash. Why?
Code:echo 'password1' | openssl enc -base64 -e -aes-256-cfb -nosalt -pass pass:secret
KpEHgJcsvbg8Og==latest?d=yIl2AUoC8zA latest?i=4BkHUqFXOeQ:r_LrYQAdMUQ:F7zBnMy latest?i=4BkHUqFXOeQ:r_LrYQAdMUQ:V_sGLiP latest?d=qj6IDK7rITs latest?i=4BkHUqFXOeQ:r_LrYQAdMUQ:gIN9vFw4BkHUqFXOeQ
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments