unification and cleanups of stream and block cipher