Preventing piracy while preserving privacy