cipher context construction