Yes, it can be painful when the open method fails and you get zero information about what the error was. My advice is to build and test in little steps, and package up the encrypt/decrypt as I did in libcurve. Then the only errors you can get are bad input data or bad keys, which are easier to spot.