I would like to know what are the best practices for anonymizing datasets? Ideally I should be able to get the original data back after performing analysis on the anonymized dataset. Should I be using some encryption functions? Hashing maybe?
You should make the difference between the following concepts:
- encryption = encoding information in such a way that only authorized parties can read it.
- data anonymization = removing personally identifiable information from data sets, so that the people whom the data describe remain anonymous.
- de-identification = preventing a person’s identity from being connected with information, while preserving identifying information which could only be re-linked by a trusted party in certain situations (unlike data anonymization which aims to be irreversible).
Your choice depends on your use case.