31 #define TEA_NUM_TESTS 4
35 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
36 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
38 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
39 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
41 { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
42 0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF
44 { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
45 0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF
50 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
51 { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08 },
52 { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08 },
53 { 0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF }
57 { 0x41, 0xEA, 0x3A, 0x0A, 0x94, 0xBA, 0xA9, 0x40 },
58 { 0x6A, 0x2F, 0x9C, 0xF3, 0xFC, 0xCF, 0x3C, 0x55 },
59 { 0xDE, 0xB1, 0xC0, 0xA2, 0x7E, 0x74, 0x5D, 0xB3 },
60 { 0x12, 0x6C, 0x6B, 0x92, 0xC0, 0x65, 0x3A, 0x3E }
64 const uint8_t *
ref,
int len, uint8_t *iv,
int dir,
71 for (
i = 0;
i < 8*
len;
i++)
74 for (
i = 0;
i < 8*
len;
i++)
84 uint8_t buf[8], iv[8];
86 static const uint8_t
src[32] =
"HelloWorldHelloWorldHelloWorld";
101 memcpy(iv,
"HALLO123", 8);
105 memcpy(iv,
"HALLO123", 8);
108 memcpy(iv,
"HALLO123", 8);
112 printf(
"Test encryption/decryption success.\n");