the reason i base64 encoded it is that wordpress was trying to be smart and changing characters for me...which in a coded message is...not a good idea.
I'm aware of those problems, however I'm trying to confirm if the above is the same as what I should be trying to decode. It's a waste of time to decode the wrong string.
That range is 58 characters which (perhaps suspiciously) is size of alphabet + 2^5. (Although a whitespace character is also encoded, making that suspicion a little less "round".)
From comparing the multiple encodings of Quick Brown Fox, the value distribution across that range is fairly even and every value is used at least once.
Are you sure it's exactly 8? I get ~8.9 times its own length.
var fox = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG";
var decodedfox = atob("SDdRJFYxMSUmPT5WKD85Kzk+Mi8kK0QmJDY2VkMuRTROJT0hLk03KTFGRjUuSiAyPyhRUjNaOlJFTTYqSUNKUFRVMFZLR009IDpKLDY1IU5JKTZFMywnICY8VUROUC8hISBBIzMiLCNBJy1JPyI/T1Y/R1AiLTQ0WT0pPFMjLidLV00ySDpNNTAwJkZJRyNNMVVPSVkuLC9GIyYyLDFNSjZDNi0oIy5QOyE3OiFLIzUiKldDM01UQylTS0hVLSc3OFFDJyRQITRRWE85OlgtVzM7MjZGKElWK0dHT0FDPSgnTFUhUjtXSDZKQ1cjUjYyPFU7OVZPLEYvPkg1TERXIzEpQTpLMFRQJT9SMjNBWE40N1UhLCEjWSogRz1DMCM3WClAOkNKUD5QPykmMCtAIUNHIzdXLCk9JCVYJ0tGVFgxSSxGKyErJSVHTlJVVUQxOUJZLDklKD4yLChIMCc1I0Q3SUYhMTc9OicyKERSNFNOTiIpRz06USdENUVVRCE=");
console.log(decodedfox.length/fox.length);
It never encodes things the same each time your run it, but they can all be decoded the same way. There are no strange initial conditions you need to know about like time or some other kind of token.
Erik says that all of the strings can be decoded with the same method. Since the input string can result in multiple different valid encoded forms that implies to me that the method for decoding these strings is also encoded in the string (it seems that otherwise we would have to guess magic inputs).
However, assuming that approach, it is interesting to me that each resulting string ended up the same length. Trying to tease out some encoding code from the outputs now...
The strange properties of the encryption lead me to believe it was some binary modification (just a pattern), but that may have been looking too far into the problem. I started to see a pattern by deleting bits initially but it disappeared as I progressed.
I'm not even sure where to start with using the unencoded string.
I am working on the assumption that the first few chars could be a randomly generated salt and the rest is equal sized blocks of encrypted content. The random salt results in a different encoding each time.
This is what I have so far and it seems to fit the original encoded message too.
Quick thought: each byte is a printable ascii character between space (0x20) and 'Z' (0x5a) inclusive. All these bytes appear in all the encoded files. Does anything interesting happen if you interpret the files as encoded in base 59?
(Edit: obviously I'm talking about the files after they have been base64 decoded…)
Those 5 characters represent the first "T". Another "T" won't necessarily result in the same code. Actually, the odds of ever seeing that code again for a "T" is low.
You are right. Congrats!! There is actually an exclamation point at the end, but close enough! send an email to erik@carwoo.com and we can figure out how to get you the $500. Also, if you would detail your solution...that would be awesome!
[Do not read further if you want to solve it yourself]
1. The encoded string can be divided into groups of chars, each representing one (decoded) char. These groups occur every 5, 7, 11, and 13 chars. That is, chars 0-4 correspond to group 1, chars 5-11 correspond to group 2, etc. After the first 4 groups, the lengths repeat. Thus group 5 is chars 36-40.
2. As hinted in this thread, the space is of 59 chars, and there's an offset of 32. So, for each char in each group, subtract 32, sum them up, mod by 59. Add 32 to this result, and that's your decoded character ascii code.
Example: "!8F2>" corresponds to [33, 56, 70, 50, 62]. Subtracting 32 from each of those is [1, 24, 38, 18, 30]. The sum of those is 111. 111 % 59 = 52. Adding back the 32 offset, yields ascii code 84, corresponding to "T".
"A Christmas Story" is pretty great christmas movie. One of the greatest scenes is when Ralphie decodes the secret orphan annie message. I changed it a bit so that someone wouldn't just guess it.
it seemed fitting as it is the only encoded message in any holiday movie I could think of! :)
57 comments
[ 1152 ms ] story [ 2214 ms ] threadSee https://gist.github.com/747869
From comparing the multiple encodings of Quick Brown Fox, the value distribution across that range is fairly even and every value is used at least once.
; (12 times) I (11 times) * (10 times) - (10 times) 2 (10 times)
and for the quick-brown-fox sample he posted in the comments, I have:
! (14 times) # (13 times) C (11 times) , (11 times) U (10 times)
So I'm not convinced this is a fruitful path of inquiry.
Edit: I stand corrected on the original statement about lengths - wasn't paying attention and was performing integer division.
really? I have strlen(decoded-text) at 383 chars, and qbf as 43 chars, giving the encoded as 8.906976744186 times the size of the original...
Each one can be decoded with the same decoding method.
IThGMj4wS0gvR0M9PE5QQEEnMyxNIiFHJE1NVTdYSS5PTTdFT1FCVUtMLVBW Qj4nNkBUIDsqLUNTLjVCJS87IkwnT1E/LiZRI1E4ITlBLzBXNU5SNEgmVDM8 QFM0Ty4wLFAvL0ohNTUxQzU2Jy82LVEpN0gpSjs3NCE5Q1lXQlUwUVc1MUFX NDI7LUQnO09BSEI9WVdNRktOTTdLNkI+Pj5HIDtKS1YkSVY0I0pRPTtYVSY9 KyhZVEAqJykrJSIpIjcsI0ckWD4ySlRIIkAhUyw+VStUQVY/NiUpNFZVMis8 IylXMiU9VVFKSFI3WkI3S0A/QTMhIkkuP0pFMVJKQixYJSFGJz8+TD89WFgu JyRSJ1hYIlIoVEFVLlUwOjc0Oi4iQDlNOUVPSUdHOkM5Mj9LWilCMlkmPj1X M0otSiwmKFU4Jy9IJzc5WkFVQ1VFPFFAQ0tHOClYLDklPDs/T1BPS0hTPDAi WkRBQVVSOTIhKjxBR0ZNNypRNzwsMVI=
JkpXLlVZIz5MLTxKJj1PUFA2R09BPUtTLSI1Oi9DMEwzM0VYSiE5S1gzVTA4 WksxS0VSVS0pQzlCLTg1VDpATlUpWihIVVIgIDE/V1o2JlA+RkNZJ1BLIFY6 Q1QoWCA2KzlPKlBVTS8mKihNKU9JM1EmK1kkRSxOSD43O1JEWTApOD1JRk48 Ozk1UzJUTkZJOSY2V1AqVUwwQCogVUk6UiIvTDtDSjBGSlNQNCxTNCNIL0VE IC1QLDwnRFE8ISpITSRNOE8iMzBSQlYtQT8mWEFOIkVPSSJXMCkxRT8tPFEj QFlWN1JBIEosWjAmODNCJzM3QCUmTCgwKyowJ1NWWkwyJ0ZFTDggRlMxIUJY JD88NS48SDQpJUNTQitFVS4qOCk8KztaQEI6TysmUC9XNiotNSEtIEYmKS4h QVZXNlI/TEpFPihDITIxIF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S1GJ1Qs R0YrUjBBIFoqMi5AWkdTPFBONDRHJ0U=
It never encodes things the same each time your run it, but they can all be decoded the same way. There are no strange initial conditions you need to know about like time or some other kind of token.
The position/character couples are: 14: P, 20: M, 36: O, 92: 4, 137: ;, 158: >, 171: #, 177: U, 204: ", 207: S, 211: +, 276: ", 281: U, 364: U, 366: 9
[72, 55, 81, 36, 86, 49, 49, 37, 38, 61, 62, 86, 40, 63, 57, 43, 57, 62, 50, 47, 36, 43, 68, 38, 36, 54, 54, 86, 67, 46, 69, 52, 78, 37, 61, 33, 46, 77, 55, 41, 49, 70, 70, 53, 46, 74, 32, 50, 63, 40, 81, 82, 51, 90, 58, 82, 69, 77, 54, 42, 73, 67, 74, 80, 84, 85, 48, 86, 75, 71, 77, 61, 32, 58, 74, 44, 54, 53, 33, 78, 73, 41, 54, 69, 51, 44, 39, 32, 38, 60, 85, 68, 78, 80, 47, 33, 33, 32, 65, 35, 51, 34, 44, 35, 65, 39, 45, 73, 63, 34, 63, 79, 86, 63, 71, 80, 34, 45, 52, 52, 89, 61, 41, 60, 83, 35, 46, 39, 75, 87, 77, 50, 72, 58, 77, 53, 48, 48, 38, 70, 73, 71, 35, 77, 49, 85, 79, 73, 89, 46, 44, 47, 70, 35, 38, 50, 44, 49, 77, 74, 54, 67, 54, 45, 40, 35, 46, 80, 59, 33, 55, 58, 33, 75, 35, 53, 34, 42, 87, 67, 51, 77, 84, 67, 41, 83, 75, 72, 85, 45, 39, 55, 56, 81, 67, 39, 36, 80, 33, 52, 81, 88, 79, 57, 58, 88, 45, 87, 51, 59, 50, 54, 70, 40, 73, 86, 43, 71, 71, 79, 65, 67, 61, 40, 39, 76, 85, 33, 82, 59, 87, 72, 54, 74, 67, 87, 35, 82, 54, 50, 60, 85, 59, 57, 86, 79, 44, 70, 47, 62, 72, 53, 76, 68, 87, 35, 49, 41, 65, 58, 75, 48, 84, 80, 37, 63, 82, 50, 51, 65, 88, 78, 52, 55, 85, 33, 44, 33, 35, 89, 42, 32, 71, 61, 67, 48, 35, 55, 88, 41, 64, 58, 67, 74, 80, 62, 80, 63, 41, 38, 48, 43, 64, 33, 67, 71, 35, 55, 87, 44, 41, 61, 36, 37, 88, 39, 75, 70, 84, 88, 49, 73, 44, 70, 43, 33, 43, 37, 37, 71, 78, 82, 85, 85, 68, 49, 57, 66, 89, 44, 57, 37, 40, 62, 50, 44, 40, 72, 48, 39, 53, 35, 68, 55, 73, 70, 33, 49, 55, 61, 58, 39, 50, 40, 68, 82, 52, 83, 78, 78, 34, 41, 71, 61, 58, 81, 39, 68, 53, 69, 85, 68, 33]
[33, 56, 70, 50, 62, 48, 75, 72, 47, 71, 67, 61, 60, 78, 80, 64, 65, 39, 51, 44, 77, 34, 33, 71, 36, 77, 77, 85, 55, 88, 73, 46, 79, 77, 55, 69, 79, 81, 66, 85, 75, 76, 45, 80, 86, 66, 62, 39, 54, 64, 84, 32, 59, 42, 45, 67, 83, 46, 53, 66, 37, 47, 59, 34, 76, 39, 79, 81, 63, 46, 38, 81, 35, 81, 56, 33, 57, 65, 47, 48, 87, 53, 78, 82, 52, 72, 38, 84, 51, 60, 64, 83, 52, 79, 46, 48, 44, 80, 47, 47, 74, 33, 53, 53, 49, 67, 53, 54, 39, 47, 54, 45, 81, 41, 55, 72, 41, 74, 59, 55, 52, 33, 57, 67, 89, 87, 66, 85, 48, 81, 87, 53, 49, 65, 87, 52, 50, 59, 45, 68, 39, 59, 79, 65, 72, 66, 61, 89, 87, 77, 70, 75, 78, 77, 55, 75, 54, 66, 62, 62, 62, 71, 32, 59, 74, 75, 86, 36, 73, 86, 52, 35, 74, 81, 61, 59, 88, 85, 38, 61, 43, 40, 89, 84, 64, 42, 39, 41, 43, 37, 34, 41, 34, 55, 44, 35, 71, 36, 88, 62, 50, 74, 84, 72, 34, 64, 33, 83, 44, 62, 85, 43, 84, 65, 86, 63, 54, 37, 41, 52, 86, 85, 50, 43, 60, 35, 41, 87, 50, 37, 61, 85, 81, 74, 72, 82, 55, 90, 66, 55, 75, 64, 63, 65, 51, 33, 34, 73, 46, 63, 74, 69, 49, 82, 74, 66, 44, 88, 37, 33, 70, 39, 63, 62, 76, 63, 61, 88, 88, 46, 39, 36, 82, 39, 88, 88, 34, 82, 40, 84, 65, 85, 46, 85, 48, 58, 55, 52, 58, 46, 34, 64, 57, 77, 57, 69, 79, 73, 71, 71, 58, 67, 57, 50, 63, 75, 90, 41, 66, 50, 89, 38, 62, 61, 87, 51, 74, 45, 74, 44, 38, 40, 85, 56, 39, 47, 72, 39, 55, 57, 90, 65, 85, 67, 85, 69, 60, 81, 64, 67, 75, 71, 56, 41, 88, 44, 57, 37, 60, 59, 63, 79, 80, 79, 75, 72, 83, 60, 48, 34, 90, 68, 65, 65, 85, 82, 57, 50, 33, 42, 60, 65, 71, 70, 77, 55, 42, 81, 55, 60, 44, 49, 82]
However, assuming that approach, it is interesting to me that each resulting string ended up the same length. Trying to tease out some encoding code from the outputs now...
I'm not even sure where to start with using the unencoded string.
This is what I have so far and it seems to fit the original encoded message too.
The salt is the first 29 chars.
Each encrypted block is 59 chars.
So for the QBFs : 29 + 6x59
For the original message : 29 + 5x59
SALT: [52, 43, 58, 74, 44, 86, 86, 43, 33, 39, 46, 49, 77, 44, 52, 74, 84, 44, 51, 78, 53, 75, 52, 69, 40, 50, 47, 73, 82] BLOCKS: [40, 60, 54, 90, 67, 38, 60, 56, 60, 51, 50, 51, 42, 70, 83, 65, 83, 58, 53, 65, 61, 45, 47, 36, 78, 55, 33, 71, 57, 81, 33, 87, 64, 52, 67, 51, 72, 59, 53, 78, 62, 72, 55, 42, 78, 45, 84, 72, 79, 68, 43, 41, 62, 68, 40, 64, 84, 39, 86] [60, 57, 34, 69, 69, 89, 89, 50, 44, 73, 63, 60, 66, 46, 81, 81, 74, 71, 34, 77, 82, 89, 78, 85, 50, 63, 72, 83, 68, 52, 60, 58, 36, 52, 49, 46, 69, 49, 77, 90, 59, 68, 39, 43, 64, 84, 63, 45, 75, 56, 43, 37, 46, 73, 36, 46, 73, 74, 59] [33, 77, 36, 85, 77, 79, 66, 40, 65, 49, 41, 49, 87, 66, 52, 60, 85, 66, 71, 77, 39, 37, 60, 74, 61, 51, 47, 82, 34, 66, 35, 64, 61, 34, 54, 34, 52, 87, 46, 58, 55, 82, 65, 66, 82, 54, 89, 41, 42, 61, 57, 73, 33, 82, 45, 56, 70, 68, 55] [84, 79, 45, 55, 61, 76, 49, 62, 66, 48, 44, 82, 80, 71, 52, 65, 72, 39, 77, 57, 49, 42, 83, 64, 54, 52, 66, 66, 34, 72, 49, 59, 36, 51, 81, 70, 32, 53, 60, 71, 80, 51, 54, 36, 39, 87, 68, 77, 87, 79, 63, 90, 37, 64, 42, 86, 89, 43, 68] [49, 43, 32, 58, 33, 62, 44, 76, 59, 64, 57, 56, 33, 46, 48, 36, 48, 66, 57, 58, 52, 88, 59, 65, 90, 80, 69, 73, 54, 74, 64, 44, 40, 90, 72, 53, 87, 62, 90, 58, 46, 61, 37, 35, 46, 72, 59, 88, 42, 89, 45, 79, 51, 74, 45, 84, 45, 89, 83] [54, 39, 63, 85, 70, 35, 44, 89, 61, 48, 35, 88, 67, 63, 50, 35, 55, 47, 34, 89, 56, 35, 55, 85, 50, 71, 85, 79, 35, 70, 35, 84, 33, 62, 48, 33, 81, 55, 86, 79, 72, 49, 69, 69, 84, 46, 70, 61, 73, 66, 62, 55, 89, 85, 61, 35, 47, 86, 86]
SALT: [51, 56, 44, 77, 43, 83, 68, 71, 56, 36, 41, 86, 55, 43, 48, 54, 37, 49, 46, 69, 32, 90, 43, 73, 66, 53, 84, 75, 54] BLOCKS: [49, 86, 77, 59, 56, 60, 37, 32, 76, 88, 51, 80, 44, 51, 74, 56, 61, 38, 71, 67, 54, 58, 45, 74, 43, 65, 85, 80, 63, 54, 55, 87, 88, 53, 75, 81, 89, 69, 75, 80, 90, 50, 90, 37, 79, 64, 41, 41, 70, 50, 74, 75, 49, 75, 67, 44, 72, 50, 66] [76, 75, 60, 86, 32, 71, 49, 73, 53, 40, 52, 85, 59, 39, 89, 57, 34, 85, 39, 56, 54, 47, 34, 65, 66, 71, 37, 76, 70, 73, 46, 83, 54, 60, 79, 46, 86, 67, 39, 54, 71, 44, 34, 74, 64, 60, 77, 71, 44, 48, 60, 58, 71, 43, 73, 86, 67, 77, 45] [60, 67, 37, 68, 61, 70, 83, 77, 52, 76, 78, 32, 34, 47, 78, 40, 72, 72, 53, 62, 62, 85, 72, 51, 48, 73, 33, 52, 49, 36, 32, 85, 33, 35, 54, 45, 64, 63, 82, 75, 69, 53, 39, 89, 47, 63, 50, 38, 55, 90, 75, 89, 81, 53, 37, 61, 72, 32, 34] [39, 32, 85, 83, 82, 48, 70, 37, 62, 83, 82, 67, 52, 38, 90, 35, 47, 60, 54, 82, 88, 35, 75, 63, 64, 76, 58, 60, 54, 35, 59, 70, 80, 46, 63, 76, 48, 35, 41, 49, 43, 40, 81, 40, 38, 47, 71, 84, 40, 73, 47, 49, 45, 69, 81, 78, 57, 72, 59] [69, 39, 54, 44, 72, 39, 86, 75, 35, 75, 86, 32, 39, 50, 68, 34, 49, 79, 83, 66, 80, 57, 40, 84, 43, 70, 63, 58, 35, 82, 40, 70, 81, 47, 83, 50, 64, 63, 42, 78, 63, 68, 47, 73, 86, 72, 56, 89, 72, 36, 64, 59, 35, 62, 88, 76, 68, 49, 60] [86, 37, 40, 74, 74, 67, 72, 46, 41, 69, 79, 85, 44, 58, 56, 44, 69, 38, 55, 59, 76, 59, 87, 55, 60, 76, 43, 51, 90, 36, 77, 45, 70, 39, 84, 44, 71, 70, 43, 82, 48, 65, 32, 90, 42, 50, 46, 64, 90, 71, 83, 60, 80, 78, 52, 52, 71, 39, 69]
(Edit: obviously I'm talking about the files after they have been base64 decoded…)
IThGMj4wS0gvR0M9PE5QQEEnMyxNIiFHJE1NVTdYSS5PTTdFT1FCVUtMLVBW Qj4nNkBUIDsqLUNTLjVCJS87IkwnT1E/LiZRI1E4ITlBLzBXNU5SNEgmVDM8 QFM0Ty4wLFAvL0ohNTUxQzU2Jy82LVEpN0gpSjs3NCE5Q1lXQlUwUVc1MUFX NDI7LUQnO09BSEI9WVdNRktOTTdLNkI+Pj5HIDtKS1YkSVY0I0pRPTtYVSY9 KyhZVEAqJykrJSIpIjcsI0ckWD4ySlRIIkAhUyw+VStUQVY/NiUpNFZVMis8 IylXMiU9VVFKSFI3WkI3S0A/QTMhIkkuP0pFMVJKQixYJSFGJz8+TD89WFgu JyRSJ1hYIlIoVEFVLlUwOjc0Oi4iQDlNOUVPSUdHOkM5Mj9LWilCMlkmPj1X M0otSiwmKFU4Jy9IJzc5WkFVQ1VFPFFAQ0tHOClYLDklPDs/T1BPS0hTPDAi WkRBQVVSOTIhKjxBR0ZNNypRNzwsMVI=
The first 5 characters are "!8F2>"
Those 5 characters represent the first "T". Another "T" won't necessarily result in the same code. Actually, the odds of ever seeing that code again for a "T" is low.
DON’T FORGET TO DRINK YOUR OVALTINE
Seriously, don't downvote me. That's the decrypted message.
http://grack.com/blog/2010/12/19/solving-the-carwoo-code-bre...
I have reason to believe that: "0KH/GC=" encodes "H" "<NP@A'3,M"!" encodes "E" ...
[Do not read further if you want to solve it yourself]
1. The encoded string can be divided into groups of chars, each representing one (decoded) char. These groups occur every 5, 7, 11, and 13 chars. That is, chars 0-4 correspond to group 1, chars 5-11 correspond to group 2, etc. After the first 4 groups, the lengths repeat. Thus group 5 is chars 36-40.
2. As hinted in this thread, the space is of 59 chars, and there's an offset of 32. So, for each char in each group, subtract 32, sum them up, mod by 59. Add 32 to this result, and that's your decoded character ascii code.
Example: "!8F2>" corresponds to [33, 56, 70, 50, 62]. Subtracting 32 from each of those is [1, 24, 38, 18, 30]. The sum of those is 111. 111 % 59 = 52. Adding back the 32 offset, yields ascii code 84, corresponding to "T".
it seemed fitting as it is the only encoded message in any holiday movie I could think of! :)