3des-cfb failing to decrypt
Andrew Stevenson
andrew.stevenson at sociomantic.com
Thu Mar 24 18:21:35 CET 2016
Hi,
I am trying to use libgcrypt to decrypt some data encoded using
3des-cfb. Unfortunately I only ever manage to decrypt the first
character. I'm guessing its user error on my behalf though I've been
through the documentation several times and can't see what I'm doing wrong.
I have some example code posted here:
https://gist.github.com/andrew-stevenson-sociomantic/7b28d0bd9f8f34bcef00
It has hard coded key, iv, cipher text and plain text. It then tries to
decrypt the cipher text with OpenSSL/libcrypto, libmcrypt and libgcrypt,
asserting after each that the decrypted test matches the plaintext. The
libcrypto and libmcrypt methods work OK but decrypt_3des_gcrypt doesn't
so the assert on line 148 fails.
Can someone see what I'm doing wrong?
Thanks,
Andrew
More information about the Gcrypt-devel
mailing list