updating with encryption

updating with some changes including symmetric encryption.