0

If I know that a known hexadecimal string should, after undergoing some unknown conversions (bitwise operations/bit shifting/simple hex->dec), give me a known decimal string, what would be the best process to find out how each of those hex strings gets converted?

Examples:

00042fd584 should become 60098
000645e6c6 -> 62307
0006455beb -> 44533
00042fd518 -> 60044

I'm not looking for a direct solution here; I would like to know if a process exists by which I can find out how I can convert my hex strings to the right dec strings. I'm basically asking how to reverse-engineer some algorithm that crunches numbers and/or strings in some unknown way if I know both my inputs and (expected) outputs.

A. Galloway
  • 135
  • 1
  • 10
  • NOTE: I have no idea which stackexchange page this question belongs in (if any at all), I was considering putting this in the math page. I may need it to be migrated... – A. Galloway Jul 25 '17 at 21:38
  • Also, for what it's worth, I'm coding in Python for the project to which this question is relevant – A. Galloway Jul 25 '17 at 21:39
  • @underscore_d I flagged it myself – A. Galloway Jul 25 '17 at 21:58
  • Hopefully that or some of the similar threads have some useful info. If you're dealing with a hashing algorithm, then you might be in luck. However, if any kind of encryption, salting, etc is involved, then unless the implementer of the algorithm goofed while coding it, it's probably unlikely to be crackable. Either way, without a bit more context, it's probably hard for anyone to start helping. But anyway, good luck! – underscore_d Jul 25 '17 at 22:01

0 Answers0