AnsweredAssumed Answered

MMCAU SHA256

Question asked by Pietro di Castri on Feb 25, 2019
Latest reply on Feb 26, 2019 by Pietro di Castri

Good morning

 

I run the example mmcau_api. I test the SHA256 with the proposed test vector. Here it is

static uint8_t g_testSha[TEST_LENGTH] = {0x54, 0x68, 0x65, 0x20, 0x71, 0x75, 0x69, 0x63, 0x6b, 0x20, 0x62, 0x72, 0x6f,
0x77, 0x6e, 0x20, 0x66, 0x6f, 0x78, 0x20, 0x6a, 0x75, 0x6d, 0x70, 0x73, 0x20,
0x6f, 0x76, 0x65, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x61, 0x7a, 0x79,
0x20, 0x64, 0x6f, 0x67, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x58};

 

The result I get is 

{3618175923, 131563668, 1774885564, 2953326159, 2371244516, 1832704886, 755159231, 935978386}

 

I test the same vector on line here https://www.fileformat.info/tool/hash.htm?hex=0x54%2C+++0x68%2C+0x65%2C+0x20%2C+0x71%2C+0x75%2C+0x69%2C+0x63%2C+0x6b%2C+… 

 

and I get the result 

 

d4b8527d7a673b096ba19aabfb458c357a43f008d214aac413ee18cf29485fe2

It does not match. So what is wrong???

 

Thank You

 

Pietro

Outcomes