Untangle chaining variable and cipher context