This code has been poorly tested. Would I (the author) encrypt my most confidential files with it? No. I think it needs a more thorough checks before that, especially the random number generation routines. You have been warned.
However, it's great to use for reading files encrypted with other code!
libgcrypt