Take the 2-minute tour ×
Information Security Stack Exchange is a question and answer site for Information security professionals. It's 100% free, no registration required.

So I think the algorithm is based on the php function ENCODING_decode defined in includes/encoding.php (which i don't have) . The encoded result $xId_campaign_encoded from the php script has always 24 alphanumeric characters

share|improve this question
    
Ehrm this doesnt even look crypted –  Andrew Smith Jun 28 '12 at 21:14
    
coded? . stackoverflow.com/users/118068/marc-b said it is crypted It's ASCII? Seriously... we're not cryptographers. . – Marc B 19 hours ago –  zacadea zacadea Jun 29 '12 at 0:25
    
The last edit to this post (revision 6) removed information crucial to the post, so it no longer makes sense. –  Xander Apr 8 '13 at 0:58
add comment

closed as not a real question by Jeff Ferland Apr 8 '13 at 3:15

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer

The user and campaign IDs seem to be hexadecimal numbers (of 32 and 48 bits respectively). I see no obvious structure in them — they're definitely not printable ASCII byte strings.

The 24-char "result" strings are not hexadecimal, but they might be base 36. However, if so, they're too long to be reliably decoded by PHP's base_convert() function.

However, if you look carefully at the sample strings, you'll notice that letters only appear in odd-numbered character positions. This suggests that the strings might be encoded two characters at a time. In fact, if you split each string into two-character pairs, swap the letters in each pair and decode them as base 36 numbers, all the values turn out to be less than 256. Specifically, the strings you gave decode to the following hexadecimal strings:

z264643413z2e4l5i5744413 -> 6b 96 96 93 6d 6b 9e c9 c6 97 94 6d 
x2v2d4a4a4z2d464j5c464u2 -> 69 67 9d 9a 9a 6b 9d 96 c7 9c 96 66 
z2q274k523647454b4948464 -> 6b 62 97 c8 6e 96 97 95 9b 99 98 96 
13s2j55433x2m5n594u244a4 -> 6d 64 c7 95 6f 69 ca cb 99 66 94 9a 
74t2c4h5w20364j56474t254 -> 97 65 9c c5 68 6c 96 c7 96 97 65 95 

These still show quite a bit of redundancy; for example, the upper nibble of each byte is always 6, 9 or c = 12, and the lower nibbles aren't exactly uniformly distributed either:

0 =  0:  0 
1 =  1:  0 
2 =  2:  1 #
3 =  3:  1 #
4 =  4:  3 ###
5 =  5:  6 ######
6 =  6: 11 ###########
7 =  7:  9 #########
8 =  8:  3 ###
9 =  9:  5 #####
a = 10:  4 ####
b = 11:  6 ######
c = 12:  3 ###
d = 13:  5 #####
e = 14:  2 ##
f = 15:  1 #

In fact, plotting the frequency of all bytes as a table, with the upper byte as the row (showing only rows 6, 9 and c for brevity) and the lower as the column, gives a curious picture:

  | 0123456789abcdef
--+-----------------
6 | 0010122112041311
9 | 0001238512312210
c | 0000011311110000

However, I can't immediately think of what might be generating such a byte distribution, but it does seem too distinct to be just a coincidence.

share|improve this answer
    
anyone can find the final solution for 10 usd? –  zacadea zacadea Aug 12 '12 at 6:05
    
A rep bounty might work better, although you'd need to acquire some more rep yourself before you can award one. –  Ilmari Karonen Aug 12 '12 at 12:03
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.