encryption - How does one go about reverse engineering an algorithm? -
i'm wondering how 1 go reversing algorithm such 1 storing logins or pin codes.
lets have amount of data where:
7262627 -> ? -> 8172 5353773 -> ? -> 1132
etc. example. or hex string tansformed another.
&h8712 -> &h1283
or that.
how go starting figure out algorithm is? 1 start?
would start trying different shifts, xors , hope stands out? i'm sure there's better way seems stabbing in dark.
is practically possible reverse engineer kind of algorithm?
sorry if stupid question. / pointers.
there few things people try:
- get source code, or disassemble executable.
- guess, based on hash functions other people use. example, hash consisting of 32 hex digits might 1 or more repetitions of md5, , if can single input/output pair quite easy confirm or refute (although see "salt", below).
- statistically analyze large number of pairs of inputs , outputs, looking kind of pattern or correlations, , relate correlations properties of known hash functions and/or possible operations designer of system might have used. beyond scope of single technique, , realms of general cryptanalysis.
- ask author. secure systems don't rely on secrecy of hash algorithms use (and don't stay secure long if do). examples give quite small, though, , secure hashing of passwords involve salt, yours apparently don't. might not talking kind of system author confident that.
in case of hash output 4 decimal digits, can attack building table of every possible 7 digit input, hashed value. can reverse table , have (one-to-many) de-hashing operation. never need know how hash calculated. how input/output pairs? well, if outsider can somehow specify value hashed, , see result, have what's called "chosen plaintext", , attack relying on "chosen plaintext attack". 7 digit -> 4 digit hash weak indeed if used in way allowed chosen plaintext attacks generate lot of input/output pairs. realise that's 1 example, it's 1 example of technique reverse it.
note reverse engineering hash, , reversing it, 2 different things. figure out i'm using sha-256, wouldn't reverse (i.e., given output, work out input value). nobody knows how reverse sha-256, although of course there rainbow tables (see "salt", above) <conspiracy>
at least nobody admits do, it's no use or me.</conspiracy>
Comments
Post a Comment