adjusted libstate, finished encryptions