0

I am working on an OpenSSL project. While using the encryption and decryption functions under EVP. EVP_Decrypt_Final is not showing an error but after every OP_SIZE there is 8 bytes of extra data coming in the decrypted file. I used the programs given in stackoverflow with various other users but the error was same.

Please help :)

1 Answers1

0

Extra 8 bytes of data may be result of padding. Block cipher encrypts/decrypts a block of fixed size at a time. If a given block is smaller than the block size, it is padded.

It looks like that you are using ECB or CBC mode.

You may be encrypting the data of multiple blocks. Then you should know different modes of block cipher.

If you do not want padding, consider encrypting your data using CFB or CTR mode.

doptimusprime
  • 9,115
  • 6
  • 52
  • 90