modify BlockCipher to generate Encryption/Decryption Contexts

This is an implementation of dstufft's API proposal.