亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? twofish.c

?? Twofish 采用128位數據塊(128 bits lock)
?? C
?? 第 1 頁 / 共 3 頁
字號:
   (c) = (((c) << 1)+((c) >> 31)); \   (c) ^= (x + ctx->k[2 * (n)])/* Encryption and decryption cycles; each one is simply two Feistel rounds * with the 32-bit chunks re-ordered to simulate the "swap" */#define ENCCYCLE(n) \   ENCROUND (2 * (n), a, b, c, d); \   ENCROUND (2 * (n) + 1, c, d, a, b)#define DECCYCLE(n) \   DECROUND (2 * (n) + 1, c, d, a, b); \   DECROUND (2 * (n), a, b, c, d)/* Macros to convert the input and output bytes into 32-bit words, * and simultaneously perform the whitening step.  INPACK packs word * number n into the variable named by x, using whitening subkey number m. * OUTUNPACK unpacks word number n from the variable named by x, using * whitening subkey number m. */#define INPACK(n, x, m) \   x = in[4 * (n)] ^ (in[4 * (n) + 1] << 8) \     ^ (in[4 * (n) + 2] << 16) ^ (in[4 * (n) + 3] << 24) ^ ctx->w[m]#define OUTUNPACK(n, x, m) \   x ^= ctx->w[m]; \   out[4 * (n)] = x; out[4 * (n) + 1] = x >> 8; \   out[4 * (n) + 2] = x >> 16; out[4 * (n) + 3] = x >> 24#define TF_MIN_KEY_SIZE 16#define TF_MAX_KEY_SIZE 32#define TF_BLOCK_SIZE 16/* Structure for an expanded Twofish key.  s contains the key-dependent * S-boxes composed with the MDS matrix; w contains the eight "whitening" * subkeys, K[0] through K[7].	k holds the remaining, "round" subkeys.  Note * that k[i] corresponds to what the Twofish paper calls K[i+8]. */struct twofish_ctx {   u32 s[4][256], w[8], k[32];};/* Perform the key setup. */static int twofish_setkey(void *cx, const u8 *key,                          unsigned int key_len, u32 *flags){		struct twofish_ctx *ctx = cx;	int i, j, k;	/* Temporaries for CALC_K. */	u32 x, y;	/* The S vector used to key the S-boxes, split up into individual bytes.	 * 128-bit keys use only sa through sh; 256-bit use all of them. */	u8 sa = 0, sb = 0, sc = 0, sd = 0, se = 0, sf = 0, sg = 0, sh = 0;	u8 si = 0, sj = 0, sk = 0, sl = 0, sm = 0, sn = 0, so = 0, sp = 0;	/* Temporary for CALC_S. */	u8 tmp;	/* Check key length. */	if (key_len != 16 && key_len != 24 && key_len != 32)	{		*flags |= CRYPTO_TFM_RES_BAD_KEY_LEN;		return -EINVAL; /* unsupported key length */	}	/* Compute the first two words of the S vector.  The magic numbers are	 * the entries of the RS matrix, preprocessed through poly_to_exp. The	 * numbers in the comments are the original (polynomial form) matrix	 * entries. */	CALC_S (sa, sb, sc, sd, 0, 0x00, 0x2D, 0x01, 0x2D); /* 01 A4 02 A4 */	CALC_S (sa, sb, sc, sd, 1, 0x2D, 0xA4, 0x44, 0x8A); /* A4 56 A1 55 */	CALC_S (sa, sb, sc, sd, 2, 0x8A, 0xD5, 0xBF, 0xD1); /* 55 82 FC 87 */	CALC_S (sa, sb, sc, sd, 3, 0xD1, 0x7F, 0x3D, 0x99); /* 87 F3 C1 5A */	CALC_S (sa, sb, sc, sd, 4, 0x99, 0x46, 0x66, 0x96); /* 5A 1E 47 58 */	CALC_S (sa, sb, sc, sd, 5, 0x96, 0x3C, 0x5B, 0xED); /* 58 C6 AE DB */	CALC_S (sa, sb, sc, sd, 6, 0xED, 0x37, 0x4F, 0xE0); /* DB 68 3D 9E */	CALC_S (sa, sb, sc, sd, 7, 0xE0, 0xD0, 0x8C, 0x17); /* 9E E5 19 03 */	CALC_S (se, sf, sg, sh, 8, 0x00, 0x2D, 0x01, 0x2D); /* 01 A4 02 A4 */	CALC_S (se, sf, sg, sh, 9, 0x2D, 0xA4, 0x44, 0x8A); /* A4 56 A1 55 */	CALC_S (se, sf, sg, sh, 10, 0x8A, 0xD5, 0xBF, 0xD1); /* 55 82 FC 87 */	CALC_S (se, sf, sg, sh, 11, 0xD1, 0x7F, 0x3D, 0x99); /* 87 F3 C1 5A */	CALC_S (se, sf, sg, sh, 12, 0x99, 0x46, 0x66, 0x96); /* 5A 1E 47 58 */	CALC_S (se, sf, sg, sh, 13, 0x96, 0x3C, 0x5B, 0xED); /* 58 C6 AE DB */	CALC_S (se, sf, sg, sh, 14, 0xED, 0x37, 0x4F, 0xE0); /* DB 68 3D 9E */	CALC_S (se, sf, sg, sh, 15, 0xE0, 0xD0, 0x8C, 0x17); /* 9E E5 19 03 */	if (key_len == 24 || key_len == 32) { /* 192- or 256-bit key */		/* Calculate the third word of the S vector */		CALC_S (si, sj, sk, sl, 16, 0x00, 0x2D, 0x01, 0x2D); /* 01 A4 02 A4 */		CALC_S (si, sj, sk, sl, 17, 0x2D, 0xA4, 0x44, 0x8A); /* A4 56 A1 55 */		CALC_S (si, sj, sk, sl, 18, 0x8A, 0xD5, 0xBF, 0xD1); /* 55 82 FC 87 */		CALC_S (si, sj, sk, sl, 19, 0xD1, 0x7F, 0x3D, 0x99); /* 87 F3 C1 5A */		CALC_S (si, sj, sk, sl, 20, 0x99, 0x46, 0x66, 0x96); /* 5A 1E 47 58 */		CALC_S (si, sj, sk, sl, 21, 0x96, 0x3C, 0x5B, 0xED); /* 58 C6 AE DB */		CALC_S (si, sj, sk, sl, 22, 0xED, 0x37, 0x4F, 0xE0); /* DB 68 3D 9E */		CALC_S (si, sj, sk, sl, 23, 0xE0, 0xD0, 0x8C, 0x17); /* 9E E5 19 03 */	}	if (key_len == 32) { /* 256-bit key */		/* Calculate the fourth word of the S vector */		CALC_S (sm, sn, so, sp, 24, 0x00, 0x2D, 0x01, 0x2D); /* 01 A4 02 A4 */		CALC_S (sm, sn, so, sp, 25, 0x2D, 0xA4, 0x44, 0x8A); /* A4 56 A1 55 */		CALC_S (sm, sn, so, sp, 26, 0x8A, 0xD5, 0xBF, 0xD1); /* 55 82 FC 87 */		CALC_S (sm, sn, so, sp, 27, 0xD1, 0x7F, 0x3D, 0x99); /* 87 F3 C1 5A */		CALC_S (sm, sn, so, sp, 28, 0x99, 0x46, 0x66, 0x96); /* 5A 1E 47 58 */		CALC_S (sm, sn, so, sp, 29, 0x96, 0x3C, 0x5B, 0xED); /* 58 C6 AE DB */		CALC_S (sm, sn, so, sp, 30, 0xED, 0x37, 0x4F, 0xE0); /* DB 68 3D 9E */		CALC_S (sm, sn, so, sp, 31, 0xE0, 0xD0, 0x8C, 0x17); /* 9E E5 19 03 */		/* Compute the S-boxes. */		for ( i = j = 0, k = 1; i < 256; i++, j += 2, k += 2 ) {			CALC_SB256_2( i, calc_sb_tbl[j], calc_sb_tbl[k] );		}		/* Calculate whitening and round subkeys.  The constants are		 * indices of subkeys, preprocessed through q0 and q1. */		CALC_K256 (w, 0, 0xA9, 0x75, 0x67, 0xF3);		CALC_K256 (w, 2, 0xB3, 0xC6, 0xE8, 0xF4);		CALC_K256 (w, 4, 0x04, 0xDB, 0xFD, 0x7B);		CALC_K256 (w, 6, 0xA3, 0xFB, 0x76, 0xC8);		CALC_K256 (k, 0, 0x9A, 0x4A, 0x92, 0xD3);		CALC_K256 (k, 2, 0x80, 0xE6, 0x78, 0x6B);		CALC_K256 (k, 4, 0xE4, 0x45, 0xDD, 0x7D);		CALC_K256 (k, 6, 0xD1, 0xE8, 0x38, 0x4B);		CALC_K256 (k, 8, 0x0D, 0xD6, 0xC6, 0x32);		CALC_K256 (k, 10, 0x35, 0xD8, 0x98, 0xFD);		CALC_K256 (k, 12, 0x18, 0x37, 0xF7, 0x71);		CALC_K256 (k, 14, 0xEC, 0xF1, 0x6C, 0xE1);		CALC_K256 (k, 16, 0x43, 0x30, 0x75, 0x0F);		CALC_K256 (k, 18, 0x37, 0xF8, 0x26, 0x1B);		CALC_K256 (k, 20, 0xFA, 0x87, 0x13, 0xFA);		CALC_K256 (k, 22, 0x94, 0x06, 0x48, 0x3F);		CALC_K256 (k, 24, 0xF2, 0x5E, 0xD0, 0xBA);		CALC_K256 (k, 26, 0x8B, 0xAE, 0x30, 0x5B);		CALC_K256 (k, 28, 0x84, 0x8A, 0x54, 0x00);		CALC_K256 (k, 30, 0xDF, 0xBC, 0x23, 0x9D);	} else if (key_len == 24) { /* 192-bit key */		/* Compute the S-boxes. */		for ( i = j = 0, k = 1; i < 256; i++, j += 2, k += 2 ) {		        CALC_SB192_2( i, calc_sb_tbl[j], calc_sb_tbl[k] );		}		/* Calculate whitening and round subkeys.  The constants are		 * indices of subkeys, preprocessed through q0 and q1. */		CALC_K192 (w, 0, 0xA9, 0x75, 0x67, 0xF3);		CALC_K192 (w, 2, 0xB3, 0xC6, 0xE8, 0xF4);		CALC_K192 (w, 4, 0x04, 0xDB, 0xFD, 0x7B);		CALC_K192 (w, 6, 0xA3, 0xFB, 0x76, 0xC8);		CALC_K192 (k, 0, 0x9A, 0x4A, 0x92, 0xD3);		CALC_K192 (k, 2, 0x80, 0xE6, 0x78, 0x6B);		CALC_K192 (k, 4, 0xE4, 0x45, 0xDD, 0x7D);		CALC_K192 (k, 6, 0xD1, 0xE8, 0x38, 0x4B);		CALC_K192 (k, 8, 0x0D, 0xD6, 0xC6, 0x32);		CALC_K192 (k, 10, 0x35, 0xD8, 0x98, 0xFD);		CALC_K192 (k, 12, 0x18, 0x37, 0xF7, 0x71);		CALC_K192 (k, 14, 0xEC, 0xF1, 0x6C, 0xE1);		CALC_K192 (k, 16, 0x43, 0x30, 0x75, 0x0F);		CALC_K192 (k, 18, 0x37, 0xF8, 0x26, 0x1B);		CALC_K192 (k, 20, 0xFA, 0x87, 0x13, 0xFA);		CALC_K192 (k, 22, 0x94, 0x06, 0x48, 0x3F);		CALC_K192 (k, 24, 0xF2, 0x5E, 0xD0, 0xBA);		CALC_K192 (k, 26, 0x8B, 0xAE, 0x30, 0x5B);		CALC_K192 (k, 28, 0x84, 0x8A, 0x54, 0x00);		CALC_K192 (k, 30, 0xDF, 0xBC, 0x23, 0x9D);	} else { /* 128-bit key */		/* Compute the S-boxes. */		for ( i = j = 0, k = 1; i < 256; i++, j += 2, k += 2 ) {			CALC_SB_2( i, calc_sb_tbl[j], calc_sb_tbl[k] );		}		/* Calculate whitening and round subkeys.  The constants are		 * indices of subkeys, preprocessed through q0 and q1. */		CALC_K (w, 0, 0xA9, 0x75, 0x67, 0xF3);		CALC_K (w, 2, 0xB3, 0xC6, 0xE8, 0xF4);		CALC_K (w, 4, 0x04, 0xDB, 0xFD, 0x7B);		CALC_K (w, 6, 0xA3, 0xFB, 0x76, 0xC8);		CALC_K (k, 0, 0x9A, 0x4A, 0x92, 0xD3);		CALC_K (k, 2, 0x80, 0xE6, 0x78, 0x6B);		CALC_K (k, 4, 0xE4, 0x45, 0xDD, 0x7D);		CALC_K (k, 6, 0xD1, 0xE8, 0x38, 0x4B);		CALC_K (k, 8, 0x0D, 0xD6, 0xC6, 0x32);		CALC_K (k, 10, 0x35, 0xD8, 0x98, 0xFD);		CALC_K (k, 12, 0x18, 0x37, 0xF7, 0x71);		CALC_K (k, 14, 0xEC, 0xF1, 0x6C, 0xE1);		CALC_K (k, 16, 0x43, 0x30, 0x75, 0x0F);		CALC_K (k, 18, 0x37, 0xF8, 0x26, 0x1B);		CALC_K (k, 20, 0xFA, 0x87, 0x13, 0xFA);		CALC_K (k, 22, 0x94, 0x06, 0x48, 0x3F);		CALC_K (k, 24, 0xF2, 0x5E, 0xD0, 0xBA);		CALC_K (k, 26, 0x8B, 0xAE, 0x30, 0x5B);		CALC_K (k, 28, 0x84, 0x8A, 0x54, 0x00);		CALC_K (k, 30, 0xDF, 0xBC, 0x23, 0x9D);	}	return 0;}/* Encrypt one block.  in and out may be the same. */static void twofish_encrypt(void *cx, u8 *out, const u8 *in){	struct twofish_ctx *ctx = cx;	/* The four 32-bit chunks of the text. */	u32 a, b, c, d;		/* Temporaries used by the round function. */	u32 x, y;	/* Input whitening and packing. */	INPACK (0, a, 0);	INPACK (1, b, 1);	INPACK (2, c, 2);	INPACK (3, d, 3);		/* Encryption Feistel cycles. */	ENCCYCLE (0);	ENCCYCLE (1);	ENCCYCLE (2);	ENCCYCLE (3);	ENCCYCLE (4);	ENCCYCLE (5);	ENCCYCLE (6);	ENCCYCLE (7);		/* Output whitening and unpacking. */	OUTUNPACK (0, c, 4);	OUTUNPACK (1, d, 5);	OUTUNPACK (2, a, 6);	OUTUNPACK (3, b, 7);	}/* Decrypt one block.  in and out may be the same. */static void twofish_decrypt(void *cx, u8 *out, const u8 *in){	struct twofish_ctx *ctx = cx;  	/* The four 32-bit chunks of the text. */	u32 a, b, c, d;		/* Temporaries used by the round function. */	u32 x, y;		/* Input whitening and packing. */	INPACK (0, c, 4);	INPACK (1, d, 5);	INPACK (2, a, 6);	INPACK (3, b, 7);		/* Encryption Feistel cycles. */	DECCYCLE (7);	DECCYCLE (6);	DECCYCLE (5);	DECCYCLE (4);	DECCYCLE (3);	DECCYCLE (2);	DECCYCLE (1);	DECCYCLE (0);	/* Output whitening and unpacking. */	OUTUNPACK (0, a, 0);	OUTUNPACK (1, b, 1);	OUTUNPACK (2, c, 2);	OUTUNPACK (3, d, 3);}static struct crypto_alg alg = {	.cra_name           =   "twofish",	.cra_flags          =   CRYPTO_ALG_TYPE_CIPHER,	.cra_blocksize      =   TF_BLOCK_SIZE,	.cra_ctxsize        =   sizeof(struct twofish_ctx),	.cra_module         =   THIS_MODULE,	.cra_list           =   LIST_HEAD_INIT(alg.cra_list),	.cra_u              =   { .cipher = {	.cia_min_keysize    =   TF_MIN_KEY_SIZE,	.cia_max_keysize    =   TF_MAX_KEY_SIZE,	.cia_setkey         =   twofish_setkey,	.cia_encrypt        =   twofish_encrypt,	.cia_decrypt        =   twofish_decrypt } }};static int __init init(void){	return crypto_register_alg(&alg);}static void __exit fini(void){	crypto_unregister_alg(&alg);}module_init(init);module_exit(fini);MODULE_LICENSE("GPL");MODULE_DESCRIPTION ("Twofish Cipher Algorithm");

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品亚洲成av人在线观看| 国产清纯美女被跳蛋高潮一区二区久久w | 色999日韩国产欧美一区二区| 中文文精品字幕一区二区| 大白屁股一区二区视频| 中文字幕电影一区| 91视频在线观看免费| 亚洲影视在线播放| 91精品国产综合久久国产大片| 久久99热99| 国产精品乱码久久久久久| 91免费版pro下载短视频| 亚洲成人免费av| 日韩欧美国产精品| 国产激情视频一区二区在线观看| 亚洲欧洲三级电影| 欧洲精品一区二区三区在线观看| 日本午夜一本久久久综合| 精品乱人伦小说| av在线播放成人| 视频在线观看91| 久久久综合网站| 色狠狠桃花综合| 激情综合网激情| 国产成人自拍网| 亚洲欧美日韩在线不卡| 欧美美女喷水视频| 国产精品亚洲第一区在线暖暖韩国| 成人免费在线观看入口| 欧美狂野另类xxxxoooo| 国产精品一区二区你懂的| 亚洲精品第1页| 久久精品亚洲乱码伦伦中文| 欧美伊人精品成人久久综合97| 免费成人av资源网| 亚洲色图清纯唯美| 日韩视频一区二区| 色哟哟亚洲精品| 国产乱理伦片在线观看夜一区| 亚洲综合一二三区| 久久精品亚洲一区二区三区浴池| 欧美精品在线视频| 成人精品国产一区二区4080| 蜜桃av一区二区| 亚洲国产精品一区二区久久恐怖片 | 亚洲精品成人天堂一二三| 日韩一区二区三区三四区视频在线观看| 成人午夜av电影| 玖玖九九国产精品| 亚洲小少妇裸体bbw| 国产精品久久久爽爽爽麻豆色哟哟| 制服丝袜中文字幕一区| 一本色道综合亚洲| 国产成人精品影院| 毛片不卡一区二区| 午夜精品一区二区三区免费视频| 亚洲三级理论片| 国产视频一区在线观看 | 欧美三级电影一区| 成人福利电影精品一区二区在线观看 | 欧洲精品在线观看| av成人老司机| 成人午夜视频免费看| 国产在线播精品第三| 青椒成人免费视频| 婷婷综合久久一区二区三区| 一区二区理论电影在线观看| 中文字幕在线不卡一区| 国产午夜精品在线观看| 精品国产三级电影在线观看| 91精品国产一区二区三区蜜臀| 欧美日韩视频在线一区二区| 日本精品一区二区三区四区的功能| 91影院在线观看| 成人高清伦理免费影院在线观看| 高清shemale亚洲人妖| 国产一区二区视频在线| 国产在线日韩欧美| 国产一区二区三区精品视频| 国产露脸91国语对白| 黄网站免费久久| 国产黄色91视频| 国产iv一区二区三区| 高清不卡在线观看av| 日韩一卡二卡三卡国产欧美| 欧美一二三在线| 日韩一级在线观看| 精品成人私密视频| 久久精品一区二区三区不卡牛牛 | 91亚洲精品一区二区乱码| 成人av网站在线| 91在线看国产| 欧美性受极品xxxx喷水| 欧美日韩一区二区三区不卡| 91精品国产免费久久综合| 日韩欧美一级二级三级| 欧美变态tickle挠乳网站| 久久久蜜臀国产一区二区| 中文字幕av资源一区| 亚洲嫩草精品久久| 亚洲超丰满肉感bbw| 久久99久久久欧美国产| 国产成+人+日韩+欧美+亚洲| 91久久国产综合久久| 欧美日本一区二区三区四区| 日韩免费视频一区| 国产欧美一区二区精品性色超碰 | 亚洲美女淫视频| 亚洲成人动漫精品| 九九精品视频在线看| 成人18视频日本| 欧美挠脚心视频网站| 日韩你懂的在线播放| 国产精品午夜免费| 亚洲一区二区三区四区在线免费观看| 喷白浆一区二区| 成人免费视频一区| 欧美日韩专区在线| 精品88久久久久88久久久| 亚洲天堂网中文字| 麻豆国产欧美一区二区三区| 北岛玲一区二区三区四区| 欧美一区中文字幕| 国产精品天美传媒| 日韩av午夜在线观看| 成人av网站在线观看免费| 欧美欧美午夜aⅴ在线观看| 欧美激情在线免费观看| 天天综合网天天综合色| 99这里都是精品| 欧美成人高清电影在线| 亚洲精品亚洲人成人网在线播放| 久久精品国产免费| 91老师国产黑色丝袜在线| 欧美mv和日韩mv的网站| 亚洲永久免费视频| 国产精品1区二区.| 欧美性生活影院| 中文字幕在线不卡| 精品一区二区综合| 欧美日韩中文一区| 中文字幕一区二区三区不卡| 国产在线精品一区二区夜色| 欧美日韩国产高清一区二区| 中文字幕日韩一区| 国产一区二区三区av电影| 欧美一级免费观看| 一区二区三区**美女毛片| 成人av先锋影音| 亚洲国产岛国毛片在线| 久久av中文字幕片| 666欧美在线视频| 亚洲成人动漫在线免费观看| 中文字幕乱码日本亚洲一区二区| 日韩黄色小视频| 精品视频一区二区不卡| 成人免费一区二区三区视频| 丁香一区二区三区| 精品国一区二区三区| 久久国产精品第一页| 欧美一区二区三区婷婷月色| 首页亚洲欧美制服丝腿| 欧美日韩中文精品| 亚洲电影欧美电影有声小说| 在线免费观看视频一区| 亚洲欧美日韩国产综合在线| 91美女片黄在线观看91美女| 亚洲图片激情小说| k8久久久一区二区三区 | 久久久无码精品亚洲日韩按摩| 久久99国产精品免费| 欧美xxxxxxxxx| 国内外成人在线| 久久九九全国免费| 丁香婷婷深情五月亚洲| 国产精品毛片无遮挡高清| 成人免费毛片高清视频| 中文天堂在线一区| 91网站视频在线观看| 一区二区三区四区在线免费观看 | 成人午夜在线免费| 国产精品麻豆欧美日韩ww| 成人免费毛片嘿嘿连载视频| 中文字幕在线观看一区| 色综合天天狠狠| 亚洲一区二区黄色| 欧美精品自拍偷拍动漫精品| 久久精品国产亚洲一区二区三区| 精品少妇一区二区三区在线视频| 国产电影精品久久禁18| 国产精品女人毛片| 91成人网在线| 日本美女一区二区三区视频| 26uuu精品一区二区| 国产激情视频一区二区在线观看| ...xxx性欧美| 欧美男生操女生| 国产成人av自拍| 亚洲精品乱码久久久久| 宅男在线国产精品|