I perform the following commands because I need to decrypt a file -encryption key file- (which is longer than module):
cat key.enc | base64 -d > encryptedrawfile.txt
openssl rsautl -decrypt -inkey privkey.pem -in encryptedrawfile.txt -out key.txt
I obtain the following key.txt: ’àÝ g ™`çïrM¡.€:
Now I need to use encryption key decrypted to decrypt a file using this key considering aes-csc-128. The file I need to decrypt with key above decrypted using aes is : QLTCpr0LK9K5Sw8MWX15LRergsaE+jEtCs3e7tTrATU=
osboxes@osboxes:~/$ echo QLTCpr0LK9K5Sw8MWX15LRergsaE+jEtCs3e7tTrATU= | base64 -d | openssl aes-128-cbc -d -nosalt -iv p1mce4lzT7bSsoUPFTFGTg== -k key.txt -out ficheroDescifrado.txt
*** WARNING : deprecated key derivation used.
Using -iter or -pbkdf2 would be better.
hex string is too short, padding with zero bytes to length
non-hex digit
invalid hex iv value
If I include -pbkdf2 I receive the following:
osboxes@osboxes:~/RsaCtfTool$ echo QLTCpr0LK9K5Sw8MWX15LRergsaE+jEtCs3e7tTrATU= | base64 -d | openssl aes-128-cbc -d -nosalt -pbkdf2 -iv p1mce4lzT7bSsoUPFTFGTg== -k key.txt -out ficheroDescifrado.txt
hex string is too short, padding with zero bytes to length
non-hex digit
invalid hex iv value
What is happening?
Thanks.