Privacy preserving similarity detection for data analysis