added affine encryption