han puesto esto en psx-scene, no se si servira para algo
Math could help me here a bit. How do I get from: key, challenge, jig id -> to response? I am trying to do it on a PC (not Atmel).
I tried (both in big endian and little endian ):
1- response = HMAC(key, challenge)
2- response = HMAC( HMAC(key, jig id), challenge)
here is the values I used for:
key = 0x32, 0x78, 0x57, 0x2D, 0x90, 0x90, 0xD5, 0xAC, 0xAE, 0xF9,
0x03, 0xCA, 0x1A, 0xB6, 0x5E, 0xF1, 0xB7, 0x69, 0x4C, 0xDE
challenge = 0x56,
0x7F, 0x4A, 0x53, 0x0F,
0xE1, 0x72, 0x3B, 0x6D,
0xC0, 0x49, 0x42, 0x34,
0x3B, 0x27, 0xC0, 0x3F,
0x13, 0x83, 0x4A,
jig id = 0xaa 0xaa
expected response = 0x74, 0x1D, 0x18, 0xEB, 0x2D, 0x39, 0x7B,
0xF5, 0x22, 0x5C, 0x93, 0xB2, 0x1F, 0x72, 0xF7,
0x1B, 0x45, 0x23, 0x72, 0x01
non of above methods gave the expected response.
Thanks
P.S. I attached the source code that I used for testing. there is no make file but to compile type: gcc sha1.c hmac.c main.c
gl