Mashery allows authentication via digital signature as follows:
- First, concatenate the following components:
- API key
- Shared secret
- UNIX Timestamp
- Then, create an MD5 hash of the concatentated string.
The documentation states that the unix timestamp only needs an accuracy of +/- 5 minutes. Details: http://support.mashery.com/docs/read/mashery_api/20/Authentication .
Assuming this is not a trade-secret, what is the algorithm for performing authentication like this?
Specifically, how is it possible when the unix timestamp can vary by 5 minutes? A "brute-force" technique might be to calculate a signature for every possible timestamp value until finding a match (or not), but that doesn't seem practical for authenticating frequent API calls.