KeyTo9_Fans 发表于 2018-4-29 23:01:57

这些密文用的是什么加密方法?

《我的绿洲》游戏为了防止用户篡改游戏的存档,对游戏存档里的数据进行了加密处理。

以下是游戏数据的明文和密文:
    0: 1b0000007fff5fa696dc10000000593d4126b488ae0da751a57b36bc6ebb7b7e0c
    0: 1b0000007fff5fa696dc100000004c7987fc8b1e84412a0fd7c83d5534307b7e0c
    0: 1b0000007fff5fa696dc10000000744ba462289cc210feee0521f94da9977b7e0c
    1: 1b0000007fff5fa696dc100000009c55a30ff2a4b61a051db948b823d4ce7b7e0c
    1: 1b0000007fff5fa696dc100000005b343aa4c0d474bdb052f6bbd03d72427b7e0c
    2: 1b0000007fff5fa696dc1000000076655eed75b411b9906b39981b8834e37b7e0c
    2: 1b0000007fff5fa696dc10000000a92122430b166cd754ef2a041a876a597b7e0c
    3: 1b0000007fff5fa696dc100000003b1e21c221c0ab4bba20a192c808fb327b7e0c
    3: 1b0000007fff5fa696dc10000000a8bea91d167a83ef2c0b76d2958f8fc97b7e0c
    4: 1b0000007fff5fa696dc1000000061af9d1bad8dadc5805d4e3fbe5101807b7e0c
    4: 1b0000007fff5fa696dc10000000222b6884373b7e7d02dcfcebc944117b7b7e0c
    5: 1b0000007fff5fa696dc10000000e69ee365e9004e9a4df5357416099ade7b7e0c
    6: 1b0000007fff5fa696dc100000000335edc0e5ab51d71a9ffb9098af35b97b7e0c
    7: 1b0000007fff5fa696dc1000000051dbf7637e44ae33ac9ed079478269db7b7e0c
    8: 1b0000007fff5fa696dc10000000b3ad418044f75367ca23b46fe769ff057b7e0c
    9: 1b0000007fff5fa696dc10000000e2aa33e7a44bb8362368d3be5e90b1297b7e0c
    9: 1b0000007fff5fa696dc10000000d48b6abe16459fb0ca2b715af93c081c7b7e0c
   10: 1b0000007fff5fa696dc100000002567df6d1cdc55a9d6685757015567427b7e0c
   10: 1b0000007fff5fa696dc10000000a3c6691717702a939f7ef56e8115d25e7b7e0c
   11: 1b0000007fff5fa696dc10000000eef7e6c879e5f97c4924aed380307c677b7e0c
   12: 1b0000007fff5fa696dc100000008ee32707b8477ae26f063c898b62aa537b7e0c
   13: 1b0000007fff5fa696dc100000006921dd49b2329de1b49024e1ef56e8957b7e0c
   14: 1b0000007fff5fa696dc1000000024d56231fe60fc08afa9671aae2007567b7e0c
   15: 1b0000007fff5fa696dc1000000027631316f121aece0e7116c50576f3db7b7e0c
   16: 1b0000007fff5fa696dc1000000060eee25dfd4af0740a0ec3079601bac77b7e0c
   17: 1b0000007fff5fa696dc1000000040d9c4c3e1521098c69ac6601d6b94077b7e0c
   18: 1b0000007fff5fa696dc10000000ceaa3f96b3b0f7d5e791eb5f99d69bbc7b7e0c
   19: 1b0000007fff5fa696dc100000006b1df01bc545255708391adcd3a48f657b7e0c
   20: 1b0000007fff5fa696dc100000008524698315c75e41f64961dc1935154f7b7e0c
   20: 1b0000007fff5fa696dc100000006b92f41ff375cd0f5d20831db1f12ddc7b7e0c
   21: 1b0000007fff5fa696dc10000000b3b6de07442f654bee9d21e5b5a043ab7b7e0c
   22: 1b0000007fff5fa696dc10000000e306251286dc649afb343b4bc2f683f77b7e0c
   23: 1b0000007fff5fa696dc10000000180728a1e3a403794317d9a50ff33fd17b7e0c
   24: 1b0000007fff5fa696dc1000000045777a6a1139a3dd4a3c9b851db09fb87b7e0c
   25: 1b0000007fff5fa696dc10000000917a94934c78b176253d38f3330930f97b7e0c
   26: 1b0000007fff5fa696dc10000000ea524331f4234f0ddf2bbadd414f98a47b7e0c
   27: 1b0000007fff5fa696dc1000000033ddbd5d5a01296490d1d252a0f528f17b7e0c
   28: 1b0000007fff5fa696dc10000000c9f1577c240e9e36cc407bdfc5423c217b7e0c
   29: 1b0000007fff5fa696dc10000000474b55a96511cbc613f3f58289582f217b7e0c
   30: 1b0000007fff5fa696dc100000004723fc1111e82525c180e1c5418106947b7e0c
   31: 1b0000007fff5fa696dc1000000069dc534b8ca9609969ba288d26e99e677b7e0c
   32: 1b0000007fff5fa696dc10000000edc1a0a804c95ae27197f667f729f6fa7b7e0c
   33: 1b0000007fff5fa696dc100000005984194d93f77aa9d6737220e9c235da7b7e0c
   34: 1b0000007fff5fa696dc1000000065ea067977101e1946946d010c0c5f987b7e0c
   35: 1b0000007fff5fa696dc100000002793e9b9afed9b8a611568826aa4c53b7b7e0c
   36: 1b0000007fff5fa696dc10000000fedbbb9545aa1eaf6f25944bc425e85e7b7e0c
   37: 1b0000007fff5fa696dc100000009e6c1385f0429b403c1a7c9f56a46dac7b7e0c
   38: 1b0000007fff5fa696dc1000000086f2817bac6ae1c3abfcf5f59b7cb15d7b7e0c
   39: 1b0000007fff5fa696dc10000000170ba8b809437ad7f1e00254422c98b27b7e0c
   40: 1b0000007fff5fa696dc100000003a150f6aab2d3522b3bad41b143fdd3b7b7e0c
   41: 1b0000007fff5fa696dc100000009f6899507068a1f2be9f85cb7c3b130f7b7e0c
   42: 1b0000007fff5fa696dc10000000d7818148375b0d5bf7830ef4fcdeae3b7b7e0c
   43: 1b0000007fff5fa696dc1000000019b37d4fc5627362e36e9d0a5f1703757b7e0c
   44: 1b0000007fff5fa696dc10000000f216751593cac9b8d10bb47fed2d3deb7b7e0c
   45: 1b0000007fff5fa696dc100000003deb6f868a02e26763eb8df14a3525877b7e0c
   46: 1b0000007fff5fa696dc1000000081a32d067222e2b08c411e4a3275cd4d7b7e0c
   47: 1b0000007fff5fa696dc1000000067fc78fb25e9dba35d5f5e599cb48b617b7e0c
   48: 1b0000007fff5fa696dc1000000040eda41df824746230331f144b0773f77b7e0c
   49: 1b0000007fff5fa696dc100000009e991bf9b1f881f6dc69f7fd2f6e5bc07b7e0c
   50: 1b0000007fff5fa696dc100000000ba88ad470bb18b7ad9f5627e0e6e03b7b7e0c
   51: 1b0000007fff5fa696dc100000007848a4ebe2bc85aac290e2208f48c5bc7b7e0c
   52: 1b0000007fff5fa696dc1000000093a157010fb2a07e9ce23060cc92136f7b7e0c
   53: 1b0000007fff5fa696dc10000000237d333d74d87dd139ef58c4792743107b7e0c
   54: 1b0000007fff5fa696dc1000000054519a037e2f78445cbf2a0e03853e3b7b7e0c
   55: 1b0000007fff5fa696dc10000000c651e9c986b7c3bf038651370d8cd0407b7e0c
   56: 1b0000007fff5fa696dc10000000ab5efc4230ae39178cd1d3e372585f8d7b7e0c
   57: 1b0000007fff5fa696dc1000000022944d32b33c9d3c71b582ff62e090e17b7e0c
   58: 1b0000007fff5fa696dc10000000a557c90ffdae5bbe5cc23f8b289d77257b7e0c
   59: 1b0000007fff5fa696dc10000000fc78b76be15a9039ded7ce2fcf1f9cbb7b7e0c
   60: 1b0000007fff5fa696dc10000000ab201966d341323c755bbda6477f93d07b7e0c
   61: 1b0000007fff5fa696dc10000000b2c55caaa0dc603e0c16689657362dc97b7e0c
   62: 1b0000007fff5fa696dc100000002547005a12210b1ae475648ff5d3c61b7b7e0c
   63: 1b0000007fff5fa696dc10000000399851bbb7d0483eba8f4b97228241967b7e0c
   64: 1b0000007fff5fa696dc10000000f639606772acbd5937cc872da6c672c47b7e0c
   65: 1b0000007fff5fa696dc10000000c0fa224b2c1ac4e86ddabb26de0c62c47b7e0c
   66: 1b0000007fff5fa696dc100000005cad526bde747d0b684da32b549fee057b7e0c
   67: 1b0000007fff5fa696dc10000000a4ae4b5d78c10131b890670c852e72dc7b7e0c
   68: 1b0000007fff5fa696dc10000000242e3b86980b38fac04d9bc6be616a387b7e0c
   69: 1b0000007fff5fa696dc1000000036da63e2fd1b59ab4bbf5263e7553b267b7e0c
   70: 1b0000007fff5fa696dc10000000b56f0eb657189c4702edaae28a544f757b7e0c
   71: 1b0000007fff5fa696dc100000001deda65f2f313f8ef2b5e6ae7a65540f7b7e0c
   72: 1b0000007fff5fa696dc100000008882ab18cc2d47427f83043d546867c47b7e0c
   73: 1b0000007fff5fa696dc10000000ff8d19e935214a63390ef0bb4d914eaa7b7e0c
   74: 1b0000007fff5fa696dc1000000005a42efda711b1f08acbe3cbd4ce06207b7e0c
   75: 1b0000007fff5fa696dc10000000777b45ecafaa5efc8c2f10232e6382e07b7e0c
   76: 1b0000007fff5fa696dc100000000b2c81bb198b0c73d73ad4618bfc4be27b7e0c
   77: 1b0000007fff5fa696dc1000000017ad0e1d48f2454c583d37446adfbfb37b7e0c
   78: 1b0000007fff5fa696dc10000000deebd8eb8f8afe6dbd0ee4e968fd55e77b7e0c
   79: 1b0000007fff5fa696dc100000003ec4b42cd8b41d9bdd1e2a59822750527b7e0c
   80: 1b0000007fff5fa696dc10000000d6cd1061c55dfd48c4818a68faf162d27b7e0c
   81: 1b0000007fff5fa696dc100000008d40e349593b3419975a665365c266887b7e0c
   82: 1b0000007fff5fa696dc10000000ffdd177981dfdf48fe9121fa1c5c62ad7b7e0c
   83: 1b0000007fff5fa696dc1000000043f53334ec072a9f1cfeb43324ec13627b7e0c
   84: 1b0000007fff5fa696dc10000000193a46ac927c3e7dbaa8ad4e855fc7a27b7e0c
   85: 1b0000007fff5fa696dc100000007524249fa580300dc0c832333e8646607b7e0c
   86: 1b0000007fff5fa696dc100000006bf8ec5110cce094720bc7933b4969907b7e0c
   87: 1b0000007fff5fa696dc10000000707a87de547b652f614685f5e5fbc5b87b7e0c
   88: 1b0000007fff5fa696dc1000000030e6302904aa61e2074dbd2741616f747b7e0c
   89: 1b0000007fff5fa696dc10000000bf57d54222715e9a59d3cce24ef459ee7b7e0c
   90: 1b0000007fff5fa696dc10000000e8e6e4dbd519dd88eff45c03801c7a157b7e0c
   91: 1b0000007fff5fa696dc100000009ce88c141014276feac2147e06bcf2d97b7e0c
   92: 1b0000007fff5fa696dc10000000a4240b6805041caa19510ca2f0f6497b7b7e0c
   93: 1b0000007fff5fa696dc10000000488b29eb64cab153f7a04db795157c187b7e0c
   94: 1b0000007fff5fa696dc10000000ec3210d210c8678f41c66416b8ca81b37b7e0c
   95: 1b0000007fff5fa696dc10000000295bd613bd7350487f2e147c09e36ce37b7e0c
   96: 1b0000007fff5fa696dc10000000eaae5d16e9ae29843a9521cd3dfa76ba7b7e0c
   97: 1b0000007fff5fa696dc1000000053c852cf53757861406e8a8cb1d0fc5b7b7e0c
   97: 1b0000007fff5fa696dc10000000f7665a48c44f172069185fa68dc751047b7e0c
   98: 1b0000007fff5fa696dc100000009679a9dba0e420da9d617635548d99d77b7e0c
   98: 1b0000007fff5fa696dc1000000026625831dcda5f6d94f892102ea1969b7b7e0c
   99: 1b0000007fff5fa696dc10000000462a231891c026fba5a6d2d4ccc564727b7e0c
   99: 1b0000007fff5fa696dc10000000ec8c1b83b74b4ab67dfb9ccd0344ee727b7e0c
100: 2b0000007fff5fa696dc20000000956335f606cc8f8bbc8d289ef19b5aa8bdc790d0f91dfa111de62b4a70a2172a7b7e0c
100: 2b0000007fff5fa696dc200000002c08a966a9ff7bef0e5b95c47befb7a907debfa3f664f6e3eda94f753a716c487b7e0c
101: 2b0000007fff5fa696dc20000000fce918543c71d7f48c1e5c781a3bf6998bfe217a2e005b1c454caed6e48aa5847b7e0c
102: 2b0000007fff5fa696dc20000000e5ab9ae72f9a761d423880c61b1026cfd273a5a04d540d470ae55eeaabcfe8847b7e0c
102: 2b0000007fff5fa696dc2000000098995f7242283993fb1af53b41483eb27281199f900ac46a2df3eccec11c47187b7e0c
103: 2b0000007fff5fa696dc2000000063bbf62988f056ba44cd9ec5a1573729638d8c2633904f18c8feece20afe09d67b7e0c
104: 2b0000007fff5fa696dc20000000d8937851deefbc0e945651cd79f4ca790fd4c48cf052c30686739c54735313c07b7e0c
105: 2b0000007fff5fa696dc20000000bb44b3ca927611be33c93a0456795b640b72d3c51b11eb736ae28383ceb93d1b7b7e0c
106: 2b0000007fff5fa696dc200000009bbb937d4f8eec232ecd949865e5113d6f0d84e9217f2d6b9dea188353407a547b7e0c
107: 2b0000007fff5fa696dc20000000515e188a973841549d9c0da82da8649537b88c846e8d7357b68adb0a5a9a2d677b7e0c
108: 2b0000007fff5fa696dc2000000052657e8cf3e8f0dd7d5bf50471e39951d926d28835556130a235069fb90a87ac7b7e0c
109: 2b0000007fff5fa696dc20000000aefe4ebc6e19a203e6a8ac2314b98762d96d825e0f119ace50443322902f15ea7b7e0c
110: 2b0000007fff5fa696dc2000000056f479efaaf4616844deef43ac2d3f6b77faeaf50612bdcc26e695d976c4a1247b7e0c
111: 2b0000007fff5fa696dc20000000a84429c2ad764ae218a23ce5e03d4b4b4455e84b2146fe56879fb146e89812cf7b7e0c
112: 2b0000007fff5fa696dc20000000b04add86537c7fdc276fe60075243c48c1c4c846f59562d6a566b552868761367b7e0c
113: 2b0000007fff5fa696dc200000007f95eb4424ea658fee1ad4c8c3dad01eafa79512134e3201d14be684479d5ac87b7e0c
114: 2b0000007fff5fa696dc2000000084a4e7ae149770a3699e64d5e47dabaab14225385fefa1da1253a8d6b3b9166b7b7e0c
115: 2b0000007fff5fa696dc200000007766885946aa41f4cb37091f9312b7f31834e35865bd04dab7d846f1014825c77b7e0c
117: 2b0000007fff5fa696dc2000000040f96ba956cccbf2d8d7e2001d63760a19005301183fff0381689b78fd7f76117b7e0c
118: 2b0000007fff5fa696dc2000000037a2c79ae65f283d08efc6c437f66be08115074b1ec7a543feae43e14df45b417b7e0c
122: 2b0000007fff5fa696dc20000000af2c54d9cf7f01aebeb0c7791a30f56d6bb5f4293c45ca24864d45cfc29c16f87b7e0c
123: 2b0000007fff5fa696dc20000000d8167c4ae2299a67f73398344853771e27c98c406e8dad6924efad4d140fe0fd7b7e0c
129: 2b0000007fff5fa696dc200000004bebe6a0593f81417d17a513c57c2f1ded3b05bfe95fd771d41a4c156dad11607b7e0c
166: 2b0000007fff5fa696dc20000000b9336b16755046bc7e70769c77b85d1f493c3a4da92d3d10b9f67abdec4a15337b7e0c
202: 2b0000007fff5fa696dc2000000093198edcc683427428ad04f36ec2fee5fdcc781bc7d55a6a431c2e5001d7d08b7b7e0c
294: 2b0000007fff5fa696dc2000000049f1ad6c1559e7c22befd0bca4ff7b6ed7f9b8c90c724072580d3bd9c4f7453d7b7e0c
322: 2b0000007fff5fa696dc2000000062bcec1042d9075150f9ecbd48144c195554c11f560fec973ac2348797ed13797b7e0c
446: 2b0000007fff5fa696dc2000000073652e7a467d5fe0a3dc7c284197071e91277a35df17b2702ee925794c668e7b7b7e0c
2107: 2b0000007fff5fa696dc20000000efc491b56dc1254eb99d6c7e7e1f74bea06c03593168cc3dbe5c2aacee55bc5a7b7e0c
2888: 2b0000007fff5fa696dc200000009ac80d885f1aa34ba52ac89b9370854b4d354f6e87473a9ab868992c21e2764e7b7e0c
18376: 2b0000007fff5fa696dc2000000082c30938891e657345f62f4267d0e59225d614c08762544f2492ab110e85e2d97b7e0c
41686: 2b0000007fff5fa696dc200000006f2e8d43f145f1a9859cdcb8cb6d100af5a5262f4d37ff017da5a75b463894517b7e0c
其中冒号前面的整数是明文,冒号后面的数据是密文。

经过观察以上明文和密文,我发现了以下规律:

$1$、密文前后是一致的冗余信息,前文仅用来指示加密后的长度,后文是结束标志,只有中间的$128$比特或者$256$比特是有效信息,互不相同。
$2$、小于$100$的数加密后的有效信息是$128$比特,大于等于$100$的数加密后的有效信息是$256$比特。
$3$、同一个数可以对应不同的密文。
$4$、这个加密方法是可逆的:该游戏可以根据密文还原出原始数据。
$5$、如果随机生成密文,那么只有极少数的密文是合法的,绝大多数的密文都是非法的:该游戏遇到非法的密文,一律还原为$0$。

但我仍然不知道具体的加密和解密算法(尝试过用在线的MD5解密工具来解密,解不出来)。

你们可以根据上述明文和密文推断出该游戏用了什么加密解密方法吗?

wayne 发表于 2018-4-30 14:02:21

没玩过这种游戏。看着好像都是十六进制的字符呢。

这种逆向工程的事情,基本上就是碰运气,捡漏。需要反复的试错与观察。 脱离游戏环境,我们没办法进行合法性验证吧

mathe 发表于 2018-4-30 14:48:37

这个以100为界很奇怪。比较大的可能是大于一百的数被拆分为两个数了。不知道你的实验能否试验负数和更大的数,看看能否找到384比特或512比特的数。我们可以猜测输入数据首先被分成若干组,比如不超过100的现在一组即可,大于100的至少两组。然后每组数前面随机补充一些数据,形成128比特的数,然后乘上某个128比特数再模上一个128比特大素数

mathe 发表于 2018-4-30 15:11:41

由于很多随机数据被认为是非法的,那么估计除了补充随机数据外,还添加了一部分教验数据
页: [1]
查看完整版本: 这些密文用的是什么加密方法?