Better encryption scheme with fixes