making bug fixes to better cipher implementation
Better encryption scheme with fixes