I have a situation where my application creates a hash based on it’s serial number(for example: A1C2-E3G-4I5K). The serial is known to the user. The hash will also be known to the user. What is the best strategy to hash the data while making it impossible/extremely difficult for the user to create the hash themselves?
I am using the hash as a way of showing that an action has taken place on the remote application.
I have thought about private Key encryption, but it could be possible for the user to get hold of the private key themselves.
You could look into a Keyed-HMAC. Basicly you create a lets say SHA-256 hash on your value plus a secret key, only known to your application. With that assumption user will not be able to create valid hash for his own.