⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 import.h

📁 枚举主机网络设备
💻 H
📖 第 1 页 / 共 2 页
字号:

#ifndef _IMPORT_ECC_H_
#define _IMPORT_ECC_H_

#ifndef _IMPORT_CONST_
#define _IMPORT_CONST_

////////////////////////////////////////////////////////////////////////////
//
//
//                     以下是椭圆曲线上的数据定义
//
//
/////////////////////////////////////////////////////////////////////////////
	unsigned char ju[36],jr[36],js[36],jt[36];			//加/脱密公钥参数
	unsigned char je0[40],je1[40],jqq[72],jqe[72];
	unsigned char jqqq[16*72];

	unsigned char u[32],r[32],s[32],t[32];			//数字签名公钥参数
	unsigned char e0[32],e1[32],qq[64],qe[64];
	unsigned char qqq[16*64];
	unsigned char a1[36],a2[36],a3[36],a4[36],a6[36];
	unsigned short lenth;
	unsigned char dd10[40]={
						0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
						0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
						0x0,0x0,0x0,0x0,0x0,0x14,0xe9,0xe9,
						0x46,0xa3,0x07,0x36,0x87,0x82,0xa6,0x34,
						0xfd,0xeb,0x32,0x98,0xfa,0x3a,0x89,0x00};
	unsigned char dd11[40]={
						0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
						0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
						0x0,0x0,0x0,0x0,0x0,0x0d,0x44,0xc4,
						0x75,0x20,0x86,0xe1,0x78,0xbd,0x07,0x87,
						0xf8,0xe3,0x27,0xde,0x5c,0x2f,0x70,0x00};

	unsigned char dd0[32]={
						0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
						0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
						0x5b,0x66,0xe8,0x22,0x62,0xff,0xf0,0x97,
						0x0a,0x4c,0x49,0x65,0x0e,0xeb,0x6f,0x00};
	unsigned char dd1[32]={
						0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
						0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
						0x2b,0xd9,0xa1,0x59,0x64,0xed,0xe9,0x5b,
						0xa8,0xc8,0xe1,0xea,0x32,0x90,0x24,0x00};
	unsigned char firstN[16]={
						0x00,0x44,0x6B,0x3B,0x95,0x80,0x90,0xA7,
						0x25,0x55,0x65,0xED,0x9D,0xA5,0x43,0xC2};
	unsigned char secndN[16]={
						0x00,0x7C,0xB8,0x17,0x64,0xBD,0x37,0x85,
						0xD4,0xD7,0x71,0xBB,0xA8,0x8D,0x47,0x41};
	unsigned char macID[16]={
						0x00,0x44,0x6B,0x3B,0x95,0x80,0x90,0xA7,
						0x25,0x55,0x65,0xED,0x9D,0xA5,0x43,0xC2};
	unsigned char encID[16]={
						0x00,0x7C,0xB8,0x17,0x64,0xBD,0x37,0x85,
						0xD4,0xD7,0x71,0xBB,0xA8,0x8D,0x47,0x41};

	unsigned char bygs[256]={
						0x8,0x7,0x6,0x6,0x5,0x5,0x5,0x5,  /*0-7*/
						0x4,0x4,0x4,0x4,0x4,0x4,0x4,0x4,  /*8-15*/
						0x3,0x3,0x3,0x3,0x3,0x3,0x3,0x3,  /*16-31*/	
						0x3,0x3,0x3,0x3,0x3,0x3,0x3,0x3,
						0x2,0x2,0x2,0x2,0x2,0x2,0x2,0x2,  /*32-63*/
						0x2,0x2,0x2,0x2,0x2,0x2,0x2,0x2,
						0x2,0x2,0x2,0x2,0x2,0x2,0x2,0x2,
						0x2,0x2,0x2,0x2,0x2,0x2,0x2,0x2,
						0x1,0x1,0x1,0x1,0x1,0x1,0x1,0x1,  /*64-127*/
						0x1,0x1,0x1,0x1,0x1,0x1,0x1,0x1,
						0x1,0x1,0x1,0x1,0x1,0x1,0x1,0x1,
						0x1,0x1,0x1,0x1,0x1,0x1,0x1,0x1,
						0x1,0x1,0x1,0x1,0x1,0x1,0x1,0x1,
						0x1,0x1,0x1,0x1,0x1,0x1,0x1,0x1,
						0x1,0x1,0x1,0x1,0x1,0x1,0x1,0x1,
						0x1,0x1,0x1,0x1,0x1,0x1,0x1,0x1,
						0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,  /*128-255*/
						0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
						0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
						0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
						0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
						0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
						0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
						0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
						0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
						0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
						0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
						0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
						0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
						0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
						0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
						0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0};

	unsigned char mul2[512]={	
  						0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x00, 0x05,   
  						0x00, 0x10, 0x00, 0x11, 0x00, 0x14, 0x00, 0x15,   
  						0x00, 0x40, 0x00, 0x41, 0x00, 0x44, 0x00, 0x45,   
  						0x00, 0x50, 0x00, 0x51, 0x00, 0x54, 0x00, 0x55,   
  						0x01, 0x00, 0x01, 0x01, 0x01, 0x04, 0x01, 0x05,   
  						0x01, 0x10, 0x01, 0x11, 0x01, 0x14, 0x01, 0x15,   
  						0x01, 0x40, 0x01, 0x41, 0x01, 0x44, 0x01, 0x45,   
  						0x01, 0x50, 0x01, 0x51, 0x01, 0x54, 0x01, 0x55,   
  						0x04, 0x00, 0x04, 0x01, 0x04, 0x04, 0x04, 0x05,   
  						0x04, 0x10, 0x04, 0x11, 0x04, 0x14, 0x04, 0x15,   
  						0x04, 0x40, 0x04, 0x41, 0x04, 0x44, 0x04, 0x45,   
  						0x04, 0x50, 0x04, 0x51, 0x04, 0x54, 0x04, 0x55,   
  						0x05, 0x00, 0x05, 0x01, 0x05, 0x04, 0x05, 0x05,   
  						0x05, 0x10, 0x05, 0x11, 0x05, 0x14, 0x05, 0x15,   
  						0x05, 0x40, 0x05, 0x41, 0x05, 0x44, 0x05, 0x45,   
  						0x05, 0x50, 0x05, 0x51, 0x05, 0x54, 0x05, 0x55,   
  						0x10, 0x00, 0x10, 0x01, 0x10, 0x04, 0x10, 0x05,   
  						0x10, 0x10, 0x10, 0x11, 0x10, 0x14, 0x10, 0x15,   
  						0x10, 0x40, 0x10, 0x41, 0x10, 0x44, 0x10, 0x45,   
  						0x10, 0x50, 0x10, 0x51, 0x10, 0x54, 0x10, 0x55,   
  						0x11, 0x00, 0x11, 0x01, 0x11, 0x04, 0x11, 0x05,   
  						0x11, 0x10, 0x11, 0x11, 0x11, 0x14, 0x11, 0x15,   
  						0x11, 0x40, 0x11, 0x41, 0x11, 0x44, 0x11, 0x45,   
  						0x11, 0x50, 0x11, 0x51, 0x11, 0x54, 0x11, 0x55,   
  						0x14, 0x00, 0x14, 0x01, 0x14, 0x04, 0x14, 0x05,   
  						0x14, 0x10, 0x14, 0x11, 0x14, 0x14, 0x14, 0x15,   
  						0x14, 0x40, 0x14, 0x41, 0x14, 0x44, 0x14, 0x45,   
  						0x14, 0x50, 0x14, 0x51, 0x14, 0x54, 0x14, 0x55,   
  						0x15, 0x00, 0x15, 0x01, 0x15, 0x04, 0x15, 0x05,   
  						0x15, 0x10, 0x15, 0x11, 0x15, 0x14, 0x15, 0x15,   
  						0x15, 0x40, 0x15, 0x41, 0x15, 0x44, 0x15, 0x45,   
  						0x15, 0x50, 0x15, 0x51, 0x15, 0x54, 0x15, 0x55,   
  						0x40, 0x00, 0x40, 0x01, 0x40, 0x04, 0x40, 0x05,   
  						0x40, 0x10, 0x40, 0x11, 0x40, 0x14, 0x40, 0x15,   
  						0x40, 0x40, 0x40, 0x41, 0x40, 0x44, 0x40, 0x45,   
  						0x40, 0x50, 0x40, 0x51, 0x40, 0x54, 0x40, 0x55,   
  						0x41, 0x00, 0x41, 0x01, 0x41, 0x04, 0x41, 0x05,   
  						0x41, 0x10, 0x41, 0x11, 0x41, 0x14, 0x41, 0x15,   
  						0x41, 0x40, 0x41, 0x41, 0x41, 0x44, 0x41, 0x45,   
  						0x41, 0x50, 0x41, 0x51, 0x41, 0x54, 0x41, 0x55,   
  						0x44, 0x00, 0x44, 0x01, 0x44, 0x04, 0x44, 0x05,   
  						0x44, 0x10, 0x44, 0x11, 0x44, 0x14, 0x44, 0x15,   
  						0x44, 0x40, 0x44, 0x41, 0x44, 0x44, 0x44, 0x45,   
  						0x44, 0x50, 0x44, 0x51, 0x44, 0x54, 0x44, 0x55,   
  						0x45, 0x00, 0x45, 0x01, 0x45, 0x04, 0x45, 0x05,   
  						0x45, 0x10, 0x45, 0x11, 0x45, 0x14, 0x45, 0x15,   
  						0x45, 0x40, 0x45, 0x41, 0x45, 0x44, 0x45, 0x45,   
  						0x45, 0x50, 0x45, 0x51, 0x45, 0x54, 0x45, 0x55,   
  						0x50, 0x00, 0x50, 0x01, 0x50, 0x04, 0x50, 0x05,   
  						0x50, 0x10, 0x50, 0x11, 0x50, 0x14, 0x50, 0x15,   
  						0x50, 0x40, 0x50, 0x41, 0x50, 0x44, 0x50, 0x45,   
  						0x50, 0x50, 0x50, 0x51, 0x50, 0x54, 0x50, 0x55,   
  						0x51, 0x00, 0x51, 0x01, 0x51, 0x04, 0x51, 0x05,   
  						0x51, 0x10, 0x51, 0x11, 0x51, 0x14, 0x51, 0x15,   
  						0x51, 0x40, 0x51, 0x41, 0x51, 0x44, 0x51, 0x45,   
  						0x51, 0x50, 0x51, 0x51, 0x51, 0x54, 0x51, 0x55,   
  						0x54, 0x00, 0x54, 0x01, 0x54, 0x04, 0x54, 0x05,   
  						0x54, 0x10, 0x54, 0x11, 0x54, 0x14, 0x54, 0x15,   
  						0x54, 0x40, 0x54, 0x41, 0x54, 0x44, 0x54, 0x45,   
  						0x54, 0x50, 0x54, 0x51, 0x54, 0x54, 0x54, 0x55,   
  						0x55, 0x00, 0x55, 0x01, 0x55, 0x04, 0x55, 0x05,   
  						0x55, 0x10, 0x55, 0x11, 0x55, 0x14, 0x55, 0x15,   
  						0x55, 0x40, 0x55, 0x41, 0x55, 0x44, 0x55, 0x45,   
						0x55, 0x50, 0x55, 0x51, 0x55, 0x54, 0x55, 0x55}; 


////////////////////////////////////////////////////////////////////////////
//
//
//                     以下是杂凑函数上的数据定义
//
//
/////////////////////////////////////////////////////////////////////////////
#define  ROUND	8

unsigned long xi[16][2];

unsigned long data_a[2],data_b[2],data_c[2],data_d[2];
unsigned long data_e[2],data_f[2],data_g[2];

unsigned long data_a_cz[2]={0x423c9858,0x9f7aa8e4};
unsigned long data_b_cz[2]={0x912553b0,0x7d291054};
unsigned long data_c_cz[2]={0x39b630bd,0x83e85b16};
unsigned long data_d_cz[2]={0x6740815c,0x31d72fce};
unsigned long data_e_cz[2]={0x079d750e,0x1fa9b956};
unsigned long data_f_cz[2]={0x88c123d9,0x9284a738};
unsigned long data_g_cz[2]={0x330b7446,0x3bf3207f};

//数据变换表S0变换数
unsigned long bhbs0[256][2]={
0xdb9fd6e4,0xdf5d1c4d,0xa1ddb523,0x36171533,
0x70e5400a,0x378c7bca,0x54c8284b,0x278f4772,
0xde810b66,0x620c5ffe,0xd77f081b,0xb758b678,
0x1867d12a,0xa52b3bfa,0x63555261,0x3901be99,
0x71340495,0xd48091f3,0xa93f3d00,0xfcffe925,
0xb25a8424,0x9abc7aef,0xcbd34cbf,0x469e0ef2,
0x6013061f,0x9344af30,0x8b87b3da,0x3c8a89c4,
0xbd0745c6,0x487eea64,0xc1c3cfb1,0x5b69a4b4,
0xcc9abf4c,0x5ae79229,0x1d462484,0xd3093a76,
0xbbd4003d,0x3422772c,0xbafc9504,0x3f8e4f9b,
0x3e48b1cf,0x07d56d51,0xa65bc645,0xc35e656e,
0x6893dab3,0x132659c9,0xe63c1f06,0x87ec0535,
0x56374b28,0xe5127dae,0xe2270a40,0xc82f11ce,
0xa2db23b5,0x5dc2cd57,0xfb364d1c,0xdd2d5ce8,
0x0fa56152,0x67f550f6,0xf7392ad1,0x551003b9,
0x6a621b08,0x81eba0c0,0x88b7660b,0x7f32aae1,
0xb7886f75,0xd7517cd5,0x626aadb8,0xde6ed85e,
0x39f785f9,0x63c9ed26,0xa50f2019,0x1835fdec,
0x36fbdc16,0xa129eee7,0xdba29c94,0xdf764309,
0x27e242a3,0x542cd922,0x3756f002,0x709b838e,
0x3ce6ac41,0x8bf66cf5,0x9368a80d,0x60b98610,
0x5ba6d253,0xc1c0f8eb,0x483e96e3,0xbde13832,
0xfcbae0a7,0xa9ae4a12,0xd4bb8d1e,0x71ced02f,
0x461d4e98,0xcb57c5c2,0x9acc492e,0xb2e8f42d,
0xc3c1e396,0xa6fe6b0c,0x07bd53d2,0x3e782158,
0x878b0da8,0xe6fa972b,0x136041ac,0x68997401,
0xd3cb2e49,0x1de4829f,0x5ab2984e,0xcc339d17,
0x3fa91e8d,0xbaca798c,0x3471a7e0,0xbb72318f,
0x55631920,0xf7301a44,0x6718f985,0x0fc4b08a,
0x7fd7b8ad,0x8864907e,0x81de756f,0x6ab4ab69,
0xc85402f0,0xe2f3c780,0xe570a342,0x5625f1ff,
0xdda1949c,0xfbef14bc,0x5ddf16dc,0xa2f2739e,
0x1bad6ad7,0x755c2df4,0x666f88de,0xb8cdc2c5,
0x61200f63,0xf9112fd0,0x2a85f718,0x197d124a,
0x239ca2a1,0x16aa3238,0x4ddcfbdf,0x94a0ebf8,
0x4bf05654,0xa3031086,0x0a42e270,0x0250f56c,
0xdaa8688b,0x414f8e83,0x1face660,0x0d7722d9,
0xb1963ec1,0x533a0943,0xc6d2a6bd,0xe392e7ee,
0x008dbba9,0xa705ecfd,0x95e0ba71,0x1e5926ed,
0xbf49cccb,0x98655ed8,0x244e1db2,0x2e6dd57c,

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -