Unknown Hash/Encryption Function
Date: February 26, 2010 05:43PM
Unsure if this is the correct location to ask - please move/redirect if it's not.
I have some code that is doing something like this:
Device sends a request to http://site.com?id=12345
Site returns 'a87gbihya9749a87gbihya9749j39slw' (random 32-byte length alphanumeric string)
Device runs some sort of hashing function, and appends all further calls with ?id=12345&hash=1284674ba937173749ab1284674ba937173749ab (40-byte length hex hash).
What I would like to do is be able to emulate the device, but I don't know how to figure out what function is generating the hash from the returned string. I ran hashmaster on a few input/output pairs, and it didn't come up with anything.
I can post a few string/hash pairs, and I have the ability to send custom strings to the device to see what hash is generated from them. However, the device crashes if you try sending anything other than a 32-byte alphanumeric string.
00000000000000000000000000000000 -> b267b3896a52f79c99510ff92af27b67e0aaf148
00000000000000000000000000000001 -> f24f009084f957aabef62b69b099db52aaa94162
11111111111111111111111111111111 -> 03bb6090660035fcae0b3aabd052de92765ca63c
ge4mcncu2MfBvadgxFd4Xu6byp4EIaV9 -> afe8b758b24324d725cd74c58370093c4cdddc6e
WftZakLoSREhcUuD488rerzySv4V5vJL -> b02d6707e53fb7727900aaf11ba11f13e8ebd58f
LJvxoIpeSq5EAeU5sB4R1LaLl9vdTtrs -> 67a376d36a40b8cdbf5e564709707c1cd8552566
DXHigrnbxeMQqQS4bpKxf29ZPEPpbcG4 -> f5ee24b88c0b5827657c1d0267940dbb11867ec1
9nMIelu60Jy2C2Wey3EzCooNUIONaXGR -> f7d058913e8fb65286c5d4d548ba5b43de629d37
mPJt7CDtTZDuORot2TUagQaNMJtqy0Hn -> f855988be61d5d9084cd712d9d2fed59f3aa0ccc
Py1D1a8lnl4TKgTs19SnIbvhkApOTR61 -> 61557219204624f05fce83b3dccfddfd3090ba23
DtBrxVGBrLbHiT6eGfs9WWRTxdX9Hg4f -> fcc63f4d0c10bbf26e834ac2bb3742c93086c29a
W8RxZmMwurQkxEyt0gCTTPGmkuD7QAAS -> 65fbe53250c1813048a7f2b14909ec76619caed3
XUWV3wdtNd9ADX10MvPVVzLn6qf2Lq6r -> aa1f2f75112f8ec893250634234d5a4ae3e845ff
(I have a file of about 100 naturally generated pairs, as well, if that would be useful.)