crypt,decrypt and session key