• Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem In Decrypting The File Using aes-256-cbc Algorithm  RSS feed

 
Veerendranag Banka
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hai Can Any One Help me Out Of This Problem While Decrypting The Using aes-cbc-256 algorithm Wrong Final Block Length Is Coming
C:\OpenSSL-Win32\bin\openssl.exe aes-256-cbc -d -a -nosalt -in C:\Veeru\Bod\Bod_D_Response.txt -out C:\Veeru\Bod\Bod_D_Response_1.txt -k 1234567890123456
Please Help me In This Issue
Regards,
Veerendranag
 
Richard Tookey
Bartender
Posts: 1166
17
Java Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hardly a Java problem but what command(s) were used to encrypt the file?

The fact that you are decrypting a '.txt' file indicates to me that it is probably Base64 or Hex encoded but I don't see anything in your openssl command to tell it to first remove the encoding. If when you open the file in notepad or some other text editor you see only ASCII text then you can be pretty certain that it is encoded after encryption. I can't remember what the openssl option is but I'm sure you can find out.

The '-k' option is not the key directly but a passphrase used to generate the key. If you are expecting it to be the key then you need the -K option but then the key will need to be 64 hex characters. Also, since you are using CBC you may need to provide an IV.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!