The Linux Community Forum

General Help & Advice => Linux Support => Topic started by: novicesam on September 20, 2021, 01:17:24 pm

Title: openssl error reading input file
Post by: novicesam on September 20, 2021, 01:17:24 pm
Hi guys, I’m really sorry to be a pain, but this is starting to wear me down…openssl enc -aes-256-cbc -d -a -pbkdf2 -in myfile -out newfile.
All I get is ‘error reading input file’. If I leave out -a, then I get ‘bad magic number’. It’s the same if I include -base64. I’m about ready to pull my hair out…as if I don’t have little enough as it is!!!
Please help guys.
Title: Re: openssl error reading input file
Post by: Brian000 on September 21, 2021, 09:10:34 pm
HI,

Could you provide a little background please - What distro are you using and what version of openssl - and what are you trying to do?

..but "bad magic number" often means that your password is incorrect.

Try this (based on Lubuntu 20.04):

  #echo test > brian.plain
  #cat brian.plan
test

  #openssl enc -aes-256-cbc -a -pbkdf2 -in brian.plain -out brian.secured
enter aes-256-cbc encryption password:
Verifying - enter aes-256-cbc encryption password:
 
  #cat brian.secured
U2FsdGVkX18hxb7WbfWLo2AsLJYT8lv6/e4hG+Fwc90=

 #openssl enc -aes-256-cbc -d -a -pbkdf2 -in brian.secured -out brian.unsecured
enter aes-256-cbc decryption password:

 #cat brian.unsecured
test


let us know....
SimplePortal 2.3.3 © 2008-2010, SimplePortal