MillerRabin素性检验 nt MillerRabin(unsigned char Odd[],unsigned char Random[],int s,unsigned char Mp[]){//MillerRabin素性检验//OK unsigned char A[M],B[M]; int t,i; PowerFunct
B_M算法求线性复杂度 可以处理无限数据,求其线性复杂度 //by史瑞 //LFSR线性移位寄存器以及求异或运算OK unsigned char LFSRB_M(unsigned char *fun,unsigned char *seq,unsigned long Cont){ unsigned long x; unsig
隐式或明式输入密码 //by史瑞 //隐式或明式输入密码 #include #include #include //#define PROCALIM OK typedef struct KeyNode { char ch; struct KeyNode *next; }; #define LEN sizeof(stru
Euclid算法判断互素 //by史瑞 #include #include #defineboolint #definetrue1 #definefalse0 #defineM2//判断多少个数互素 staticlongintNumber[M]={170,201}; boolJudgePrime(longintIna,lo
随即全排列生成器 //by史瑞#include//srand()、rand()#include//time();#include#includeswap(unsignedchar*pm,unsignedchar*pn){unsignedchartemp;temp=*pm;*pm=*pn;*pn=temp;}voidR
对偶反馈移位寄存器DSR //by史瑞//进动一拍输出一个字节okunsignedcharDSR_MoveWord(unsignedchar*Const,unsignedchar*Array,unsignedlongnum){inti,t;unsignedcharch,Output=0x00;for(i=0;i>=i;Out