Accountable logging and its applications to intrusion detection