文档库 最新最全的文档下载
当前位置:文档库 › 国密算法SM1_SM3_SM4的标准数据

国密算法SM1_SM3_SM4的标准数据

SM1_ECB:
密钥:
unsigned char pbKeyValue[16] = {0x40,0xbb,0x12,0xdd,0x6a,0x82,0x73,0x86,0x7f,0x35,0x29,0xd3,0x54,0xb4,0xa0,0x26};
明文:
unsigned char pbPlainText[16] = {0xff,0xee,0xdd,0xcc,0xbb,0xaa,0x99,0x88,0x77,0x66,0x55,0x44,0x33,0x22,0x11,0x00};
密文:
unsigned char pbCipherText[16] = {0x6d,0x7f,0x45,0xb0,0x8b,0xc4,0xd9,0x66,0x44,0x4c,0x86,0xc2,0xb0,0x7d,0x29,0x93};

SGD_SM1_CBC:
密钥:
unsigned char pbKeyValue[16] = {0x40,0xbb,0x12,0xdd,0x6a,0x82,0x73,0x86,0x7f,0x35,0x29,0xd3,0x54,0xb4,0xa0,0x26};
初始化向量:
unsigned char pbIV[16] = {0xe8,0x3d,0x17,0x15,0xac,0xf3,0x48,0x63,0xac,0xeb,0x93,0xe0,0xe5,0xab,0x8b,0x90};
明文:
unsigned char pbPlainText[32] = {0xff,0xee,0xdd,0xcc,0xbb,0xaa,0x99,0x88,0x77,0x66,0x55,0x44,0x33,0x22,0x11,0x00,0x00,0x11,0x22,0x33,0x44,0x55,0x66,0x77,0x88,0x99,0xaa,0xbb,0xcc,0xdd,0xee,0xff};
密文:
unsigned char pbCipherText[32] = {0x3a,0x70,0xb5,0xd4,0x9a,0x78,0x2c,0x07,0x2d,0xe1,0x13,0x43,0x81,0x9e,0xc6,0x59,0xf8,0xfc,0x7a,0xf0,0x5e,0x7c,0x6d,0xfb,0x5f,0x81,0x09,0x0f,0x0d,0x87,0x91,0xb2};

SGD_SSF33_ECB:
密钥:
unsigned char pbKeyValue[16] = {0x67,0xbe,0x03,0x7c,0x41,0x96,0x6d,0xdb,0x8c,0x36,0x27,0x48,0x5a,0x05,0x93,0xa5};
明文:
unsigned char pbPlainText[16] = {0xa9,0x37,0x07,0x49,0xfc,0x06,0xaf,0xe6,0x4e,0x30,0x68,0x01,0xd2,0x31,0xb3,0xac};
密文:
unsigned char pbCipherText[16] = {0x9a,0xb7,0x1c,0xcc,0x22,0x7e,0x9e,0x58,0x7a,0xa0,0xe6,0xcf,0x49,0x08,0x5d,0x1f};

SGD_SSF33_CBC:
密钥:
unsigned char pbKeyValue[16] = {0x40,0xbb,0x12,0xdd,0x6a,0x82,0x73,0x86,0x7f,0x35,0x29,0xd3,0x54,0xb4,0xa0,0x26};
初始化向量:
unsigned char pbIV[16] = {0xe8,0x3d,0x17,0x15,0xac,0xf3,0x48,0x63,0xac,0xeb,0x93,0xe0,0xe5,0xab,0x8b,0x90};
明文:
unsigned char pbPlainText[32] = {0xff,0xee,0xdd,0xcc,0xbb,0xaa,0x99,0x88,0x77,0x66,0x55,0x44,0x33,0x22,0x11,0x00,0x00,0x11,0x22,0x33,0x44,0x55,0x66,0x77,0x88,0x99,0xaa,0xbb,0xcc,0xdd,0xee,0xff};
密文:
unsigned char pbCipherText[32] = {0xfd,0x3e,0x17,0xf4,0xde,0x33,0xe2,0x96,0xf9,0x9e,0x37,0x92,0x45,0x6b,0x76,0x2b,0x9e,0xe7,0x13,0x44,0x5d,0x91,0x95,0xf6,0x4b,0x34,0x1b,0x3a,0xe7,0x5c,0x68,0x75};

SGD_AES_ECB:
密钥:
unsigned char pbKeyValue[16] = {0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef,0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef};
明文:
unsigned char pbPlainText[16] = {0x4e,0x6f,0x77,0x20,0x69,0x73,0x20,0x74,0x68,0x65,0x20,0x74,0x69,0x6d,0x65,0x20};
密文:
unsigned char pbCipherText[16] = {0xde,0x2e,0x12,0xe4,0x0b,0xd1,0xd8,0x60,0xe3,0xe4,0x24,0x31,0x3b,0xd3,0x72,0xdc};

SGD_DES_ECB:
密钥:
unsigned char pbKeyValue[8] = {0x67,0xbe,0x03,0x7c,0x41,0x96,0x6d,0xdb};
明文:
unsigned char pbPlainText[8] = {0xa9,0x37,0x07,0x49,0xfc,0x06,0xaf,0xe6};
密文:
unsigned char pbCipherText[8] = {0x60,0x78,0x32,0xe8,0xb3,0x5a,0x9c,0x6d};

SGD_3DES_ECB:
密钥:
unsigned char pbKeyValue[16] = {0x40,0xbb,0x12,0xdd,0x6a,0x82,0x73,0x86,0x7f,0x35,0x29,0xd3,0x54,0xb4,0xa0,0x26};
明文:

unsigned char pbPlainText[8] = {0x49,0x07,0x37,0xa9,0xe6,0xaf,0x06,0xfc};
密文:
unsigned char pbCipherText[8] = {0x43,0x01,0xc5,0x6b,0x14,0x00,0xe7,0xce};

SGD_SMS4_ECB:
密钥:
unsigned char pbKeyValue[16] = {0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef,0xfe,0xdc,0xba,0x98,0x76,0x54,0x32,0x10};
明文:
unsigned char pbPlainText[16] = {0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef,0xfe,0xdc,0xba,0x98,0x76,0x54,0x32,0x10};
密文:
unsigned char pbCipherText[16] = {0x68,0x1e,0xdf,0x34,0xd2,0x06,0x96,0x5e,0x86,0xb3,0xe9,0x4f,0x53,0x6e,0x42,0x46};

SGD_SMS4_CBC:
密钥:
unsigned char pbKeyValue[16] = {0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef,0xfe,0xdc,0xba,0x98,0x76,0x54,0x32,0x10};
初始化向量:
unsigned char pbIV[16] = {0xeb,0xee,0xc5,0x68,0x58,0xe6,0x04,0xd8,0x32,0x7b,0x9b,0x3c,0x10,0xc9,0x0c,0xa7};
明文:
unsigned char pbPlainText[32] = {0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef,0xfe,0xdc,0xba,0x98,0x76,0x54,0x32,0x10,0x29,0xbe,0xe1,0xd6,0x52,0x49,0xf1,0xe9,0xb3,0xdb,0x87,0x3e,0x24,0x0d,0x06,0x47};
密文:
unsigned char pbCipherText[32] = {0x3f,0x1e,0x73,0xc3,0xdf,0xd5,0xa1,0x32,0x88,0x2f,0xe6,0x9d,0x99,0x6c,0xde,0x93,0x54,0x99,0x09,0x5d,0xde,0x68,0x99,0x5b,0x4d,0x70,0xf2,0x30,0x9f,0x2e,0xf1,0xb7};

哈希SM3算法(不带参数ID):
待哈希数据:
SGD_UCHAR bHashData[64] = {0x61,0x62,0x63,0x64,0x61,0x62,0x63,0x64,0x61,0x62,0x63,0x64,0x61,0x62,0x63,0x64,
0x61,0x62,0x63,0x64,0x61,0x62,0x63,0x64,0x61,0x62,0x63,0x64,0x61,0x62,0x63,0x64,
0x61,0x62,0x63,0x64,0x61,0x62,0x63,0x64,0x61,0x62,0x63,0x64,0x61,0x62,0x63,0x64,
0x61,0x62,0x63,0x64,0x61,0x62,0x63,0x64,0x61,0x62,0x63,0x64,0x61,0x62,0x63,0x64};
哈希值:
SGD_UCHAR bHashStdResult[32] = {0xde,0xbe,0x9f,0xf9,0x22,0x75,0xb8,0xa1,0x38,0x60,0x48,0x89,0xc1,0x8e,0x5a,0x4d,
0x6f,0xdb,0x70,0xe5,0x38,0x7e,0x57,0x65,0x29,0x3d,0xcb,0xa3,0x9c,0x0c,0x57,0x32};

相关文档