资源简介
ZUC代码,C语言,官方源码一致,运行无异常,VS直接运行
代码片段和文件信息
#include
/* ——————————————————————- */
typedef unsigned char u8;
typedef unsigned int u32;
/* ——————————————————————- */
/* the state registers of LFSR */
u32 LFSR_S0;
u32 LFSR_S1;
u32 LFSR_S2;
u32 LFSR_S3;
u32 LFSR_S4;
u32 LFSR_S5;
u32 LFSR_S6;
u32 LFSR_S7;
u32 LFSR_S8;
u32 LFSR_S9;
u32 LFSR_S10;
u32 LFSR_S11;
u32 LFSR_S12;
u32 LFSR_S13;
u32 LFSR_S14;
u32 LFSR_S15;
/* the registers of F */
u32 F_R1;
u32 F_R2;
/* the outputs of BitReorganization */
u32 BRC_X0;
u32 BRC_X1;
u32 BRC_X2;
u32 BRC_X3;
/* the s-boxes */
u8 S0[256] =
{
0x3e0x720x5b0x470xca0xe00x000x330x040xd10x540x980x090xb90x6d0xcb
0x7b0x1b0xf90x320xaf0x9d0x6a0xa50xb80x2d0xfc0x1d0x080x530x030x90
0x4d0x4e0x840x990xe40xce0xd90x910xdd0xb60x850x480x8b0x290x6e0xac
0xcd0xc10xf80x1e0x730x430x690xc60xb50xbd0xfd0x390x630x200xd40x38
0x760x7d0xb20xa70xcf0xed0x570xc50xf30x2c0xbb0x140x210x060x550x9b
0xe30xef0x5e0x310x4f0x7f0x5a0xa40x0d0x820x510x490x5f0xba0x580x1c
0x4a0x160xd50x170xa80x920x240x1f0x8c0xff0xd80xae0x2e0x010xd30xad
0x3b0x4b0xda0x460xeb0xc90xde0x9a0x8f0x870xd70x3a0x800x6f0x2f0xc8
0xb10xb40x370xf70x0a0x220x130x280x7c0xcc0x3c0x890xc70xc30x960x56
0x070xbf0x7e0xf00x0b0x2b0x970x520x350x410x790x610xa60x4c0x100xfe
0xbc0x260x950x880x8a0xb00xa30xfb0xc00x180x940xf20xe10xe50xe90x5d
0xd00xdc0x110x660x640x5c0xec0x590x420x750x120xf50x740x9c0xaa0x23
0x0e0x860xab0xbe0x2a0x020xe70x670xe60x440xa20x6c0xc20x930x9f0xf1
0xf60xfa0x360xd20x500x680x9e0x620x710x150x3d0xd60x400xc40xe20x0f
0x8e0x830x770x6b0x250x050x3f0x0c0x300xea0x700xb70xa10xe80xa90x65
0x8d0x270x1a0xdb0x810xb30xa00xf40x450x7a0x190xdf0xee0x780x340x60
};
u8 S1[256] =
{
0x550xc20x630x710x3b0xc80x470x860x9f0x3c0xda0x5b0x290xaa0xfd0x77
0x8c0xc50x940x0c0xa60x1a0x130x000xe30xa80x160x720x400xf90xf80x42
0x440x260x680x960x810xd90x450x3e0x100x760xc60xa70x8b0x390x430xe1
0x3a0xb50x560x2a0xc00x6d0xb30x050x220x660xbf0xdc0x0b0xfa0x620x48
0xdd0x200x110x060x360xc90xc10xcf0xf60x270x520xbb0x690xf50xd40x87
0x7f0x840x4c0xd20x9c0x570xa40xbc0x4f0x9a0xdf0xfe0xd60x8d0x7a0xeb
0x2b0x530xd80x5c0xa10x140x170xfb0x230xd50x7d0x300x670x730x080x09
0xee0xb70x700x3f0x610xb20x190x8e0x4e0xe50x4b0x930x8f0x5d0xdb0xa9
0xad0xf10xae0x2e0xcb0x0d0xfc0xf40x2d0x460x6e0x1d0x970xe80xd10xe9
0x4d0x370xa50x750x5e0x830x9e0xab0x820x9d0xb90x1c0xe00xcd0x490x89
0x010xb60xbd0x580x240xa20x5f0x380x780x990x150x900x500xb80x950xe4
0xd00x910xc70xce0xed0x0f0xb40x6f0xa00xcc0xf00x020x4a0x790
- 上一篇:用c语言写的8数码游戏
- 下一篇:C++&CLR 编写 Windows 窗体应用程序
评论
共有 条评论