搜索资源列表
DESProcess
- DESProcess FILE *mfp,*cfp int ttch=0,xorRes,ttbitdiff=0 char mch,cch float bdiff=0 if((mfp=fopen(mfile,\"r\"))==NULL) {cout<<\"Cannot open the file to compare\"<<endl } if((cfp=fopen(cfile,\"r\"))==NULL) {cou
jj
- CORNACCHIA Algorithm * * GOAL: given d and p prime, find (x,y) such that x^2 + y^2 = d * p * * in this implementation, d = 1. This code does not accept d <> 1 !!! * see "A Course in Computational Algebraic Number Theory" by Henri
BASE64
- BASE64解码 VBS源代码 Function fDecode(sStringToDecode) Const CharList = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" Dim iDataLength, sOutputString, iGroupInitialCharacter sStringToDecode = Replace(Replace(Replace(sSt
456
- RSA算法的C语言实现 1.密钥的产生 (1)选两个安全的大素数p和q。 (2)计算n=p×q,φ(n)=(p-1)(q-1),其中φ(n)是n的欧拉函数值。 (3)选一整数e,满足1<e<φ(n),且gcd(φ(n),e)=1。 (4)计算d,满足de≡1 modφ(n),即d是e在模φ(n)下的乘法逆元,因e与φ(n)互素,由模运算可知,它的乘法逆元一定存在。 (5)以{e,n}为公开钥,{d,n}为秘密钥。 2.加密 加密时首先将明文M比特串分组
Elgamal
- ElGamal algorithm not only used for data encryption can be used for digital signatures, their safety depends on the calculation of a finite field discrete logarithm this problem. Key to the method. First of all, choose a prime number p, the two rando
jm
- 一,产生密钥(算法实现可参照文档后的<附件1>KeyGeN.asp) 与<附件1>不同的是,实际要求密钥存放在字符串接受方数据库表KeyPool中,表结构如下: 1,personalID{主码} 2,secret_key{密钥,数据类型最好用text,与实际代码密钥生成长度有关} 3,serverTime{密钥生成时间,用以检验密钥是否失效} 接受方发现密钥失效,则拒绝验证 二,字符串加密(算法实现可参照文档后的<附