apicryptographydigital-signatureproofs

proof of API response


Let's say I have access to an https weather API. Let's say I query its health status on thursday 17/08/2017 23h30 and the API replies OK (simple OK http code).

As a client, I need to prove in the future that the service actually responded me this data.

I'm thinking to asking the API to add a crypto signature of the data sent + timestamp, in order to prove they actually responded OK at that specific time. Is it overkill? Is there a more simple way of doing it?


Solution

  • A digital signature containing current date/time or even adding a time stamp issued by a third party time stamp authority is an appropriate way to ensure that the content was actually issued on a date

    In general, implementing a digital signature system on HTTP requests is not so simple and you have to consider many elements:

    But, if you only want to proof that a service response was OK/FAIL, then the server just need to add a digital signature over the payload (or computed on a concatenation of the headers) but if you want to implement something more complex I suggest you take a look at the Json Web Signature (JWS)