Add test for missing secret value
Support more AES-CBC encryption schemes

This also moves the crypto imports to the places where they are used to
avoid a depenency on pycrypto if no encryption is used.
Add test for all AES-CBC encryption schemes