|
[求助]- -!算法求解。绝对符合大牛的胃口
this.decrypt = function(string, key) { if (string == "") { return ""; } string = xxtea_decrypt(string); var v = stringToLongArray(string, false); var k = stringToLongArray(key, false); if (k.length < 4) { k.length = 4; } var n = v.length - 1; var z = v[n - 1], y = v[0]; var mx, e, p, q = Math.floor(6 + 52 / (n + 1)), sum = q * delta & 0xffffffff; while (sum != 0) { e = sum >>> 2 & 3; for (p = n; p > 0; p--) { z = v[p - 1]; mx = (z >>> 5 ^ y << 2) + (y >>> 3 ^ z << 4) ^ (sum ^ y) + (k[p & 3 ^ e] ^ z); y = v[p] = v[p] - mx & 0xffffffff; } z = v[n]; mx = (z >>> 5 ^ y << 2) + (y >>> 3 ^ z << 4) ^ (sum ^ y) + (k[p & 3 ^ e] ^ z); y = v[0] = v[0] - mx & 0xffffffff; sum = sum - delta & 0xffffffff; } return toUTF16(longArrayToString(v, true)); } 这段不就是解密的函数吗?你是想要个C语言版本的解密函数?还是想分析一下这个加密算法啊? |
|
[求助]ssldump解析openssl密文的问题
先抓包保存下来在解密。如果你需要那种同步的话,需要自己写模块处理。不过我上官网找了一下,貌似不见有源代码下载,听说台湾那边有镜像,这里访问不了。 |
|
[调查]大学院校信息安全相关系所一览表
仔细看看要求,《法律基础》和《思想道德修养》属于公共课,不是专业课,不在调查范围之内。 |
|
|
|
[原创]The XOR Secret in Our Computer System
今天重新看了一下,关于负数的补码表示。在实际的密码方案中,貌似大部分都是再模操作下的运算,不存在“负数”。我的意思是,比如说-1=4(mod5)这样。 |
|
[下载]★★★密码学综合工具 Ver 3.0 正式版 发布!★★★
需要注册才能下载。建议楼主从官方论坛下载回来,再以附件的形式帖上来吧。 |
|
[求助]x*x mod(a) *x mod(a)=b 求x
e=3貌似有攻击方法,等我回去翻翻书再来回复。 |
|
|
|
[求助]加密后的unsigned char* 类型数据如何在数据库保存
pRst是个游标吧,Execute之后就打开了,select默认是只读的,不能修改,因此不能使用Put方法。打开时应该使用恰当的游标类型。 |
|
[求助]RSA 512bit 破解问题
顶,记住了,下次找你。 |
|
|
|
|
|
[求助]怎么快速搜索一个大素数? (翻遍了论坛也没找到有关帖子)
请问这个库是用什么算法生成素数的? |
|
[求助]P2P网络节点如何交换密钥
SAKA可以吗? |
|
|
|
[求助]发一个密码函数,大家分析下!
参考一下。jmr为jm的逆函数。 输入:m=123456 输出: jm(m)=12x56 jmr(jm(m))=zmeh34kier jm(jmr(m))=123456 输入:m=zmeh34kier 输出: jm(m)=12x56 jmr(jm(m))=zmeh34kier jm(jmr(m))=zmeh34kier 简单分析的结论: 1.jm不是一个单射函数 2.jm限制在一个子空间上就是个双射。这个子空间应该是由table(见下面的代码)的key生成。 3.根据jm(x)=y计算x是容易的。 #include <stdio.h> #include <string.h> struct node{ char key[3]; char value[2]; }; struct node table[] = { {"aa", "z"}, {"ag", "y"}, {"34", "x"}, {"33", "w"}, {"32", "v"}, {"31", "u"}, {"30", "t"}, {"29", "s"}, {"28", "r"}, {"27", "q"}, {"26", "p"}, {"25", "o"}, {"24", "n"}, {"23", "m"}, {"22", "l"}, {"21", "k"}, {"20", "j"}, {"19", "i"}, {"18", "h"}, {"17", "g"}, {"j6", "f"}, {"g5", "e"}, {"3e", "d"}, {"cv", "c"}, {"ni", "b"}, {"df", "a"}, {"p8", "."}, {"o7", "_"}, {"h9", "9"}, {"r8", "8"}, {"w2", "7"}, {"er", "6"}, {"ki", "5"}, {"ba", "4"}, {"mi", "3"}, {"eh", "2"}, {"zm", "1"}, {"lx", "0"}, }; char *jm(char *m) { static char *buffer = NULL; static int num = sizeof(table) / sizeof(table[0]); char *def = "123456"; char *str; char one[3]; if(m == NULL || strlen(m) == 0) { str = def; } else { str = m; } int zf = strlen(str); int p = 0; if(buffer != NULL) delete buffer; buffer = new char[zf + zf / 2 + 1]; int i, j; for(i = 1; i <= zf/2; i++) { one[0] = str[2 * i - 2]; one[1] = str[2 * i - 1]; one[2] = 0; for(j = 0; j < num; j++) { if(strcmp(one, table[j].key) == 0) { buffer[p++] = table[j].value[0]; break; } } if(j >= num) { buffer[p++] = one[0]; buffer[p++] = one[1]; } } buffer[p] = 0; return buffer; } char *jmr(char *m) { static char *buffer = NULL; static int num = sizeof(table) / sizeof(table[0]); int i, j; int zf = strlen(m); if(buffer != NULL) delete buffer; buffer = new char[zf * 2 + 1]; memset(buffer, 0, zf * 2 + 1); for(i = 0; i < zf; i++) { for(j = 0; j < num; j++) { if(m[i] == table[j].value[0]) { strcat(buffer, table[j].key); } } } return buffer; } int main() { char m[1024]; while(scanf("%s", m) != EOF) { printf("%s\n", jm(m)); printf("%s\n", jmr(jm(m))); printf("%s\n", jm(jmr(m))); } return 0; } |
|
|
|
|
操作理由
RANk
{{ user_info.golds == '' ? 0 : user_info.golds }}
雪币
{{ experience }}
课程经验
{{ score }}
学习收益
{{study_duration_fmt}}
学习时长
基本信息
荣誉称号:
{{ honorary_title }}
能力排名:
No.{{ rank_num }}
等 级:
LV{{ rank_lv-100 }}
活跃值:
在线值:
浏览人数:{{ visits }}
最近活跃:{{ last_active_time }}
注册时间:{{ user_info.create_date_jsonfmt }}
勋章
兑换勋章
证书
证书查询 >
能力值