Added encryption for sync protocol